結果
| 問題 | No.2939 Sigma Popcount Problem |
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2024-10-18 22:32:40 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 319 ms / 2,000 ms |
| + 64µs | |
| コード長 | 219 bytes |
| 記録 | |
| コンパイル時間 | 77 ms |
| コンパイル使用メモリ | 80,384 KB |
| 実行使用メモリ | 83,840 KB |
| 最終ジャッジ日時 | 2026-09-19 01:43:43 |
| 合計ジャッジ時間 | 5,374 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
T=int(input())
exp2=[2**i for i in range(71)]
for _ in range(T):
N=int(input())
ans=0
for i in range(70):
tmp=(N+1)%exp2[i+1]
ans+=((N+1)-tmp)//2+max(0,(N+1)%exp2[i+1]-exp2[i])
print(ans)
nikoro256