結果

問題 No.889 素数!
ユーザー hayashi
提出日時 2019-10-16 14:42:35
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 766 bytes
コンパイル時間 769 ms
コンパイル使用メモリ 109,368 KB
実行使用メモリ 27,588 KB
最終ジャッジ日時 2024-06-12 23:31:48
合計ジャッジ時間 3,654 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 59 WA * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 && N % 5 != 0|| N == 2)
            {
                Console.WriteLine("Sosu!");
            }else if(N == 6 || N == 28)
            {
                Console.WriteLine("Kanzensu!");
            }
            else
            {
                Console.WriteLine(N);
            }
        }
    }
}
0