結果
問題 | No.481 1から10 |
ユーザー | yamax3232 |
提出日時 | 2017-02-13 20:56:37 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 814 bytes |
コンパイル時間 | 4,038 ms |
コンパイル使用メモリ | 74,588 KB |
実行使用メモリ | 56,396 KB |
最終ジャッジ日時 | 2023-08-28 15:41:13 |
合計ジャッジ時間 | 5,485 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 122 ms
55,876 KB |
testcase_01 | AC | 120 ms
55,992 KB |
testcase_02 | AC | 120 ms
56,000 KB |
testcase_03 | AC | 122 ms
56,288 KB |
testcase_04 | AC | 127 ms
55,936 KB |
testcase_05 | AC | 124 ms
56,376 KB |
testcase_06 | AC | 122 ms
53,736 KB |
testcase_07 | AC | 124 ms
56,028 KB |
testcase_08 | AC | 125 ms
56,396 KB |
testcase_09 | WA | - |
ソースコード
import java.util.Scanner; public class OneToTen { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ int a[]={0,0,0,0,0,0,0,0,0,0}; int count[]={0,0,0,0,0,0,0,0,0,0}; Scanner kb=new Scanner(System.in); for(int i=0;i<9;i++){ a[i]=kb.nextInt(); } for(int i=0;i<10;i++){ switch(a[i]){ case 1:count[0]++; continue; case 2:count[1]++;continue; case 3:count[2]++;continue; case 4:count[3]++;continue; case 5:count[4]++;continue; case 6:count[5]++;continue; case 7:count[6]++;continue; case 8:count[7]++;continue; case 9:count[8]++;continue; case 10:count[9]++;continue; default:continue; } } for(int i=0;i<9;i++){ if(count[i]==0){ System.out.printf("%d\n",i+1); } } kb.close(); } }