結果

問題 No.481 1から10
ユーザー yamax3232yamax3232
提出日時 2017-02-13 20:57:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 807 bytes
コンパイル時間 3,056 ms
コンパイル使用メモリ 74,236 KB
実行使用メモリ 56,572 KB
最終ジャッジ日時 2023-08-28 15:41:21
合計ジャッジ時間 4,957 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,752 KB
testcase_01 AC 121 ms
55,948 KB
testcase_02 AC 120 ms
56,216 KB
testcase_03 AC 120 ms
56,572 KB
testcase_04 AC 120 ms
56,212 KB
testcase_05 AC 119 ms
56,064 KB
testcase_06 AC 121 ms
56,192 KB
testcase_07 AC 120 ms
55,872 KB
testcase_08 AC 120 ms
56,236 KB
testcase_09 AC 121 ms
55,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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<10;i++){
			if(count[i]==0){
				System.out.printf("%d\n",i+1);
			}
		}
		kb.close();
	}

}
0