結果

問題 No.1286 Stone Skipping
ユーザー y10y10
提出日時 2020-11-13 22:16:01
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 323 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 10,620 KB
実行使用メモリ 12,764 KB
最終ジャッジ日時 2023-09-30 03:08:40
合計ジャッジ時間 4,142 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,296 KB
testcase_01 AC 15 ms
8,484 KB
testcase_02 AC 15 ms
8,412 KB
testcase_03 AC 15 ms
8,440 KB
testcase_04 AC 15 ms
8,400 KB
testcase_05 AC 15 ms
8,408 KB
testcase_06 AC 15 ms
8,520 KB
testcase_07 AC 15 ms
8,588 KB
testcase_08 AC 14 ms
8,520 KB
testcase_09 AC 15 ms
8,544 KB
testcase_10 AC 15 ms
8,540 KB
testcase_11 AC 16 ms
8,444 KB
testcase_12 AC 15 ms
8,492 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

ma = int(input())
mi = ma//2

x = 0
while True:
    x = 0
    for p in range(60):
        temp = math.floor(mi*(1/2)**p)
        if temp >= 1 and ma - x <= 2*temp:
            x += temp
            if x == ma:
                print(mi)
                exit()
        else:
            mi += 1
            break
0