Untitled

Anonymous
plain_text
10/15/2024 9:14 PM
296 B
20
Indexable
import sys

input = sys.stdin.readline
N = int(input())

def helper(n,k):
    if k >= n-1:
        return 1
    else:
        return n

for i in range(N):
    n, k = list(map(int, input().split()))
    print(helper(n,k))
Editor is loading...
Leave a Comment