結果
問題 | No.2939 Sigma Popcount Problem |
ユーザー |
|
提出日時 | 2024-11-28 22:21:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 794 ms / 2,000 ms |
コード長 | 138 bytes |
コンパイル時間 | 305 ms |
コンパイル使用メモリ | 82,124 KB |
実行使用メモリ | 76,628 KB |
最終ジャッジ日時 | 2024-11-28 22:21:58 |
合計ジャッジ時間 | 9,707 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
t=int(input()) for _ in range(t): n=int(input())+1 ans=0 for i in range(60): ans+=n//2**(i+1)*2**i+max(0,n%2**(i+1)-2**i) print(ans)