結果

問題 No.339 何人が回答したのか
ユーザー uafr_csuafr_cs
提出日時 2016-02-02 22:00:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 1,000 ms
コード長 562 bytes
コンパイル時間 2,106 ms
コンパイル使用メモリ 74,220 KB
実行使用メモリ 57,656 KB
最終ジャッジ日時 2023-10-21 18:46:48
合計ジャッジ時間 12,766 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
57,544 KB
testcase_01 AC 136 ms
57,620 KB
testcase_02 AC 131 ms
57,624 KB
testcase_03 AC 133 ms
57,656 KB
testcase_04 AC 134 ms
57,372 KB
testcase_05 AC 132 ms
57,364 KB
testcase_06 AC 133 ms
57,444 KB
testcase_07 AC 133 ms
57,608 KB
testcase_08 AC 131 ms
57,364 KB
testcase_09 AC 130 ms
57,400 KB
testcase_10 AC 132 ms
57,268 KB
testcase_11 AC 132 ms
57,396 KB
testcase_12 AC 132 ms
57,376 KB
testcase_13 AC 134 ms
57,548 KB
testcase_14 AC 130 ms
57,296 KB
testcase_15 AC 133 ms
57,552 KB
testcase_16 AC 134 ms
57,644 KB
testcase_17 AC 134 ms
57,508 KB
testcase_18 AC 131 ms
57,380 KB
testcase_19 AC 133 ms
57,432 KB
testcase_20 AC 132 ms
57,348 KB
testcase_21 AC 132 ms
57,240 KB
testcase_22 AC 133 ms
57,368 KB
testcase_23 AC 134 ms
57,508 KB
testcase_24 AC 134 ms
57,380 KB
testcase_25 AC 131 ms
57,524 KB
testcase_26 AC 132 ms
57,368 KB
testcase_27 AC 120 ms
56,116 KB
testcase_28 AC 130 ms
55,424 KB
testcase_29 AC 131 ms
57,348 KB
testcase_30 AC 134 ms
57,388 KB
testcase_31 AC 130 ms
57,544 KB
testcase_32 AC 130 ms
57,624 KB
testcase_33 AC 130 ms
55,528 KB
testcase_34 AC 132 ms
57,312 KB
testcase_35 AC 131 ms
57,344 KB
testcase_36 AC 130 ms
57,000 KB
testcase_37 AC 134 ms
57,508 KB
testcase_38 AC 131 ms
57,284 KB
testcase_39 AC 133 ms
57,348 KB
testcase_40 AC 129 ms
57,056 KB
testcase_41 AC 131 ms
57,576 KB
testcase_42 AC 132 ms
57,408 KB
testcase_43 AC 130 ms
57,376 KB
testcase_44 AC 132 ms
56,992 KB
testcase_45 AC 132 ms
57,608 KB
testcase_46 AC 134 ms
57,392 KB
testcase_47 AC 132 ms
57,320 KB
testcase_48 AC 131 ms
57,256 KB
testcase_49 AC 135 ms
57,404 KB
testcase_50 AC 135 ms
57,404 KB
testcase_51 AC 137 ms
57,400 KB
testcase_52 AC 134 ms
57,444 KB
testcase_53 AC 131 ms
57,352 KB
testcase_54 AC 131 ms
57,472 KB
testcase_55 AC 130 ms
57,308 KB
testcase_56 AC 118 ms
56,140 KB
testcase_57 AC 128 ms
57,316 KB
testcase_58 AC 133 ms
57,548 KB
testcase_59 AC 116 ms
56,120 KB
testcase_60 AC 128 ms
57,476 KB
testcase_61 AC 128 ms
57,468 KB
testcase_62 AC 129 ms
57,360 KB
testcase_63 AC 127 ms
57,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Set;

public class Main {
	public static int gcd(int a, int b){
		return b == 0 ? a : gcd(b, a % b);
	}
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();
		int[] array = new int[N];
		for(int i = 0; i < N; i++){
			array[i] = sc.nextInt();
		}
		
		int gcd = array[0];
		for(int i = 1; i < N; i++){
			gcd = gcd(gcd, array[i]);
		}
		
		System.out.println(100 / gcd);
	}

}
0