結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
hayashi
|
| 提出日時 | 2019-10-17 11:11:43 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 120 ms / 5,000 ms |
| コード長 | 672 bytes |
| コンパイル時間 | 1,020 ms |
| コンパイル使用メモリ | 112,152 KB |
| 実行使用メモリ | 25,936 KB |
| 最終ジャッジ日時 | 2024-06-24 00:13:37 |
| 合計ジャッジ時間 | 3,509 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
ulong N = ulong.Parse(Console.ReadLine());
ulong count = 0;
for (ulong i = 2; i * i < N; i++)
{
while(N % i == 0)
{
count++;
N /= i;
}
}
if(N != 1)
{
count++;
}
if (count > 2)
{
Console.WriteLine("YES");
}
else
{
Console.WriteLine("NO");
}
}
}
}
hayashi