/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 13ms 2.77 MiB
#2 Accepted 14ms 2.883 MiB
#3 Accepted 457ms 3.23 MiB
#4 Accepted 429ms 3.602 MiB

Code

T=int(input())
for i in range(T):
    n = int(input())
    count = n // 2 if n % 2 == 0 else (n - 1) // 2
    if (n%2==0):
        print(count-1)
    else:
        print(count)

Information

Submit By
Type
Submission
Problem
P1073 Pair Sum
Contest
Bangladesh 2.0
Language
Python 3 (Python 3.12.3)
Submit At
2024-08-16 16:52:24
Judged At
2024-08-16 16:52:24
Judged By
Score
100
Total Time
457ms
Peak Memory
3.602 MiB