004-009-002

Multidimensional Array Element Access: Points Retrieval

Easy

Problem Description

multidimensional array Element Access: Points Retrieval

Learning Objective: Extract numeric elements from 2D array

In this problem, you will create a program that stores weekly points data in a 2D int array and extracts a specific element using specified row (day) and column (store index) with array[rowIndex][columnIndex] notation, then displays the result to standard output.

Retrieve points for specific store on specific day from weekly points earning table. Learn how to extract points for specified day and store from point data stored in 2D array. Understand that numeric 2D arrays also use same array[row][column] access format.

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)
Line n+2: Day to retrieve (1-n)
Line n+3: Store index to retrieve (0:Store A 1:Store B 2:Store C)

Output

=== Points Retrieval ===
Day [day]: Store [store name]
[points]pt
```java

## Examples

### Example 1: Get points for Store A on day 1
Input:
```java
2
10 20 30
15 25 35
1
0
```java
Output:
```java
=== Points Retrieval ===
Day 1: Store A
10pt

Test Cases

※ Output examples follow programming industry standards

Normal case
Input:
1
50 60 70
1
1
Expected Output:
=== Points Retrieval ===
Day 1: Store B
60pt
Normal case
Input:
2
10 20 30
15 25 35
2
1
Expected Output:
=== Points Retrieval ===
Day 2: Store B
25pt

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 10 free executions remaining