結果
| 問題 | No.136 Yet Another GCD Problem |
| コンテスト | |
| ユーザー |
htensai
|
| 提出日時 | 2019-12-30 10:53:31 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 55 ms / 5,000 ms |
| + 976µs | |
| コード長 | 401 bytes |
| 記録 | |
| コンパイル時間 | 3,525 ms |
| コンパイル使用メモリ | 85,132 KB |
| 実行使用メモリ | 45,248 KB |
| 最終ジャッジ日時 | 2026-09-20 21:33:55 |
| 合計ジャッジ時間 | 6,945 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 39 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
for (int i = 2; i <= Math.sqrt(n); i++) {
if (n % i == 0) {
System.out.println(n / i);
return;
}
}
System.out.println(1);
}
}
htensai