結果

問題 No.1286 Stone Skipping
ユーザー proriboneproribone
提出日時 2020-11-13 22:20:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 245 bytes
コンパイル時間 635 ms
コンパイル使用メモリ 82,448 KB
実行使用メモリ 59,260 KB
最終ジャッジ日時 2024-07-22 21:09:16
合計ジャッジ時間 2,557 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

def check(x,D):
    res=0
    while(x):
        res+=x
        x//=2
        if res==D:
            return True
    return False

D=int(input())
ans=D
for x in range(max(0,D//2-200),D//2+200):
    if check(x,D):
        ans=min(ans,x)
print(ans)
0