結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2016-10-27 14:20:00 |
言語 | PyPy2 (7.3.15) |
結果 |
AC
|
実行時間 | 239 ms / 5,000 ms |
コード長 | 251 bytes |
コンパイル時間 | 633 ms |
コンパイル使用メモリ | 77,056 KB |
実行使用メモリ | 76,840 KB |
最終ジャッジ日時 | 2024-06-27 00:50:35 |
合計ジャッジ時間 | 5,964 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
import math N = input() rootN = int(math.sqrt(N)) i = 2 c = 0 while i <= rootN: while N % i == 0: N /= i c += 1 if c > 2: print 'YES' exit() i += 1 if c == 2 and N > 1: print 'YES' else: print 'NO'