結果

問題 No.1286 Stone Skipping
ユーザー zentsu999
提出日時 2020-11-13 22:26:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 355 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 17,828 KB
最終ジャッジ日時 2024-07-22 21:19:36
合計ジャッジ時間 4,690 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20 TLE * 1 -- * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

D=int(input())
L=D//2
R=D
while L!=R:
    now=(L+R)//2
    count=0
    while count<D and now>0:
        count+=now
        now//=2
    if count>=D:
        R=(L+R)//2
    else:
        L=(L+R)//2+1
while L<D:
    count=0
    now=L
    while count<D:
        count+=now
        now//=2
    if count==D:
        break
    L+=1
print(L)
0