結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2016-04-13 09:30:13 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 587 bytes |
コンパイル時間 | 783 ms |
コンパイル使用メモリ | 112,656 KB |
実行使用メモリ | 25,820 KB |
最終ジャッジ日時 | 2024-10-04 07:14:05 |
合計ジャッジ時間 | 2,930 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 24 WA * 2 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; namespace No36_1{ public class Program{ public static void Main(string[] args){ var input = long.Parse(Console.ReadLine()); var tmp = input; var cnt = 0; for(long i = 2; i * i <= input; i++){ while(tmp % i == 0){ tmp /= i; cnt++; if(cnt == 2) { Console.WriteLine("YES"); return; } } } Console.WriteLine("NO"); } } }