結果

問題 No.339 何人が回答したのか
ユーザー htensaihtensai
提出日時 2019-11-21 19:10:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 141 ms / 1,000 ms
コード長 405 bytes
コンパイル時間 2,067 ms
コンパイル使用メモリ 73,944 KB
実行使用メモリ 41,632 KB
最終ジャッジ日時 2024-04-19 04:54:41
合計ジャッジ時間 11,913 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
41,444 KB
testcase_01 AC 126 ms
41,120 KB
testcase_02 AC 119 ms
41,316 KB
testcase_03 AC 120 ms
40,924 KB
testcase_04 AC 126 ms
41,388 KB
testcase_05 AC 134 ms
41,056 KB
testcase_06 AC 135 ms
41,440 KB
testcase_07 AC 135 ms
40,892 KB
testcase_08 AC 122 ms
41,332 KB
testcase_09 AC 128 ms
41,200 KB
testcase_10 AC 135 ms
41,464 KB
testcase_11 AC 123 ms
41,168 KB
testcase_12 AC 112 ms
40,088 KB
testcase_13 AC 126 ms
41,208 KB
testcase_14 AC 117 ms
40,968 KB
testcase_15 AC 116 ms
41,076 KB
testcase_16 AC 123 ms
40,936 KB
testcase_17 AC 118 ms
40,924 KB
testcase_18 AC 109 ms
40,136 KB
testcase_19 AC 125 ms
41,376 KB
testcase_20 AC 136 ms
40,928 KB
testcase_21 AC 117 ms
39,984 KB
testcase_22 AC 131 ms
41,088 KB
testcase_23 AC 135 ms
41,476 KB
testcase_24 AC 127 ms
40,972 KB
testcase_25 AC 126 ms
41,044 KB
testcase_26 AC 131 ms
41,252 KB
testcase_27 AC 110 ms
40,656 KB
testcase_28 AC 120 ms
40,948 KB
testcase_29 AC 119 ms
41,064 KB
testcase_30 AC 130 ms
41,212 KB
testcase_31 AC 120 ms
41,060 KB
testcase_32 AC 127 ms
41,284 KB
testcase_33 AC 124 ms
41,072 KB
testcase_34 AC 118 ms
40,792 KB
testcase_35 AC 119 ms
41,112 KB
testcase_36 AC 130 ms
41,060 KB
testcase_37 AC 115 ms
41,160 KB
testcase_38 AC 115 ms
40,880 KB
testcase_39 AC 129 ms
41,452 KB
testcase_40 AC 125 ms
41,500 KB
testcase_41 AC 119 ms
39,912 KB
testcase_42 AC 138 ms
41,268 KB
testcase_43 AC 141 ms
41,188 KB
testcase_44 AC 141 ms
41,556 KB
testcase_45 AC 123 ms
41,004 KB
testcase_46 AC 132 ms
41,064 KB
testcase_47 AC 125 ms
39,812 KB
testcase_48 AC 141 ms
41,240 KB
testcase_49 AC 140 ms
40,904 KB
testcase_50 AC 141 ms
41,264 KB
testcase_51 AC 132 ms
41,120 KB
testcase_52 AC 137 ms
41,368 KB
testcase_53 AC 129 ms
41,184 KB
testcase_54 AC 123 ms
41,632 KB
testcase_55 AC 108 ms
39,780 KB
testcase_56 AC 124 ms
41,204 KB
testcase_57 AC 107 ms
39,756 KB
testcase_58 AC 113 ms
40,248 KB
testcase_59 AC 116 ms
40,884 KB
testcase_60 AC 112 ms
41,048 KB
testcase_61 AC 132 ms
40,620 KB
testcase_62 AC 120 ms
41,388 KB
testcase_63 AC 110 ms
39,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int div = 100;
		for (int i = 0; i < n; i++) {
		    div = gcd(sc.nextInt(), div);
		}
		System.out.println(100 / div);
	}
	
	static int gcd(int x, int y) {
	    if (x % y == 0) {
	        return y;
	    } else {
	        return gcd(y, x % y);
	    }
	}
}
0