t=int(input())
for _ in range(t):
x,y=map(int,input().split())
a=y-x
cnt=0
m=1
s=0
while s<a:
s+=m
cnt+=1
if cnt%2==0:
m+=1
print(cnt)
'백준 풀이' 카테고리의 다른 글
백준 1753번 파이썬(다익스트라) (0) | 2022.08.31 |
---|---|
백준 1011번 파이썬 (0) | 2022.08.31 |
백준 1654번 파이썬 (이분탐색) (0) | 2022.08.31 |
백준 14502번 파이썬 (0) | 2022.08.31 |
백준 9020번 파이썬 소수찾기 (0) | 2022.08.31 |