結果
問題 |
No.3296 81-like number
|
ユーザー |
|
提出日時 | 2025-10-09 10:20:24 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 220 ms / 2,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 314 ms |
コンパイル使用メモリ | 12,160 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2025-10-09 10:20:28 |
合計ジャッジ時間 | 2,977 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
ソースコード
def is_prime(x): if x < 2: return False for i in range(2, int(x**0.5)+1): if x % i == 0: return False return True n = int(input()) ans = set() for i in range(2, int(n**0.5)+1): if is_prime(i): power = i * i while power <= n: ans.add(power) power *= i print(sum(ans))