結果

問題 No.889 素数!
ユーザー hayashi
提出日時 2019-10-16 14:43:49
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 776 bytes
コンパイル時間 1,929 ms
コンパイル使用メモリ 110,204 KB
実行使用メモリ 17,920 KB
最終ジャッジ日時 2024-06-12 23:35:38
合計ジャッジ時間 5,311 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 61
権限があれば一括ダウンロードができます
コンパイルメッセージ
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