結果

問題 No.339 何人が回答したのか
ユーザー Mcpu3Mcpu3
提出日時 2018-09-09 19:15:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 1,000 ms
コード長 516 bytes
コンパイル時間 2,060 ms
コンパイル使用メモリ 72,312 KB
実行使用メモリ 56,416 KB
最終ジャッジ日時 2023-08-25 15:15:44
合計ジャッジ時間 12,941 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
55,720 KB
testcase_01 AC 124 ms
56,296 KB
testcase_02 AC 118 ms
55,576 KB
testcase_03 AC 118 ms
55,796 KB
testcase_04 AC 120 ms
55,716 KB
testcase_05 AC 122 ms
56,232 KB
testcase_06 AC 119 ms
55,816 KB
testcase_07 AC 119 ms
55,880 KB
testcase_08 AC 120 ms
55,944 KB
testcase_09 AC 120 ms
56,192 KB
testcase_10 AC 118 ms
56,196 KB
testcase_11 AC 121 ms
55,804 KB
testcase_12 AC 120 ms
55,944 KB
testcase_13 AC 119 ms
55,828 KB
testcase_14 AC 118 ms
55,844 KB
testcase_15 AC 118 ms
56,036 KB
testcase_16 AC 119 ms
55,712 KB
testcase_17 AC 123 ms
56,016 KB
testcase_18 AC 122 ms
56,320 KB
testcase_19 AC 117 ms
56,200 KB
testcase_20 AC 123 ms
55,924 KB
testcase_21 AC 123 ms
55,948 KB
testcase_22 AC 121 ms
56,308 KB
testcase_23 AC 122 ms
55,888 KB
testcase_24 AC 123 ms
55,888 KB
testcase_25 AC 120 ms
56,208 KB
testcase_26 AC 120 ms
55,892 KB
testcase_27 AC 121 ms
56,104 KB
testcase_28 AC 119 ms
56,076 KB
testcase_29 AC 123 ms
56,324 KB
testcase_30 AC 121 ms
55,940 KB
testcase_31 AC 121 ms
55,912 KB
testcase_32 AC 121 ms
55,720 KB
testcase_33 AC 121 ms
56,076 KB
testcase_34 AC 124 ms
56,004 KB
testcase_35 AC 120 ms
55,788 KB
testcase_36 AC 121 ms
55,456 KB
testcase_37 AC 120 ms
56,032 KB
testcase_38 AC 121 ms
55,540 KB
testcase_39 AC 121 ms
56,068 KB
testcase_40 AC 118 ms
56,196 KB
testcase_41 AC 117 ms
55,964 KB
testcase_42 AC 119 ms
56,016 KB
testcase_43 AC 120 ms
55,932 KB
testcase_44 AC 117 ms
56,084 KB
testcase_45 AC 118 ms
55,844 KB
testcase_46 AC 117 ms
56,008 KB
testcase_47 AC 120 ms
56,164 KB
testcase_48 AC 118 ms
56,008 KB
testcase_49 AC 119 ms
56,284 KB
testcase_50 AC 117 ms
56,356 KB
testcase_51 AC 120 ms
56,108 KB
testcase_52 AC 121 ms
55,748 KB
testcase_53 AC 119 ms
55,952 KB
testcase_54 AC 118 ms
55,436 KB
testcase_55 AC 119 ms
55,936 KB
testcase_56 AC 120 ms
55,892 KB
testcase_57 AC 119 ms
56,416 KB
testcase_58 AC 118 ms
56,220 KB
testcase_59 AC 118 ms
56,024 KB
testcase_60 AC 120 ms
55,808 KB
testcase_61 AC 118 ms
56,092 KB
testcase_62 AC 116 ms
55,704 KB
testcase_63 AC 115 ms
55,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
    public static int gcd(int x,int y){
        int r;
        while(y>0){
            r=x%y;
            x=y;
            y=r;
        }
        return x;
    }

    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt(),a[]=new int[n];
        for(int i=0;i<n;++i)a[i]=sc.nextInt();
        sc.close();
        for(int i=1;i<n;++i)a[i]=gcd(a[i-1],a[i]);
        System.out.print(100/a[n-1]);
    }
}
0