結果

問題 No.1286 Stone Skipping
ユーザー proribone
提出日時 2020-11-13 22:41:11
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 286 bytes
コンパイル時間 366 ms
コンパイル使用メモリ 82,440 KB
実行使用メモリ 76,072 KB
最終ジャッジ日時 2024-07-22 21:40:30
合計ジャッジ時間 3,268 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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