結果
| 問題 | No.2939 Sigma Popcount Problem |
| コンテスト | |
| ユーザー |
Today03
|
| 提出日時 | 2024-10-18 21:34:13 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 408 ms / 2,000 ms |
| コード長 | 167 bytes |
| 記録 | |
| コンパイル時間 | 184 ms |
| コンパイル使用メモリ | 85,152 KB |
| 実行使用メモリ | 81,116 KB |
| 最終ジャッジ日時 | 2026-05-05 15:03:10 |
| 合計ジャッジ時間 | 5,823 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
for _ in range(int(input())): N=int(input())+1 ans=0 for i in range(50): tw=2**i cnt=N//(tw*2) amr=N%(tw*2) ans+=cnt*tw ans+=max(amr-tw,0) print(ans)
Today03