結果
問題 | No.889 素数! |
ユーザー |
![]() |
提出日時 | 2019-10-25 20:58:13 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 1,116 bytes |
コンパイル時間 | 3,121 ms |
コンパイル使用メモリ | 110,452 KB |
実行使用メモリ | 26,728 KB |
最終ジャッジ日時 | 2024-07-22 10:12:16 |
合計ジャッジ時間 | 4,614 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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.
ソースコード
using System; using System.Linq; using System.Collections.Generic; using System.IO; class MyClass { public static void Solve() { var N = int.Parse(Console.ReadLine()); var sosu = new[] { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61 }; if (sosu.Contains(N)) { Console.WriteLine("Sosu!"); return; } var heihosu = new[] { 4, 9, 16, 25, 36, 49 }; if (heihosu.Contains(N)) { Console.WriteLine("Heihosu!"); return; } var ripposu = new[] { 8, 27 }; if (ripposu.Contains(N)) { Console.WriteLine("Ripposu!"); return; } var kanzensu = new[] { 6, 28 }; if (kanzensu.Contains(N)) { Console.WriteLine("Kanzensu!"); return; } Console.WriteLine(N); } public static void Main() { var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }; Console.SetOut(sw); Solve(); Console.Out.Flush(); } }