/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 15ms 3.109 MiB
#2 Accepted 15ms 2.961 MiB
#3 Accepted 536ms 3.559 MiB
#4 Accepted 535ms 3.934 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-10-03 13:25:21
Judged By
Score
100
Total Time
536ms
Peak Memory
3.934 MiB