結果

問題 No.136 Yet Another GCD Problem
ユーザー 37zigen37zigen
提出日時 2016-04-12 11:31:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 331 bytes
コンパイル時間 2,470 ms
コンパイル使用メモリ 74,400 KB
実行使用メモリ 54,404 KB
最終ジャッジ日時 2024-04-15 00:38:35
合計ジャッジ時間 9,148 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
54,324 KB
testcase_01 AC 132 ms
53,892 KB
testcase_02 AC 136 ms
54,072 KB
testcase_03 AC 136 ms
54,048 KB
testcase_04 AC 136 ms
54,100 KB
testcase_05 AC 135 ms
54,340 KB
testcase_06 AC 138 ms
54,400 KB
testcase_07 AC 136 ms
54,404 KB
testcase_08 AC 133 ms
54,240 KB
testcase_09 AC 135 ms
54,348 KB
testcase_10 AC 131 ms
53,960 KB
testcase_11 AC 135 ms
54,188 KB
testcase_12 AC 133 ms
54,188 KB
testcase_13 AC 134 ms
54,020 KB
testcase_14 AC 136 ms
54,380 KB
testcase_15 AC 138 ms
54,400 KB
testcase_16 AC 133 ms
53,812 KB
testcase_17 AC 137 ms
54,120 KB
testcase_18 AC 133 ms
54,000 KB
testcase_19 AC 135 ms
54,316 KB
testcase_20 AC 139 ms
54,116 KB
testcase_21 AC 135 ms
54,188 KB
testcase_22 AC 136 ms
54,044 KB
testcase_23 AC 135 ms
53,880 KB
testcase_24 AC 135 ms
54,144 KB
testcase_25 AC 137 ms
54,072 KB
testcase_26 AC 138 ms
54,280 KB
testcase_27 AC 135 ms
54,140 KB
testcase_28 AC 136 ms
54,260 KB
testcase_29 AC 137 ms
54,012 KB
testcase_30 AC 133 ms
53,976 KB
testcase_31 AC 134 ms
54,144 KB
testcase_32 AC 135 ms
53,884 KB
testcase_33 AC 138 ms
54,032 KB
testcase_34 AC 136 ms
54,276 KB
testcase_35 AC 138 ms
54,268 KB
testcase_36 AC 138 ms
54,284 KB
testcase_37 AC 139 ms
54,212 KB
testcase_38 AC 135 ms
54,352 KB
testcase_39 AC 135 ms
53,988 KB
testcase_40 AC 137 ms
54,144 KB
testcase_41 AC 139 ms
54,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;
import java.util.*;
public class Main{
	public static void main(String[] args)throws Exception{
		new Main().solve();
	}
	void solve(){
		Scanner sc=new Scanner(System.in);
		int N=sc.nextInt();
		int K=sc.nextInt();
		for(int i=N-1;i>=1;i--){
			if(N%i==0){
				System.out.println(i);
				return;
			}
		}
	}
}
0