/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 14ms 3.344 MiB
#2 Wrong Answer 15ms 3.074 MiB
#3 Wrong Answer 21ms 3.121 MiB

Code

'''CODED BY mahmudulsakib2019
 DATE:-16/03/2024; TIME:-14:19 PM
  BANGALDESH , SYLHET'''
def max_matches():
    T = int(input().strip())
    for _ in range(T):
        N = int(input().strip())
        matches = N * (N - 1) // 2
        while N > 1:
            N = N // 2 + N % 2
            matches += N // 2
        print(matches)

max_matches()
        
    
            
  

Information

Submit By
Type
Submission
Problem
P1026 LUFA cup 2024
Language
Python 3 (Python 3.12.3)
Submit At
2024-03-16 08:19:57
Judged At
2024-11-11 03:40:48
Judged By
Score
10
Total Time
21ms
Peak Memory
3.344 MiB