結果

問題 No.1010 折って重ねて
ユーザー Tsubo
提出日時 2020-03-21 09:55:54
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 456 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-17 23:21:10
合計ジャッジ時間 3,438 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 43
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
def main():
    #入力
    readline=stdin.readline
    x,y,h=map(lambda x:int(x)*(2**40),readline().split())
    x*=1000
    y*=1000

    count=0
    while True:
        if x<=y:
            if h<x: x//=2
            elif h<y: y//=2
            else: break
        else:
            if h<y: y//=2
            elif h<x: x//=2
            else: break
        count+=1
        h*=2

    print(count)

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