728x90
반응형
단순 수학 문제이다.
for _ in range(int(input())):
k, N = map(int, input().split())
s1 = N*(N+1)//2
s2 = int((N*2)*(N/2))
s3 = int((N*2+2)*(N/2))
print(k, s1, s2, s3)
728x90
반응형
'Agorithm > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 11874번 ZAMKA(python) (0) | 2021.03.08 |
---|---|
백준 알고리즘 11908번 카드(python) (0) | 2021.03.08 |
백준 알고리즘 2599번 수열(python) (0) | 2021.03.07 |
백준 알고리즘 6588번 골드바흐의 추측(python) (0) | 2021.03.07 |
백준 알고리즘 2961번 도영이가 만든 맛있는 음식(python) (0) | 2021.03.07 |