結果

問題 No.312 置換処理
ユーザー takeya_okinotakeya_okino
提出日時 2019-09-10 19:25:57
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 2,558 ms
コンパイル使用メモリ 72,000 KB
実行使用メモリ 58,460 KB
最終ジャッジ日時 2023-09-15 13:07:03
合計ジャッジ時間 10,408 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,236 KB
testcase_01 WA -
testcase_02 AC 138 ms
55,944 KB
testcase_03 WA -
testcase_04 AC 123 ms
55,984 KB
testcase_05 AC 123 ms
55,860 KB
testcase_06 AC 126 ms
55,960 KB
testcase_07 AC 131 ms
55,728 KB
testcase_08 AC 121 ms
55,704 KB
testcase_09 AC 121 ms
55,784 KB
testcase_10 AC 124 ms
55,860 KB
testcase_11 AC 126 ms
55,920 KB
testcase_12 AC 123 ms
58,040 KB
testcase_13 AC 124 ms
55,728 KB
testcase_14 AC 123 ms
56,304 KB
testcase_15 AC 123 ms
56,016 KB
testcase_16 AC 124 ms
56,072 KB
testcase_17 AC 123 ms
56,060 KB
testcase_18 AC 129 ms
55,960 KB
testcase_19 AC 126 ms
55,920 KB
testcase_20 AC 126 ms
55,704 KB
testcase_21 AC 124 ms
56,072 KB
testcase_22 AC 123 ms
56,056 KB
testcase_23 AC 122 ms
55,576 KB
testcase_24 AC 122 ms
55,728 KB
testcase_25 WA -
testcase_26 AC 122 ms
55,728 KB
testcase_27 WA -
testcase_28 AC 120 ms
55,760 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 122 ms
55,728 KB
testcase_32 AC 127 ms
56,384 KB
testcase_33 AC 130 ms
55,956 KB
testcase_34 AC 130 ms
55,932 KB
testcase_35 AC 123 ms
56,356 KB
testcase_36 AC 122 ms
56,004 KB
testcase_37 AC 121 ms
56,100 KB
testcase_38 AC 124 ms
56,032 KB
testcase_39 AC 123 ms
56,352 KB
testcase_40 AC 123 ms
56,124 KB
testcase_41 AC 123 ms
55,940 KB
testcase_42 AC 123 ms
55,988 KB
testcase_43 AC 122 ms
55,684 KB
testcase_44 AC 123 ms
55,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long ans = 1;
    for(long i = 3; (i * i) <= n; i++) {
      if((n % i) == 0) {
        ans = i;
        break;
      }
    }
    if(ans == 1) ans = n;
    System.out.println(ans);
  }
}
0