1
2
3
4
5
6
|
def sol(n):
if n%2 == 0 : ans = n//2 -1
else : ans = n//2
return ans
for i in range(int(input())):
print(sol(int(input())))
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 905. Sort Array By Parity (0) | 2022.05.02 |
---|---|
codeforces 1352A - Sum of Round Numbers (0) | 2022.05.02 |
codeforces 1154A - Restoring Three Numbers (0) | 2022.04.29 |
codeforces 486A - Calculating Function (0) | 2022.04.29 |
codeforces 155A - I_love_\%username\% (0) | 2022.04.29 |
댓글