結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2015-11-23 14:26:18 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 392 bytes |
コンパイル時間 | 800 ms |
コンパイル使用メモリ | 105,484 KB |
実行使用メモリ | 21,376 KB |
最終ジャッジ日時 | 2024-09-13 17:16:42 |
合計ジャッジ時間 | 13,210 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | TLE * 1 -- * 25 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; class Program { static void Main() { long n = long.Parse(Console.ReadLine()); int cnt = 0; for (int i = 2; i * i <= n; i++) { while (n % i == 0) { n /= i; cnt++; } } if (cnt >= 3) Console.WriteLine("YES"); else Console.WriteLine("NO"); } }