結果

問題 No.136 Yet Another GCD Problem
ユーザー tsunabittsunabit
提出日時 2020-03-04 21:34:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 5,000 ms
コード長 342 bytes
コンパイル時間 3,084 ms
コンパイル使用メモリ 72,320 KB
実行使用メモリ 58,392 KB
最終ジャッジ日時 2023-08-04 03:26:14
合計ジャッジ時間 11,015 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,852 KB
testcase_01 AC 119 ms
56,012 KB
testcase_02 AC 121 ms
55,728 KB
testcase_03 AC 119 ms
55,516 KB
testcase_04 AC 117 ms
56,312 KB
testcase_05 AC 117 ms
55,736 KB
testcase_06 AC 118 ms
56,040 KB
testcase_07 AC 119 ms
55,808 KB
testcase_08 AC 117 ms
56,044 KB
testcase_09 AC 120 ms
56,000 KB
testcase_10 AC 121 ms
55,900 KB
testcase_11 AC 120 ms
55,744 KB
testcase_12 AC 117 ms
55,892 KB
testcase_13 AC 122 ms
55,800 KB
testcase_14 AC 119 ms
56,344 KB
testcase_15 AC 119 ms
56,336 KB
testcase_16 AC 120 ms
56,024 KB
testcase_17 AC 123 ms
56,032 KB
testcase_18 AC 124 ms
55,880 KB
testcase_19 AC 121 ms
56,152 KB
testcase_20 AC 119 ms
55,868 KB
testcase_21 AC 118 ms
55,908 KB
testcase_22 AC 118 ms
56,160 KB
testcase_23 AC 118 ms
55,512 KB
testcase_24 AC 120 ms
55,832 KB
testcase_25 AC 121 ms
56,324 KB
testcase_26 AC 120 ms
56,284 KB
testcase_27 AC 120 ms
55,476 KB
testcase_28 AC 120 ms
55,464 KB
testcase_29 AC 116 ms
56,412 KB
testcase_30 AC 118 ms
55,992 KB
testcase_31 AC 117 ms
55,920 KB
testcase_32 AC 117 ms
58,392 KB
testcase_33 AC 118 ms
56,304 KB
testcase_34 AC 117 ms
55,972 KB
testcase_35 AC 120 ms
58,380 KB
testcase_36 AC 116 ms
56,064 KB
testcase_37 AC 116 ms
55,836 KB
testcase_38 AC 118 ms
56,156 KB
testcase_39 AC 118 ms
56,112 KB
testcase_40 AC 117 ms
55,844 KB
testcase_41 AC 118 ms
56,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No136 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), k = sc.nextInt();
		
		for(int i = 2; i <= k+1; i++) {
			if(n % i == 0) {
				System.out.println(n/i);
				return;
			}
		}
		System.out.println(1);
    }
}
0