結果

問題 No.1286 Stone Skipping
ユーザー neterukunneterukun
提出日時 2020-11-13 21:40:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 75,936 KB
最終ジャッジ日時 2023-09-30 02:39:12
合計ジャッジ時間 3,973 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
75,828 KB
testcase_01 AC 77 ms
75,932 KB
testcase_02 AC 85 ms
75,816 KB
testcase_03 AC 78 ms
75,916 KB
testcase_04 AC 77 ms
75,856 KB
testcase_05 AC 78 ms
75,712 KB
testcase_06 AC 77 ms
75,852 KB
testcase_07 AC 86 ms
75,832 KB
testcase_08 AC 80 ms
75,828 KB
testcase_09 AC 81 ms
75,876 KB
testcase_10 AC 80 ms
75,840 KB
testcase_11 AC 81 ms
75,716 KB
testcase_12 AC 82 ms
75,884 KB
testcase_13 AC 88 ms
75,764 KB
testcase_14 AC 88 ms
75,780 KB
testcase_15 AC 89 ms
75,900 KB
testcase_16 AC 88 ms
75,748 KB
testcase_17 AC 87 ms
75,844 KB
testcase_18 AC 78 ms
75,708 KB
testcase_19 AC 76 ms
75,788 KB
testcase_20 AC 87 ms
75,852 KB
testcase_21 AC 87 ms
75,872 KB
testcase_22 AC 84 ms
75,852 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 88 ms
75,768 KB
testcase_26 AC 86 ms
75,820 KB
testcase_27 AC 88 ms
75,812 KB
testcase_28 AC 88 ms
75,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())

ans = d
res = d // 2

for val in range(d // 2, d // 2 + 100000):
    val0 = val
    tmp = val
    val = val >> 1
    while val:
        tmp += val
        if tmp == d:
            ans = min(ans, val0)
            break
        val = val >> 1
print(ans)
    
0