結果

問題 No.889 素数!
ユーザー 1644吉田英陽1644吉田英陽
提出日時 2020-11-09 21:39:43
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,589 bytes
コンパイル時間 1,961 ms
コンパイル使用メモリ 101,032 KB
実行使用メモリ 22,948 KB
最終ジャッジ日時 2023-09-29 22:18:58
合計ジャッジ時間 8,386 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
20,688 KB
testcase_01 AC 52 ms
20,668 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 51 ms
22,792 KB
testcase_06 AC 51 ms
20,624 KB
testcase_07 WA -
testcase_08 AC 52 ms
20,792 KB
testcase_09 WA -
testcase_10 AC 51 ms
22,688 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 50 ms
22,740 KB
testcase_14 AC 50 ms
20,680 KB
testcase_15 AC 51 ms
22,820 KB
testcase_16 AC 49 ms
20,696 KB
testcase_17 AC 47 ms
20,804 KB
testcase_18 WA -
testcase_19 AC 51 ms
22,712 KB
testcase_20 AC 51 ms
20,676 KB
testcase_21 AC 50 ms
20,696 KB
testcase_22 AC 51 ms
20,728 KB
testcase_23 AC 51 ms
22,844 KB
testcase_24 AC 49 ms
20,904 KB
testcase_25 AC 51 ms
22,836 KB
testcase_26 WA -
testcase_27 AC 51 ms
20,644 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 51 ms
20,708 KB
testcase_31 AC 50 ms
18,660 KB
testcase_32 AC 50 ms
20,776 KB
testcase_33 AC 52 ms
20,700 KB
testcase_34 AC 50 ms
20,620 KB
testcase_35 AC 52 ms
22,712 KB
testcase_36 AC 51 ms
20,760 KB
testcase_37 AC 49 ms
20,656 KB
testcase_38 AC 51 ms
20,672 KB
testcase_39 AC 53 ms
22,832 KB
testcase_40 AC 51 ms
20,804 KB
testcase_41 AC 51 ms
20,764 KB
testcase_42 AC 50 ms
20,700 KB
testcase_43 AC 49 ms
22,760 KB
testcase_44 AC 52 ms
20,768 KB
testcase_45 AC 51 ms
20,752 KB
testcase_46 AC 52 ms
20,616 KB
testcase_47 AC 50 ms
20,812 KB
testcase_48 AC 52 ms
22,704 KB
testcase_49 WA -
testcase_50 AC 51 ms
20,664 KB
testcase_51 AC 50 ms
20,712 KB
testcase_52 AC 51 ms
20,660 KB
testcase_53 AC 48 ms
20,868 KB
testcase_54 AC 48 ms
20,716 KB
testcase_55 AC 49 ms
20,684 KB
testcase_56 AC 49 ms
20,668 KB
testcase_57 AC 51 ms
20,792 KB
testcase_58 AC 51 ms
20,696 KB
testcase_59 AC 50 ms
20,680 KB
testcase_60 AC 51 ms
20,640 KB
testcase_61 AC 48 ms
18,640 KB
testcase_62 AC 51 ms
22,808 KB
testcase_63 AC 51 ms
20,696 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp105
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            int notsosu = 0;
            int heihou = 0;
            int rippou = 0;
            int kannzenn = 0;
            if (n == 6 || n == 28)
            {
                kannzenn = 1;
            }
            if (n == 4 || n == 9 || n == 16 || n == 25 || n == 36 || n == 49 || n == 64)
            {
                heihou = 1;
            }
            if (n == 8 || n == 27 || n == 64)
            {
                rippou = 1;
            }
            for(int i = 2; i < n; i++)
            {
                if (n % i == 0)
                {
                    notsosu = 1;
                }
            }
            if (rippou == 1)
            {
                Console.WriteLine("Ripposu!");
                Console.ReadLine();
            }
            if (heihou == 1)
            {
                Console.WriteLine("Heihosu!");
                Console.ReadLine();
            }
            if (kannzenn == 1)
            {
                Console.WriteLine("Kanzensu!");
                Console.ReadLine();
            }
            if (notsosu != 1)
            {
                Console.WriteLine("Sosu!");
                Console.ReadLine();
            }
            else
            {
                Console.WriteLine(n);
                Console.ReadLine();
            }
        }
    }
}
0