結果
問題 |
No.3241 Make Multiplication of 8
|
ユーザー |
![]() |
提出日時 | 2025-08-22 21:05:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 148 ms / 2,000 ms |
コード長 | 230 bytes |
コンパイル時間 | 367 ms |
コンパイル使用メモリ | 82,064 KB |
実行使用メモリ | 76,644 KB |
最終ジャッジ日時 | 2025-08-22 21:05:24 |
合計ジャッジ時間 | 3,915 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
n = int(input()) d = [0] * 4 for _ in range(n): a, b = map(int, input().split()) d[min((a & -a).bit_length() - 1, 3)] += b ans = d[3] t = min(d[1], d[2]) ans += t d[1] -= t d[2] -= t ans += d[2] // 2 + d[1] // 3 print(ans)