結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
matsu7874
|
| 提出日時 | 2015-10-26 10:25:33 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 424 bytes |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-13 09:18:34 |
| 合計ジャッジ時間 | 14,534 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 18 RE * 8 |
ソースコード
def get_divisors(n):
# 約数列挙
divisors = set()
for i in range(1, int(n**0.5) + 1):
if n % i == 0:
divisors.add(i)
divisors.add(n // i)
list(divisors)
return divisors
N = int(input())
d = get_divisors(N)
if len(d) > 4:
print('YES')
elif len(d) == 4:
d.sort()
if d[1]*d[1] == d[2]:
print('YES')
else:
print('NO')
else:
print('NO')
matsu7874