結果
| 問題 | No.3431 popcount & sum (Easy) |
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2026-01-29 17:49:55 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 72 ms / 2,000 ms |
| コード長 | 192 bytes |
| 記録 | |
| コンパイル時間 | 350 ms |
| コンパイル使用メモリ | 82,280 KB |
| 実行使用メモリ | 61,440 KB |
| 最終ジャッジ日時 | 2026-01-29 17:49:57 |
| 合計ジャッジ時間 | 1,304 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
MOD = 998244353
N = int(input())
ans = 0
for a in range(N+1):
for b in range(a, N+1):
if a.bit_count() == b.bit_count():
ans += a&b
ans %= MOD
print(ans)
detteiuu