結果

問題 No.1286 Stone Skipping
ユーザー 👑 tamatotamato
提出日時 2020-11-13 21:26:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 424 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 87,604 KB
実行使用メモリ 76,148 KB
最終ジャッジ日時 2023-09-30 02:32:46
合計ジャッジ時間 3,642 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,540 KB
testcase_01 WA -
testcase_02 AC 73 ms
75,704 KB
testcase_03 AC 71 ms
71,620 KB
testcase_04 AC 71 ms
71,964 KB
testcase_05 WA -
testcase_06 AC 71 ms
71,960 KB
testcase_07 AC 71 ms
71,816 KB
testcase_08 AC 71 ms
71,748 KB
testcase_09 AC 75 ms
71,704 KB
testcase_10 AC 71 ms
71,652 KB
testcase_11 AC 71 ms
71,544 KB
testcase_12 AC 70 ms
72,000 KB
testcase_13 AC 74 ms
75,712 KB
testcase_14 AC 74 ms
75,688 KB
testcase_15 WA -
testcase_16 AC 76 ms
75,780 KB
testcase_17 AC 73 ms
75,640 KB
testcase_18 AC 73 ms
71,508 KB
testcase_19 AC 74 ms
71,716 KB
testcase_20 AC 74 ms
75,668 KB
testcase_21 AC 73 ms
75,728 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 72 ms
75,668 KB
testcase_26 AC 73 ms
75,640 KB
testcase_27 AC 73 ms
75,824 KB
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    D = int(input())
    ok = D
    ng = 0
    mid = (ok+ng)//2
    while ok - ng > 1:
        tmp = 0
        x = mid
        while x:
            tmp += x
            x //= 2
        if tmp >= D:
            ok = mid
        else:
            ng = mid
        mid = (ok+ng)//2
    print(ok)


if __name__ == '__main__':
    main()
0