結果
問題 |
No.3296 81-like number
|
ユーザー |
![]() |
提出日時 | 2025-10-05 15:24:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 272 bytes |
コンパイル時間 | 175 ms |
コンパイル使用メモリ | 12,032 KB |
実行使用メモリ | 14,720 KB |
最終ジャッジ日時 | 2025-10-05 15:24:17 |
合計ジャッジ時間 | 1,802 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 RE * 2 |
ソースコード
n = int(input()) n_s = int(n**(1/2)) A=list(range(2,n_s+1)) p=list() while A[0]**2<=n_s: tmp=A[0] p.append(tmp) A=[e for e in A if e%tmp!=0] primes=p+A s = 0 i = 63 for p in primes: while p**i > n: i -= 1 s += (p**(i+1)-1)/(p-1)-(1+p) print(int(s))