結果

問題 No.48 ロボットの操縦
コンテスト
ユーザー 田山悠人
提出日時 2022-04-26 14:07:33
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 687 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 356 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 15,612 KB
最終ジャッジ日時 2026-03-16 18:53:00
合計ジャッジ時間 3,667 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def main():

    inp = [input() for i in range(3)]

    long = [int(inp[0]), int(inp[1])]
    

    count1 = 0
    K1 = [int(0), int(inp[2])]
    for (i, j) in zip(long, K1):
        g1 = i -j
        count1 = count1 + 1
        if g1 <= 0:
            break

    count2 = 0
    K2 = [int(inp[2]), int(0)]
    for (i, j) in zip(long, K2):
        g2 = i - j
        count2 = count2 + 1
        if g2 <= 0:
            break

    if inp[0] == 0: 
        a = 0
    else:
        a = 1
    
    if inp[1] == 0:
        b = 0
    elif inp[0] == 0:
        b =0
    elif inp[0] == 0 and inp[1] < 0:
        b = 2
    else:
        b = 1
    
    ans = count1 + count2 + a + b
    print(ans)
0