結果
| 問題 |
No.889 素数!
|
| コンテスト | |
| ユーザー |
1644吉田英陽
|
| 提出日時 | 2020-11-09 21:39:43 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,589 bytes |
| コンパイル時間 | 1,085 ms |
| コンパイル使用メモリ | 111,992 KB |
| 実行使用メモリ | 26,052 KB |
| 最終ジャッジ日時 | 2024-07-22 16:21:34 |
| 合計ジャッジ時間 | 4,554 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 50 WA * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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();
}
}
}
}
1644吉田英陽