結果
問題 |
No.1286 Stone Skipping
|
ユーザー |
|
提出日時 | 2020-11-18 00:29:28 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 443 bytes |
コンパイル時間 | 285 ms |
コンパイル使用メモリ | 82,316 KB |
実行使用メモリ | 82,648 KB |
最終ジャッジ日時 | 2024-07-23 08:35:21 |
合計ジャッジ時間 | 3,938 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 TLE * 1 |
other | -- * 26 |
ソースコード
D = int(input()) K = 64 ans = D for k in range(1,K+1): high = D low = 1 while abs(high - low) > 1: mid = (high-low) dist = 0 x = mid for n in range(k): dist += x x //= 2 if dist >= D: high = mid else: low = mid v = 0 x = high for i in range(k): v += x x //= 2 if (v == D): ans = high print(ans)