結果

問題 No.312 置換処理
ユーザー bayashiko_rbayashiko_r
提出日時 2019-01-06 16:59:06
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 499 bytes
コンパイル時間 671 ms
コンパイル使用メモリ 106,892 KB
実行使用メモリ 27,972 KB
最終ジャッジ日時 2024-05-03 03:16:00
合計ジャッジ時間 2,559 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 31 ms
23,624 KB
testcase_03 WA -
testcase_04 AC 19 ms
23,516 KB
testcase_05 WA -
testcase_06 AC 20 ms
23,904 KB
testcase_07 AC 23 ms
23,260 KB
testcase_08 AC 21 ms
25,812 KB
testcase_09 AC 21 ms
23,472 KB
testcase_10 AC 19 ms
25,800 KB
testcase_11 AC 21 ms
23,852 KB
testcase_12 AC 20 ms
25,548 KB
testcase_13 AC 21 ms
23,520 KB
testcase_14 AC 20 ms
23,512 KB
testcase_15 AC 19 ms
23,604 KB
testcase_16 AC 19 ms
23,636 KB
testcase_17 AC 20 ms
23,388 KB
testcase_18 AC 19 ms
23,364 KB
testcase_19 AC 20 ms
25,532 KB
testcase_20 AC 20 ms
25,560 KB
testcase_21 AC 19 ms
23,988 KB
testcase_22 AC 19 ms
23,492 KB
testcase_23 AC 19 ms
25,424 KB
testcase_24 AC 19 ms
23,648 KB
testcase_25 WA -
testcase_26 AC 20 ms
23,260 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 20 ms
23,364 KB
testcase_32 AC 21 ms
25,924 KB
testcase_33 AC 24 ms
23,228 KB
testcase_34 AC 24 ms
23,264 KB
testcase_35 AC 20 ms
25,928 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 AC 19 ms
23,388 KB
testcase_39 AC 20 ms
23,492 KB
testcase_40 AC 20 ms
23,516 KB
testcase_41 AC 19 ms
21,428 KB
testcase_42 AC 20 ms
23,516 KB
testcase_43 AC 19 ms
23,492 KB
testcase_44 AC 19 ms
25,288 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program {
    static void Main(string[] args) {
        //入力
        ulong N = ulong.Parse(Console.ReadLine());

        //回答となる数字
        ulong ans = 3;

        //Nの約数を調べていく
        for (ulong i = 3; i <= Math.Sqrt(N); i++) {
            if (N % i == 0) {
                ans = i;
                break;
            }
        }
        if (ans == 3) {
            ans = N;
        }

        //出力
        Console.WriteLine(ans);
    }
}
0