Сенюшкина Алина Константиновна 321 CubeSum 1559 | Мельников Алексей, Севастополь CubeSum 1285 | ||||
---|---|---|---|---|---|
n | 1 | n = eval(input()) | n | 1 | N = int(input()) |
2 | a = 1 | 2 | A = 1 | ||
3 | b = int(n ** (1 / 3)) | 3 | B = int(N ** (1 / 3)) | ||
4 | count = 0 | 4 | count = 0 | ||
n | 5 | while a <= b: | n | 5 | while A <= B: |
6 | if a ** 3 + b ** 3 > n: | 6 | if A ** 3 + B ** 3 > N: | ||
7 | b -= 1 | 7 | B -= 1 | ||
8 | elif a ** 3 + b ** 3 < n: | 8 | elif A ** 3 + B ** 3 < N: | ||
9 | a += 1 | 9 | A += 1 | ||
10 | else: | 10 | else: | ||
11 | count += 1 | 11 | count += 1 | ||
t | 12 | a += 1 | t | 12 | A += 1 |
13 | print(count) | 13 | print(count) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|