結果
問題 |
No.3023 Utility is Max?
|
ユーザー |
![]() |
提出日時 | 2025-04-16 00:21:43 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 439 bytes |
コンパイル時間 | 186 ms |
コンパイル使用メモリ | 81,708 KB |
実行使用メモリ | 53,800 KB |
最終ジャッジ日時 | 2025-04-16 00:23:24 |
合計ジャッジ時間 | 2,614 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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")