結果

問題 No.1010 折って重ねて
ユーザー now4est
提出日時 2020-03-20 22:32:30
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 620 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-12-15 06:49:17
合計ジャッジ時間 2,574 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 40 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

x,y,h = map(int, sys.stdin.readline().strip().split())

count = 0

x = x * 100 * 10
y = y * 100 * 10

def do(n, h, count):
    n = int(n / 2)
    h = h * 2
    count += 1
    return (n, h, count)


while True:
    if y >= x:
        if x >= 2 and x > h:
            x, h, count = do(x, h, count)
        elif y >= 2 and y > h:
            y, h, count = do(y, h, count)
        else:
            break
    elif x >= y:
        if y >= 2 and y > h:
            y, h, count = do(y, h, count)
        elif x >= 2 and x > h:
            x, h, count = do(x, h, count)
        else:
            break

print(count)
0