結果

問題 No.136 Yet Another GCD Problem
ユーザー chiho_miyakochiho_miyako
提出日時 2015-04-13 16:46:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 377 bytes
コンパイル時間 2,086 ms
コンパイル使用メモリ 71,408 KB
実行使用メモリ 55,936 KB
最終ジャッジ日時 2023-09-17 19:58:42
合計ジャッジ時間 9,488 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,828 KB
testcase_01 AC 124 ms
55,528 KB
testcase_02 AC 125 ms
55,524 KB
testcase_03 AC 128 ms
55,348 KB
testcase_04 AC 127 ms
55,384 KB
testcase_05 AC 126 ms
55,556 KB
testcase_06 AC 126 ms
55,892 KB
testcase_07 AC 126 ms
55,568 KB
testcase_08 AC 128 ms
55,712 KB
testcase_09 AC 126 ms
55,660 KB
testcase_10 AC 128 ms
55,596 KB
testcase_11 AC 129 ms
55,472 KB
testcase_12 AC 125 ms
55,620 KB
testcase_13 AC 127 ms
55,928 KB
testcase_14 AC 129 ms
55,860 KB
testcase_15 AC 129 ms
55,344 KB
testcase_16 AC 131 ms
55,936 KB
testcase_17 AC 129 ms
55,804 KB
testcase_18 AC 129 ms
53,772 KB
testcase_19 AC 134 ms
55,564 KB
testcase_20 AC 132 ms
55,564 KB
testcase_21 AC 130 ms
55,912 KB
testcase_22 AC 130 ms
55,356 KB
testcase_23 AC 131 ms
55,464 KB
testcase_24 AC 130 ms
55,340 KB
testcase_25 AC 131 ms
55,568 KB
testcase_26 AC 130 ms
55,608 KB
testcase_27 AC 131 ms
55,596 KB
testcase_28 AC 130 ms
55,596 KB
testcase_29 AC 129 ms
55,560 KB
testcase_30 AC 130 ms
55,936 KB
testcase_31 AC 132 ms
55,688 KB
testcase_32 AC 132 ms
55,800 KB
testcase_33 AC 129 ms
55,620 KB
testcase_34 AC 131 ms
55,708 KB
testcase_35 AC 129 ms
55,632 KB
testcase_36 AC 129 ms
55,924 KB
testcase_37 AC 130 ms
55,608 KB
testcase_38 AC 126 ms
55,528 KB
testcase_39 AC 128 ms
55,700 KB
testcase_40 AC 126 ms
55,656 KB
testcase_41 AC 127 ms
55,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner koko = new Scanner(System.in);
        int n = koko.nextInt();
        int k = koko.nextInt();
        int ans=0;
        for(int i=1; i<n; i++){
            if(n%i==0){
                ans=i;
            }
        }
        System.out.println(ans);
    }
}
0