結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
kutsutama
|
| 提出日時 | 2018-03-14 11:35:11 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 239 bytes |
| コンパイル時間 | 195 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-27 06:58:58 |
| 合計ジャッジ時間 | 28,754 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 WA * 8 |
ソースコード
import math
n = int(input())
sq = math.ceil(math.sqrt(n))
cnt = 0
d = 2
while n > 1 and d <= sq:
if n % d == 0:
cnt += 1
if cnt >= 3:
break
n //= d
else:
d += 1
res = 'NO'
if cnt >= 3:
res = 'YES'
print(res)
kutsutama