結果
| 問題 |
No.3023 Utility is Max?
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-16 16:28:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 439 bytes |
| コンパイル時間 | 278 ms |
| コンパイル使用メモリ | 81,640 KB |
| 実行使用メモリ | 53,496 KB |
| 最終ジャッジ日時 | 2025-04-16 16:29:05 |
| 合計ジャッジ時間 | 2,395 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 17 |
ソースコード
n = int(input())
if n < (True + True):
print("NO")
else:
is_prime = True
i_list = []
i_list.append(None)
i_list.append(None)
i = len(i_list)
while True:
sum_i_squared = sum(i for _ in range(i))
if sum_i_squared > n:
break
if n % i == 0:
is_prime = False
break
i_list.append(None)
i = len(i_list)
print("YES" if is_prime else "NO")
lam6er