結果

問題 No.889 素数!
ユーザー tomomo2b2tomomo2b2
提出日時 2019-10-25 20:58:13
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 1,116 bytes
コンパイル時間 4,392 ms
コンパイル使用メモリ 102,392 KB
実行使用メモリ 23,636 KB
最終ジャッジ日時 2023-09-29 16:05:42
合計ジャッジ時間 8,806 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
21,460 KB
testcase_01 AC 52 ms
21,520 KB
testcase_02 AC 50 ms
23,392 KB
testcase_03 AC 50 ms
21,420 KB
testcase_04 AC 48 ms
19,472 KB
testcase_05 AC 48 ms
21,448 KB
testcase_06 AC 48 ms
21,472 KB
testcase_07 AC 47 ms
21,472 KB
testcase_08 AC 50 ms
23,628 KB
testcase_09 AC 48 ms
21,412 KB
testcase_10 AC 46 ms
21,404 KB
testcase_11 AC 49 ms
21,496 KB
testcase_12 AC 46 ms
23,480 KB
testcase_13 AC 46 ms
19,380 KB
testcase_14 AC 46 ms
19,372 KB
testcase_15 AC 47 ms
21,436 KB
testcase_16 AC 47 ms
23,484 KB
testcase_17 AC 47 ms
21,400 KB
testcase_18 AC 47 ms
21,460 KB
testcase_19 AC 47 ms
21,444 KB
testcase_20 AC 46 ms
21,416 KB
testcase_21 AC 46 ms
21,408 KB
testcase_22 AC 46 ms
21,468 KB
testcase_23 AC 48 ms
23,468 KB
testcase_24 AC 47 ms
23,456 KB
testcase_25 AC 47 ms
23,636 KB
testcase_26 AC 45 ms
21,504 KB
testcase_27 AC 47 ms
21,340 KB
testcase_28 AC 45 ms
21,360 KB
testcase_29 AC 46 ms
21,368 KB
testcase_30 AC 47 ms
21,520 KB
testcase_31 AC 47 ms
21,404 KB
testcase_32 AC 50 ms
21,472 KB
testcase_33 AC 51 ms
21,412 KB
testcase_34 AC 45 ms
21,484 KB
testcase_35 AC 47 ms
21,432 KB
testcase_36 AC 48 ms
19,368 KB
testcase_37 AC 46 ms
23,564 KB
testcase_38 AC 46 ms
21,348 KB
testcase_39 AC 46 ms
21,412 KB
testcase_40 AC 46 ms
19,384 KB
testcase_41 AC 46 ms
23,428 KB
testcase_42 AC 47 ms
23,452 KB
testcase_43 AC 47 ms
21,432 KB
testcase_44 AC 46 ms
21,392 KB
testcase_45 AC 46 ms
21,408 KB
testcase_46 AC 47 ms
19,308 KB
testcase_47 AC 47 ms
21,432 KB
testcase_48 AC 49 ms
21,460 KB
testcase_49 AC 47 ms
23,500 KB
testcase_50 AC 46 ms
21,660 KB
testcase_51 AC 48 ms
23,416 KB
testcase_52 AC 47 ms
21,404 KB
testcase_53 AC 45 ms
21,432 KB
testcase_54 AC 48 ms
21,504 KB
testcase_55 AC 49 ms
21,404 KB
testcase_56 AC 55 ms
23,524 KB
testcase_57 AC 48 ms
23,512 KB
testcase_58 AC 47 ms
23,404 KB
testcase_59 AC 47 ms
21,576 KB
testcase_60 AC 47 ms
21,488 KB
testcase_61 AC 47 ms
21,540 KB
testcase_62 AC 47 ms
21,436 KB
testcase_63 AC 47 ms
23,532 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;

class MyClass
{
    public static void Solve()
    {
        var N = int.Parse(Console.ReadLine());
        var sosu = new[] { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61 };
        if (sosu.Contains(N))
        {
            Console.WriteLine("Sosu!");
            return;
        }
        var heihosu = new[] { 4, 9, 16, 25, 36, 49 };
        if (heihosu.Contains(N))
        {
            Console.WriteLine("Heihosu!");
            return;
        }
        var ripposu = new[] { 8, 27 };
        if (ripposu.Contains(N))
        {
            Console.WriteLine("Ripposu!");
            return;
        }
        var kanzensu = new[] { 6, 28 };
        if (kanzensu.Contains(N))
        {
            Console.WriteLine("Kanzensu!");
            return;
        }
        Console.WriteLine(N);
    }

    public static void Main()
    {
        var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
        Console.SetOut(sw);
        Solve();
        Console.Out.Flush();
    }
}
0