Files
kattis/chanukah.py
2023-06-26 14:26:48 +02:00

5 lines
125 B
Python

p = int(input())
for _ in range(1, p + 1):
k, n = map(int, input().split())
print(f"{k} {( n * (n + 1) ) // 2 + n}")