結果
| 問題 | No.2939 Sigma Popcount Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-14 20:04:01 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 256 bytes |
| 記録 | |
| コンパイル時間 | 882 ms |
| コンパイル使用メモリ | 82,388 KB |
| 実行使用メモリ | 82,868 KB |
| 最終ジャッジ日時 | 2026-09-22 16:51:07 |
| 合計ジャッジ時間 | 7,405 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 TLE * 1 -- * 12 |
ソースコード
def popcount(n):
return bin(n).count('1')
num = int(input()) # テストケースの数
for _ in range(num):
a = int(input()) # 各テストケースのN
result = 0
for i in range(1, a+1):
result += popcount(i)
print(result)