/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 14ms 2.949 MiB
#2 Wrong Answer 15ms 3.02 MiB
#3 Wrong Answer 22ms 3.02 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-11-11 03:40:48
Judged By
Score
10
Total Time
22ms
Peak Memory
3.02 MiB