/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 15ms 3.02 MiB
#2 Accepted 16ms 2.953 MiB
#3 Accepted 520ms 3.574 MiB
#4 Accepted 525ms 3.902 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-11-11 03:13:40
Judged By
Score
100
Total Time
525ms
Peak Memory
3.902 MiB