結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
kutsutama
|
| 提出日時 | 2018-03-14 10:39:53 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 238 bytes |
| コンパイル時間 | 88 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 21,504 KB |
| 最終ジャッジ日時 | 2024-11-26 10:06:17 |
| 合計ジャッジ時間 | 103,235 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 11 TLE * 15 |
ソースコード
import math
n = int(input())
sq = math.ceil(math.sqrt(n))
cnt = 0
d = 2
while n > 1 or 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