結果

問題 No.312 置換処理
ユーザー bluemeganebluemegane
提出日時 2020-09-11 06:59:55
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 445 bytes
コンパイル時間 1,024 ms
コンパイル使用メモリ 63,236 KB
実行使用メモリ 22,884 KB
最終ジャッジ日時 2023-08-26 04:15:26
合計ジャッジ時間 5,391 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
20,544 KB
testcase_01 AC 59 ms
20,568 KB
testcase_02 AC 65 ms
18,600 KB
testcase_03 AC 61 ms
18,752 KB
testcase_04 AC 54 ms
18,620 KB
testcase_05 AC 55 ms
20,556 KB
testcase_06 AC 54 ms
18,816 KB
testcase_07 AC 57 ms
20,568 KB
testcase_08 AC 54 ms
20,720 KB
testcase_09 AC 54 ms
22,740 KB
testcase_10 AC 55 ms
22,660 KB
testcase_11 AC 55 ms
22,664 KB
testcase_12 AC 54 ms
22,720 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 53 ms
20,560 KB
testcase_23 WA -
testcase_24 AC 53 ms
20,684 KB
testcase_25 AC 54 ms
20,700 KB
testcase_26 AC 54 ms
20,792 KB
testcase_27 WA -
testcase_28 AC 54 ms
22,744 KB
testcase_29 AC 53 ms
20,672 KB
testcase_30 AC 55 ms
22,856 KB
testcase_31 WA -
testcase_32 AC 54 ms
22,724 KB
testcase_33 AC 57 ms
18,580 KB
testcase_34 AC 57 ms
20,708 KB
testcase_35 AC 54 ms
20,572 KB
testcase_36 AC 53 ms
20,740 KB
testcase_37 AC 54 ms
22,612 KB
testcase_38 WA -
testcase_39 AC 53 ms
18,724 KB
testcase_40 AC 53 ms
20,676 KB
testcase_41 AC 53 ms
18,744 KB
testcase_42 AC 54 ms
20,852 KB
testcase_43 AC 52 ms
20,704 KB
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        var n = long.Parse(Console.ReadLine().Trim());
        getAns(n);
    }
    static void getAns (long n)
    {
        while (true)
        {
            if (n % 2 == 0) n /= 2;
            else break;
        }
        for (long i = 3; i *i <= n; i++)
        {
            if (n % i == 0) { Console.WriteLine(i); return; }
        }
        Console.WriteLine(n);
    }
}
0