結果

問題 No.312 置換処理
ユーザー _k_a_n_i__k_a_n_i_
提出日時 2015-12-06 22:53:22
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 504 bytes
コンパイル時間 2,117 ms
コンパイル使用メモリ 71,660 KB
実行使用メモリ 57,968 KB
最終ジャッジ日時 2023-10-12 17:34:31
合計ジャッジ時間 9,407 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,732 KB
testcase_01 WA -
testcase_02 AC 136 ms
55,708 KB
testcase_03 WA -
testcase_04 AC 121 ms
56,048 KB
testcase_05 AC 122 ms
55,924 KB
testcase_06 AC 122 ms
55,808 KB
testcase_07 AC 129 ms
55,804 KB
testcase_08 AC 122 ms
56,060 KB
testcase_09 AC 122 ms
55,888 KB
testcase_10 AC 121 ms
55,908 KB
testcase_11 AC 125 ms
55,684 KB
testcase_12 AC 122 ms
55,924 KB
testcase_13 AC 122 ms
56,068 KB
testcase_14 AC 124 ms
55,596 KB
testcase_15 AC 123 ms
56,068 KB
testcase_16 AC 124 ms
55,768 KB
testcase_17 AC 123 ms
55,652 KB
testcase_18 AC 124 ms
56,044 KB
testcase_19 AC 122 ms
56,064 KB
testcase_20 AC 124 ms
56,124 KB
testcase_21 AC 124 ms
55,844 KB
testcase_22 AC 125 ms
55,648 KB
testcase_23 AC 122 ms
55,648 KB
testcase_24 AC 121 ms
55,400 KB
testcase_25 WA -
testcase_26 AC 122 ms
56,004 KB
testcase_27 WA -
testcase_28 AC 121 ms
55,872 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 123 ms
55,756 KB
testcase_32 AC 125 ms
56,220 KB
testcase_33 AC 128 ms
55,628 KB
testcase_34 AC 132 ms
55,688 KB
testcase_35 AC 123 ms
55,876 KB
testcase_36 AC 121 ms
55,804 KB
testcase_37 AC 123 ms
56,048 KB
testcase_38 AC 121 ms
55,660 KB
testcase_39 AC 121 ms
55,964 KB
testcase_40 AC 122 ms
56,148 KB
testcase_41 AC 122 ms
55,748 KB
testcase_42 AC 120 ms
55,980 KB
testcase_43 AC 122 ms
56,272 KB
testcase_44 AC 122 ms
56,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main
{
    private final static Main main = new Main();

    public static void main(String[] args)
    {
        main.contest();
    }

    private void contest()
    {
        Scanner sc = new Scanner(System.in);
        System.out.println(solve(sc.nextLong()));
    }

    private long solve(long n)
    {
        for(long i=3; i*i<=n; ++i)
        {
            if(n%i == 0)
            {
                return i;
            }
        }
        return n;
    }
}
0