結果
| 問題 |
No.1286 Stone Skipping
|
| コンテスト | |
| ユーザー |
c-yan
|
| 提出日時 | 2020-11-13 21:59:31 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 413 bytes |
| コンパイル時間 | 369 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 21,376 KB |
| 最終ジャッジ日時 | 2024-07-22 20:49:02 |
| 合計ジャッジ時間 | 6,539 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 2 |
| other | -- * 26 |
ソースコード
D = int(input())
def f(x):
result = 0
while x != 0:
result += x
x //= 2
if result >= D:
break
return result
for i in range(60, 0, -1):
t = D * (2 ** (i - 1)) // (2 ** i - 1)
if f(t) == D:
for j in range(10, -1, -1):
if t < 0:
continue
if f(t - j) == D:
print(t - j)
exit()
c-yan