T=int(input()) for _ in range(T): n,x=map(int,input().split()) s=n*(n+1)//2 if x