結果

問題 No.136 Yet Another GCD Problem
ユーザー tsunabittsunabit
提出日時 2020-03-04 21:34:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 161 ms / 5,000 ms
コード長 342 bytes
コンパイル時間 4,034 ms
コンパイル使用メモリ 75,464 KB
実行使用メモリ 41,652 KB
最終ジャッジ日時 2024-04-22 01:52:56
合計ジャッジ時間 11,035 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
41,412 KB
testcase_01 AC 136 ms
41,344 KB
testcase_02 AC 122 ms
40,220 KB
testcase_03 AC 136 ms
41,072 KB
testcase_04 AC 135 ms
41,292 KB
testcase_05 AC 134 ms
41,288 KB
testcase_06 AC 138 ms
41,120 KB
testcase_07 AC 135 ms
41,240 KB
testcase_08 AC 135 ms
41,444 KB
testcase_09 AC 134 ms
41,316 KB
testcase_10 AC 135 ms
41,384 KB
testcase_11 AC 135 ms
41,392 KB
testcase_12 AC 133 ms
41,240 KB
testcase_13 AC 129 ms
41,124 KB
testcase_14 AC 137 ms
41,260 KB
testcase_15 AC 135 ms
41,216 KB
testcase_16 AC 134 ms
41,312 KB
testcase_17 AC 135 ms
41,440 KB
testcase_18 AC 136 ms
41,384 KB
testcase_19 AC 138 ms
41,464 KB
testcase_20 AC 135 ms
40,896 KB
testcase_21 AC 134 ms
41,272 KB
testcase_22 AC 134 ms
41,296 KB
testcase_23 AC 135 ms
40,972 KB
testcase_24 AC 134 ms
41,084 KB
testcase_25 AC 134 ms
41,100 KB
testcase_26 AC 131 ms
41,376 KB
testcase_27 AC 133 ms
41,400 KB
testcase_28 AC 138 ms
41,192 KB
testcase_29 AC 137 ms
41,304 KB
testcase_30 AC 161 ms
41,076 KB
testcase_31 AC 142 ms
41,500 KB
testcase_32 AC 134 ms
41,240 KB
testcase_33 AC 134 ms
41,068 KB
testcase_34 AC 138 ms
41,320 KB
testcase_35 AC 136 ms
41,124 KB
testcase_36 AC 136 ms
41,068 KB
testcase_37 AC 135 ms
41,108 KB
testcase_38 AC 136 ms
41,252 KB
testcase_39 AC 130 ms
41,652 KB
testcase_40 AC 134 ms
41,128 KB
testcase_41 AC 140 ms
41,520 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