結果
| 問題 | No.136 Yet Another GCD Problem |
| コンテスト | |
| ユーザー |
kenji_shioya
|
| 提出日時 | 2016-07-05 00:19:43 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 5,000 ms |
| コード長 | 358 bytes |
| 記録 | |
| コンパイル時間 | 3,103 ms |
| コンパイル使用メモリ | 82,472 KB |
| 実行使用メモリ | 41,916 KB |
| 最終ジャッジ日時 | 2026-04-29 23:51:44 |
| 合計ジャッジ時間 | 8,461 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 |
ソースコード
import java.util.*;
public class Exercise144{
public static void main (String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
int max = 0;
for(int i = 2; i <= n / 2; i++){
if(n % i == 0){
max = Math.max(max, i);
}
}
System.out.println((max == 0) ? 1 :max);
}
}
kenji_shioya