/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 13ms 2.895 MiB
#2 Wrong Answer 13ms 2.855 MiB
#3 Wrong Answer 17ms 2.898 MiB
#4 Wrong Answer 13ms 2.891 MiB
#5 Wrong Answer 62ms 2.918 MiB
#6 Wrong Answer 47ms 2.895 MiB
#7 Wrong Answer 42ms 2.883 MiB
#8 Wrong Answer 89ms 3.051 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-03-16 08:19:57
Judged By
Score
10
Total Time
89ms
Peak Memory
3.051 MiB