結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
20,736 KB
testcase_01 AC 55 ms
20,848 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 52 ms
22,780 KB
testcase_06 AC 53 ms
20,756 KB
testcase_07 WA -
testcase_08 AC 54 ms
20,676 KB
testcase_09 WA -
testcase_10 AC 54 ms
22,716 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 54 ms
20,728 KB
testcase_14 AC 53 ms
22,868 KB
testcase_15 AC 54 ms
20,664 KB
testcase_16 AC 53 ms
22,904 KB
testcase_17 AC 54 ms
22,724 KB
testcase_18 WA -
testcase_19 AC 54 ms
20,800 KB
testcase_20 AC 53 ms
20,684 KB
testcase_21 AC 54 ms
20,744 KB
testcase_22 AC 54 ms
20,668 KB
testcase_23 AC 54 ms
20,700 KB
testcase_24 AC 54 ms
20,636 KB
testcase_25 AC 54 ms
20,668 KB
testcase_26 WA -
testcase_27 AC 54 ms
20,836 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 52 ms
20,756 KB
testcase_31 AC 54 ms
20,668 KB
testcase_32 AC 53 ms
22,808 KB
testcase_33 AC 54 ms
20,648 KB
testcase_34 AC 54 ms
22,716 KB
testcase_35 AC 55 ms
20,788 KB
testcase_36 AC 54 ms
20,776 KB
testcase_37 AC 53 ms
20,764 KB
testcase_38 AC 53 ms
20,604 KB
testcase_39 AC 54 ms
20,660 KB
testcase_40 AC 54 ms
20,648 KB
testcase_41 AC 52 ms
20,672 KB
testcase_42 AC 54 ms
20,668 KB
testcase_43 AC 54 ms
20,812 KB
testcase_44 AC 55 ms
22,828 KB
testcase_45 AC 54 ms
20,748 KB
testcase_46 AC 55 ms
22,776 KB
testcase_47 AC 54 ms
20,680 KB
testcase_48 AC 54 ms
22,776 KB
testcase_49 WA -
testcase_50 AC 54 ms
22,740 KB
testcase_51 AC 54 ms
20,740 KB
testcase_52 AC 54 ms
22,716 KB
testcase_53 AC 53 ms
20,608 KB
testcase_54 AC 54 ms
20,672 KB
testcase_55 AC 54 ms
20,732 KB
testcase_56 AC 54 ms
22,776 KB
testcase_57 AC 54 ms
20,792 KB
testcase_58 AC 54 ms
20,672 KB
testcase_59 AC 53 ms
20,684 KB
testcase_60 AC 54 ms
22,712 KB
testcase_61 AC 53 ms
20,848 KB
testcase_62 AC 54 ms
22,712 KB
testcase_63 AC 55 ms
20,740 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