結果
問題 |
No.3241 Make Multiplication of 8
|
ユーザー |
|
提出日時 | 2025-08-29 13:19:04 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 263 bytes |
コンパイル時間 | 639 ms |
コンパイル使用メモリ | 82,472 KB |
実行使用メモリ | 77,348 KB |
最終ジャッジ日時 | 2025-08-29 13:19:09 |
合計ジャッジ時間 | 4,836 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 WA * 9 |
ソースコード
N = int(input()) cnt = [0] * 4 for _ in range(N): a, b = map(int, input().split()) two = 0 while a % 2 == 0: a //= 2 two += 1 cnt[min(3, two)] += b ans = cnt[3] + min(cnt[1], cnt[2]) + (cnt[1] - min(cnt[1], cnt[2])) // 3 print(ans)