結果

問題 No.1286 Stone Skipping
ユーザー neterukunneterukun
提出日時 2020-11-13 21:42:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 504 ms
コンパイル使用メモリ 86,940 KB
実行使用メモリ 76,232 KB
最終ジャッジ日時 2023-09-30 02:40:13
合計ジャッジ時間 7,005 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
75,700 KB
testcase_01 AC 130 ms
75,720 KB
testcase_02 AC 197 ms
75,864 KB
testcase_03 AC 129 ms
75,868 KB
testcase_04 AC 129 ms
75,864 KB
testcase_05 AC 134 ms
75,704 KB
testcase_06 AC 127 ms
75,580 KB
testcase_07 AC 160 ms
75,680 KB
testcase_08 AC 160 ms
75,588 KB
testcase_09 AC 160 ms
75,720 KB
testcase_10 AC 155 ms
75,624 KB
testcase_11 AC 158 ms
75,624 KB
testcase_12 AC 160 ms
75,612 KB
testcase_13 AC 217 ms
75,692 KB
testcase_14 AC 218 ms
75,620 KB
testcase_15 AC 219 ms
75,924 KB
testcase_16 AC 218 ms
75,692 KB
testcase_17 AC 215 ms
75,592 KB
testcase_18 AC 129 ms
75,468 KB
testcase_19 AC 129 ms
75,636 KB
testcase_20 AC 220 ms
75,660 KB
testcase_21 AC 219 ms
75,576 KB
testcase_22 AC 160 ms
75,728 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 222 ms
75,620 KB
testcase_26 AC 220 ms
75,580 KB
testcase_27 AC 220 ms
75,700 KB
testcase_28 AC 222 ms
75,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())

ans = d
res = d // 2

for val in range(d // 2, d // 2 + 1000000):
    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