004-010-002
Multidimensional Array Element Count: Points Table Size
Easy
Problem Description
Multidimensional Array Element Count: Points Table Size
Learning Objective: Calculate total data volume with 2D array row and column counts
Check data scale of weekly points earning table. Use .length property of 2D array to get how many days of data exist (row count) and how many stores (column count), then calculate total point data count. Understand that numeric 2D arrays also use same length property.
Input
Line 1: Number of days n (1-3)
Following lines: Points for n days (3 stores per day: Store A Store B Store C)
Output
=== Points Table Size ===
Days: [n] days
Stores: [3] stores
━━━━━━━━━━━━━━━━
Total: [n×3] point data entries
```java
## Examples
### Example 1: Points table for 2 days
Input:
```java
2
10 20 30
15 25 35
```java
Output:
```java
=== Points Table Size ===
Days: 2 days
Stores: 3 stores
━━━━━━━━━━━━━━━━
Total: 6 point data entries
Test Cases
※ Output examples follow programming industry standards
Input:
2 10 20 30 15 25 35
Expected Output:
=== Points Table Size === Days: 2 days Stores: 3 stores ━━━━━━━━━━━━━━━━ Total: 6 point data entries
Input:
1 50 40 30
Expected Output:
=== Points Table Size === Days: 1 days Stores: 3 stores ━━━━━━━━━━━━━━━━ Total: 3 point data entries
Input:
3 10 10 10 20 20 20 30 30 30
Expected Output:
=== Points Table Size === Days: 3 days Stores: 3 stores ━━━━━━━━━━━━━━━━ Total: 9 point data entries
❌ Some tests failed
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
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
