結果
| 問題 |
No.2921 Seated in Classroom
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 14:40:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 604 ms / 2,000 ms |
| コード長 | 494 bytes |
| コンパイル時間 | 164 ms |
| コンパイル使用メモリ | 82,328 KB |
| 実行使用メモリ | 90,112 KB |
| 最終ジャッジ日時 | 2024-10-12 14:40:46 |
| 合計ジャッジ時間 | 4,622 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
#n = int(input())
#alist = list(map(int,input().split()))
#alist = []
for i in range(int(input())):
n,m = map(int,input().split())
l,r = 0,10**9
for _ in range(30):
mid = (l+r)//2
if mid * 4 >= n and mid*8 >= n+m:
r = mid
else:
l = mid
print(r)