728x90
반응형
단순 사칙연산 문제이다.
for _ in range(int(input())):
N = int(input())
print(sum([n for n in range(1, N+1) if n%2]))
728x90
반응형
'Agorithm > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 9848번 Gift(python) (0) | 2021.02.23 |
---|---|
백준 알고리즘 9724번 Perfect Cube(python) (0) | 2021.02.23 |
백준 알고리즘 9699번 RICE SACK(python) (0) | 2021.02.23 |
백준 알고리즘 9622번 Cabin Baggage(python) (0) | 2021.02.23 |
백준 알고리즘 9610번 사분면(python) (0) | 2021.02.23 |