結果

問題 No.2921 Seated in Classroom
ユーザー やまがたがた
提出日時 2024-10-12 20:53:28
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 200 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-12 20:53:36
合計ジャッジ時間 6,982 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
    N, M = map(int, input().split())
    tx = (N + 3) // 4
    M -= 4 * tx + (4 - N % 4)
    if M <= 0:
        print(tx)
    else:
        print(tx + (M + 7) // 8)
0