019-001-004
基本的な例外処理:配列アクセス
上級
問題説明
テストケース例
※ 出力例はプログラミングの国際標準に準拠し英語で表示しています
入力:
5 2
期待される出力:
Element at index 2: 20
入力:
3 5
期待される出力:
Error: Index out of bounds
入力:
3 0
期待される出力:
Element at index 0: 0
入力:
4 3
期待される出力:
Element at index 3: 30
❌ テストに失敗したケースがあります
あなたの解答
現在のモード:● 自分のコード
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);
// ここにコードを書いてください
sc.close();
}
}
0 B / 5 MB
残り 9 回実行可能
