結果
| 問題 | No.2921 Seated in Classroom |
| コンテスト | |
| ユーザー |
ありあけ
|
| 提出日時 | 2024-10-12 14:47:13 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 381 bytes |
| コンパイル時間 | 325 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 36,992 KB |
| 最終ジャッジ日時 | 2024-10-12 14:47:31 |
| 合計ジャッジ時間 | 5,410 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | WA * 5 |
ソースコード
T = int(input())
query = []
for i in range(T):
n,m = map(int,input().split())
query.append([n,m])
for q in query:
N = q[0]
M = q[1]
need = (N-1)//4 + 1
amari = need*4 - N
# print(need,amari)
M -= amari
if need*4 >= M:
print(need)
continue
else:
M -= need*4
nokori = M //8 + 1
print(need + nokori)
ありあけ