Submission #64511155


Source Code Expand

Copy
n = int(input())
tmp = 2
ans = 0
from math import isqrt
while n >= tmp:
c = isqrt(n // tmp)
ans += (c + 1) // 2
tmp *= 2
print(ans)
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
n = int(input())
tmp = 2
ans = 0
from math import isqrt

while n >= tmp:
    c = isqrt(n // tmp)
    ans += (c + 1) // 2
    tmp *= 2
print(ans)

Submission Info

Submission Time
Task C - 2^a b^2
User juten
Language Python (PyPy 3.10-v7.3.12)
Score 350
Code Size 155 Byte
Status AC
Exec Time 57 ms
Memory 76760 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 350 / 350
Status
AC × 3
AC × 29
Set Name Test Cases
Sample example_00.txt, example_01.txt, example_02.txt
All example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, hand_06.txt, hand_07.txt, hand_08.txt, hand_09.txt, hand_10.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt
Case Name Status Exec Time Memory
example_00.txt AC 54 ms 76220 KB
example_01.txt AC 55 ms 76632 KB
example_02.txt AC 55 ms 76564 KB
hand_00.txt AC 55 ms 76340 KB
hand_01.txt AC 57 ms 76484 KB
hand_02.txt AC 56 ms 76552 KB
hand_03.txt AC 56 ms 76756 KB
hand_04.txt AC 56 ms 76520 KB
hand_05.txt AC 56 ms 76760 KB
hand_06.txt AC 57 ms 76572 KB
hand_07.txt AC 56 ms 76400 KB
hand_08.txt AC 57 ms 76560 KB
hand_09.txt AC 57 ms 76316 KB
hand_10.txt AC 56 ms 76592 KB
random_00.txt AC 56 ms 76452 KB
random_01.txt AC 56 ms 76292 KB
random_02.txt AC 56 ms 76384 KB
random_03.txt AC 56 ms 76604 KB
random_04.txt AC 55 ms 76420 KB
random_05.txt AC 55 ms 76532 KB
random_06.txt AC 55 ms 76452 KB
random_07.txt AC 57 ms 76412 KB
random_08.txt AC 57 ms 76516 KB
random_09.txt AC 56 ms 76568 KB
random_10.txt AC 55 ms 76712 KB
random_11.txt AC 55 ms 76596 KB
random_12.txt AC 56 ms 76556 KB
random_13.txt AC 55 ms 76268 KB
random_14.txt AC 55 ms 76236 KB


2025-04-07 (Mon)
15:44:01 +09:00