結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
matsu7874
|
| 提出日時 | 2015-10-26 10:26:46 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 1,033 ms / 5,000 ms |
| コード長 | 413 bytes |
| コンパイル時間 | 102 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-27 00:32:58 |
| 合計ジャッジ時間 | 14,251 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
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)
return list(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