結果

問題 No.339 何人が回答したのか
ユーザー hikari2004hikari2004
提出日時 2016-04-21 16:02:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 1,000 ms
コード長 491 bytes
コンパイル時間 3,840 ms
コンパイル使用メモリ 74,492 KB
実行使用メモリ 54,440 KB
最終ジャッジ日時 2024-04-15 03:56:30
合計ジャッジ時間 12,421 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
54,080 KB
testcase_01 AC 115 ms
53,064 KB
testcase_02 AC 125 ms
54,100 KB
testcase_03 AC 112 ms
53,128 KB
testcase_04 AC 124 ms
54,440 KB
testcase_05 AC 125 ms
54,268 KB
testcase_06 AC 124 ms
54,172 KB
testcase_07 AC 119 ms
54,152 KB
testcase_08 AC 125 ms
54,148 KB
testcase_09 AC 123 ms
54,160 KB
testcase_10 AC 122 ms
54,096 KB
testcase_11 AC 121 ms
53,988 KB
testcase_12 AC 111 ms
52,592 KB
testcase_13 AC 126 ms
53,720 KB
testcase_14 AC 126 ms
53,988 KB
testcase_15 AC 129 ms
54,296 KB
testcase_16 AC 128 ms
54,024 KB
testcase_17 AC 128 ms
53,864 KB
testcase_18 AC 126 ms
54,048 KB
testcase_19 AC 122 ms
54,060 KB
testcase_20 AC 121 ms
54,336 KB
testcase_21 AC 121 ms
54,084 KB
testcase_22 AC 120 ms
54,108 KB
testcase_23 AC 122 ms
54,276 KB
testcase_24 AC 119 ms
54,100 KB
testcase_25 AC 120 ms
54,096 KB
testcase_26 AC 119 ms
53,940 KB
testcase_27 AC 110 ms
53,068 KB
testcase_28 AC 123 ms
53,988 KB
testcase_29 AC 112 ms
53,076 KB
testcase_30 AC 124 ms
54,136 KB
testcase_31 AC 123 ms
54,176 KB
testcase_32 AC 119 ms
54,236 KB
testcase_33 AC 120 ms
53,900 KB
testcase_34 AC 121 ms
53,976 KB
testcase_35 AC 123 ms
53,880 KB
testcase_36 AC 124 ms
53,936 KB
testcase_37 AC 127 ms
54,100 KB
testcase_38 AC 123 ms
53,992 KB
testcase_39 AC 122 ms
53,948 KB
testcase_40 AC 121 ms
54,040 KB
testcase_41 AC 121 ms
54,036 KB
testcase_42 AC 110 ms
52,788 KB
testcase_43 AC 126 ms
53,732 KB
testcase_44 AC 128 ms
54,124 KB
testcase_45 AC 127 ms
54,116 KB
testcase_46 AC 125 ms
53,744 KB
testcase_47 AC 121 ms
54,052 KB
testcase_48 AC 121 ms
54,128 KB
testcase_49 AC 120 ms
54,164 KB
testcase_50 AC 119 ms
53,840 KB
testcase_51 AC 132 ms
54,140 KB
testcase_52 AC 109 ms
53,060 KB
testcase_53 AC 120 ms
53,768 KB
testcase_54 AC 123 ms
54,184 KB
testcase_55 AC 121 ms
54,228 KB
testcase_56 AC 112 ms
52,908 KB
testcase_57 AC 117 ms
53,732 KB
testcase_58 AC 125 ms
53,932 KB
testcase_59 AC 111 ms
52,924 KB
testcase_60 AC 127 ms
53,996 KB
testcase_61 AC 121 ms
54,248 KB
testcase_62 AC 116 ms
54,216 KB
testcase_63 AC 119 ms
53,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicorder;

import java.util.Scanner;

public class No_339 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a = new int[n];

		for(int i = 0; i < n; i++){
			a[i] = sc.nextInt();
		}

		int b = 100;
		for(int i = 0; i < n; i++){
			b = GCD(b, a[i]);
		}
		System.out.println(100 / b);

	}

	static int GCD(int a,int b){
		if(a < b){
			return GCD(b,a);
		}
		if(b == 0){
			return a;
		}
		return GCD(b,a % b);
	}
}
0