結果
| 問題 | No.36 素数が嫌い! |
| コンテスト | |
| ユーザー |
tnoda_
|
| 提出日時 | 2015-07-31 17:25:10 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 5,000 ms |
| + 318µs | |
| コード長 | 250 bytes |
| 記録 | |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 80,512 KB |
| 実行使用メモリ | 81,408 KB |
| 最終ジャッジ日時 | 2026-07-17 17:51:33 |
| 合計ジャッジ時間 | 3,891 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
def factor(x):
i = 2
while i * i <= x:
if x % i == 0:
return i
i += 1
return -1
N = input()
p = factor(N)
if p < 0:
print('NO')
quit()
p = factor(N/p)
if p < 0:
print('NO')
quit()
print('YES')
tnoda_