004-010-003

Multidimensional Array Length: Sales Table Size

Easy

Problem Description

Multidimensional Array Length: Sales Table Size

Learning Objective: Get row and column count of 2D array

Get the number of rows (stores) and columns (months) from a sales table, and calculate total cells.

Input

Line 1: Number of stores n (1-3) and months m (1-3)
Following lines: Sales data for m months for each store

Output

Rows: [row count]
Columns: [column count]
Total cells: [rows x columns]
```java

## Example

Input:
```java
2 3
100 150 120
80 90 110
```java
Output:
```java
Rows: 2
Columns: 3
Total cells: 6

Test Cases

※ Output examples follow programming industry standards

Input:
2 3
100 150 120
80 90 110
Expected Output:
Rows: 2
Columns: 3
Total cells: 6
Input:
1 1
500
Expected Output:
Rows: 1
Columns: 1
Total cells: 1
Input:
3 2
10 20
30 40
50 60
Expected Output:
Rows: 3
Columns: 2
Total cells: 6
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here

sc.close();
}
}
0 B / 5 MB

You have 9 free executions remaining