結果

問題 No.481 1から10
ユーザー yamax3232
提出日時 2017-02-13 20:56:37
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 814 bytes
コンパイル時間 3,939 ms
コンパイル使用メモリ 77,136 KB
実行使用メモリ 41,268 KB
最終ジャッジ日時 2024-12-29 19:09:33
合計ジャッジ時間 5,954 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 7 WA * 1
権限があれば一括ダウンロードができます

ソースコード

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

}
0