Submission #64516870
Source Code Expand
N = int(input())
i = 1
base = 2
ans = 0
while base <= N:
l = 1
r = 10**9
while r - l > 1:
m = (l+r)//2
if base * m * m <= N:
l = m
else:
r = m - 1
if base * r * r <= N:
l = r
ans += l//2+l%2
# print(base, l)
base *= 2
print(ans)
Submission Info
| Submission Time | |
|---|---|
| Task | C - 2^a b^2 |
| User | ht177970 |
| Language | Python (PyPy 3.10-v7.3.12) |
| Score | 350 |
| Code Size | 329 Byte |
| Status | AC |
| Exec Time | 67 ms |
| Memory | 81224 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 350 / 350 | ||||
| Status |
|
|
| 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 | 61 ms | 76308 KiB |
| example_01.txt | AC | 60 ms | 76500 KiB |
| example_02.txt | AC | 63 ms | 76600 KiB |
| hand_00.txt | AC | 61 ms | 76464 KiB |
| hand_01.txt | AC | 61 ms | 76216 KiB |
| hand_02.txt | AC | 60 ms | 76344 KiB |
| hand_03.txt | AC | 63 ms | 81092 KiB |
| hand_04.txt | AC | 66 ms | 81136 KiB |
| hand_05.txt | AC | 67 ms | 80916 KiB |
| hand_06.txt | AC | 65 ms | 81072 KiB |
| hand_07.txt | AC | 67 ms | 80916 KiB |
| hand_08.txt | AC | 66 ms | 81156 KiB |
| hand_09.txt | AC | 64 ms | 80872 KiB |
| hand_10.txt | AC | 65 ms | 80772 KiB |
| random_00.txt | AC | 63 ms | 76452 KiB |
| random_01.txt | AC | 64 ms | 76676 KiB |
| random_02.txt | AC | 62 ms | 76604 KiB |
| random_03.txt | AC | 60 ms | 76244 KiB |
| random_04.txt | AC | 60 ms | 76316 KiB |
| random_05.txt | AC | 66 ms | 81080 KiB |
| random_06.txt | AC | 65 ms | 81224 KiB |
| random_07.txt | AC | 65 ms | 80968 KiB |
| random_08.txt | AC | 67 ms | 81116 KiB |
| random_09.txt | AC | 65 ms | 80944 KiB |
| random_10.txt | AC | 66 ms | 80708 KiB |
| random_11.txt | AC | 65 ms | 80816 KiB |
| random_12.txt | AC | 66 ms | 80940 KiB |
| random_13.txt | AC | 65 ms | 81100 KiB |
| random_14.txt | AC | 64 ms | 80900 KiB |