728x90
반응형
단순 사칙연산 문제이다. 11522번 Sum Kind of Problem과 비슷한 문제이다.
for _ in range(int(input())):
N = int(input())
s1 = N*(N+1)//2
s2 = int((N*2)*(N/2))
s3 = int((N*2+2)*(N/2))
print(s1, s2, s3)
728x90
반응형
'Agorithm > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 14541번 Speed Limit(python) (0) | 2021.03.08 |
---|---|
백준 알고리즘 13225번 Divisors(python) (0) | 2021.03.08 |
백준 알고리즘 12790번 Mini Fantasy War(python) (0) | 2021.03.08 |
백준 알고리즘 12833번 XORXORXOR(python) (0) | 2021.03.08 |
백준 알고리즘 11772번 POT(python) (0) | 2021.03.08 |