/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 12ms 3.027 MiB
#2 Wrong Answer 12ms 2.777 MiB
#3 Wrong Answer 23ms 2.887 MiB
#4 Wrong Answer 12ms 2.887 MiB
#5 Wrong Answer 127ms 2.977 MiB
#6 Wrong Answer 74ms 2.883 MiB
#7 Wrong Answer 54ms 2.875 MiB
#8 Wrong Answer 235ms 3.039 MiB

Code

'''CODED BY mahmudulsakib2019
 DATE:-16/03/2024; TIME:-13:31 PM
  BANGALDESH , SYLHET'''
t = int(input())
for _ in range(t):
    n = int(input())
    if n>1:
      game=int((n/2)*(n-1))
      num=n-1
      i=1
      main =2**(i-1)
      while 2**i<=num:
          if 2**i>num:
              main=2**(i-1)
              break
          i+=1
      while main >=1:
          main /=2
          game+=1
      print(game)
    else:
        print(0)

        
    
            
  

Information

Submit By
Type
Submission
Problem
P1026 LUFA cup 2024
Language
Python 3 (Python 3.12.3)
Submit At
2024-03-16 07:34:54
Judged At
2024-03-16 07:34:54
Judged By
Score
10
Total Time
235ms
Peak Memory
3.039 MiB