結果

問題 No.889 素数!
ユーザー hayashihayashi
提出日時 2019-10-16 14:43:49
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 776 bytes
コンパイル時間 2,206 ms
コンパイル使用メモリ 103,420 KB
実行使用メモリ 22,772 KB
最終ジャッジ日時 2023-09-03 18:12:04
合計ジャッジ時間 7,455 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
20,544 KB
testcase_01 AC 47 ms
20,796 KB
testcase_02 AC 48 ms
20,676 KB
testcase_03 AC 48 ms
22,668 KB
testcase_04 AC 47 ms
20,708 KB
testcase_05 AC 47 ms
22,772 KB
testcase_06 AC 47 ms
20,640 KB
testcase_07 AC 45 ms
20,536 KB
testcase_08 AC 50 ms
20,852 KB
testcase_09 AC 46 ms
20,688 KB
testcase_10 AC 46 ms
22,740 KB
testcase_11 AC 48 ms
20,864 KB
testcase_12 AC 46 ms
20,680 KB
testcase_13 AC 49 ms
20,540 KB
testcase_14 AC 47 ms
20,572 KB
testcase_15 AC 47 ms
22,752 KB
testcase_16 AC 48 ms
20,844 KB
testcase_17 AC 48 ms
20,540 KB
testcase_18 AC 46 ms
20,640 KB
testcase_19 AC 49 ms
20,676 KB
testcase_20 AC 48 ms
20,524 KB
testcase_21 AC 49 ms
20,700 KB
testcase_22 AC 49 ms
22,640 KB
testcase_23 AC 49 ms
20,696 KB
testcase_24 AC 50 ms
20,696 KB
testcase_25 AC 49 ms
20,536 KB
testcase_26 AC 46 ms
20,616 KB
testcase_27 AC 47 ms
22,680 KB
testcase_28 AC 48 ms
20,776 KB
testcase_29 AC 50 ms
20,748 KB
testcase_30 AC 46 ms
22,736 KB
testcase_31 AC 49 ms
20,624 KB
testcase_32 AC 47 ms
20,800 KB
testcase_33 AC 51 ms
22,516 KB
testcase_34 AC 52 ms
20,512 KB
testcase_35 AC 50 ms
20,708 KB
testcase_36 AC 50 ms
20,680 KB
testcase_37 AC 47 ms
22,624 KB
testcase_38 AC 48 ms
20,600 KB
testcase_39 AC 46 ms
18,668 KB
testcase_40 AC 47 ms
22,520 KB
testcase_41 AC 45 ms
20,644 KB
testcase_42 AC 46 ms
20,680 KB
testcase_43 AC 45 ms
20,560 KB
testcase_44 AC 46 ms
20,480 KB
testcase_45 AC 46 ms
20,532 KB
testcase_46 AC 46 ms
20,604 KB
testcase_47 AC 46 ms
18,672 KB
testcase_48 AC 48 ms
22,580 KB
testcase_49 AC 46 ms
20,860 KB
testcase_50 AC 48 ms
20,616 KB
testcase_51 AC 53 ms
22,528 KB
testcase_52 AC 47 ms
18,692 KB
testcase_53 AC 45 ms
22,676 KB
testcase_54 AC 47 ms
18,788 KB
testcase_55 AC 47 ms
20,480 KB
testcase_56 AC 49 ms
20,668 KB
testcase_57 AC 49 ms
22,672 KB
testcase_58 AC 57 ms
20,524 KB
testcase_59 AC 48 ms
22,684 KB
testcase_60 AC 49 ms
20,472 KB
testcase_61 AC 46 ms
20,528 KB
testcase_62 AC 48 ms
20,544 KB
testcase_63 AC 47 ms
20,528 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            if(N == 4 || N == 9 || N == 16 || N == 25 || N == 36 || N == 49)
            {
                Console.WriteLine("Heihosu!");
            }else if(N == 8 || N == 27)
            {
                Console.WriteLine("Ripposu!");
            }else if(N % 2 != 0 && N % 3 != 0 && N != 1 && N % 5 != 0|| N == 2 || N == 3 || N == 5)
            {
                Console.WriteLine("Sosu!");
            }else if(N == 6 || N == 28)
            {
                Console.WriteLine("Kanzensu!");
            }
            else
            {
                Console.WriteLine(N);
            }
        }
    }
}
0