Click Here to go back to the homepage.

Chanukah Challenge Solution:


cases = int(input())
for _ in range(cases):
    line = input().split()
    print(F"{line[0]} {int(int(line[1]) * (int(line[1])+1) / 2 + int(line[1]))}")