mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-07-07 18:06:58 +08:00
Upload ABC400 codes
This commit is contained in:
20
AtCoder/ABC_400/C.py
Normal file
20
AtCoder/ABC_400/C.py
Normal file
@ -0,0 +1,20 @@
|
||||
import math
|
||||
|
||||
N = int(input())
|
||||
|
||||
count = 0
|
||||
e = 1
|
||||
|
||||
while True:
|
||||
t = 1 << e
|
||||
if t > N:
|
||||
break
|
||||
Q = N // t
|
||||
if Q == 0:
|
||||
e += 1
|
||||
continue
|
||||
m = math.isqrt(Q)
|
||||
cnt += (m + 1) // 2
|
||||
e += 1
|
||||
|
||||
print(cnt)
|
Reference in New Issue
Block a user