結果

問題 No.136 Yet Another GCD Problem
ユーザー fjafjafja
提出日時 2017-10-01 12:10:33
言語 Java
(openjdk 23)
結果
AC  
実行時間 139 ms / 5,000 ms
コード長 293 bytes
コンパイル時間 3,599 ms
コンパイル使用メモリ 77,020 KB
実行使用メモリ 41,932 KB
最終ジャッジ日時 2024-11-15 21:31:40
合計ジャッジ時間 10,644 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 39
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class N136 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt(),k=sc.nextInt();
		int i=2;
		int ans=0;
		while(true){
			if(n%i==0){
				ans=n/i;
				break;
			}
			i++;
		}
		System.out.println(ans);
	}

}
0