結果

問題 No.571 3人兄弟(その2)
ユーザー mokraimokrai
提出日時 2017-11-02 13:00:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 1,542 bytes
コンパイル時間 125 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-05-02 03:05:11
合計ジャッジ時間 1,027 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,880 KB
testcase_01 AC 26 ms
10,752 KB
testcase_02 AC 27 ms
10,752 KB
testcase_03 AC 26 ms
10,880 KB
testcase_04 AC 28 ms
10,880 KB
testcase_05 AC 28 ms
10,752 KB
testcase_06 AC 28 ms
10,752 KB
testcase_07 AC 26 ms
10,752 KB
testcase_08 AC 25 ms
10,752 KB
testcase_09 AC 26 ms
10,880 KB
testcase_10 AC 26 ms
10,752 KB
testcase_11 AC 25 ms
10,880 KB
testcase_12 AC 25 ms
10,752 KB
testcase_13 AC 25 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    ha, wa = map(int, input().split())
    hb, wb = map(int, input().split())
    hc, wc = map(int, input().split())

    if ha == hb:
        if wa > wb:
            a_is_better_than_b = False
        else:
            a_is_better_than_b = True
    elif ha > hb:
        a_is_better_than_b = True
    else:
        a_is_better_than_b = False

    if ha == hc:
        if wa > wc:
            a_is_better_than_c = False
        else:
            a_is_better_than_c = True
    elif ha > hc:
        a_is_better_than_c = True
    else:
        a_is_better_than_c = False

    if hb == hc:
        if wb > wc:
            b_is_better_than_c = False
        else:
            b_is_better_than_c = True
    elif hb > hc:
        b_is_better_than_c = True
    else:
        b_is_better_than_c = False

    if a_is_better_than_b:
        if b_is_better_than_c:
            print("A")
            print("B")
            print("C")
        else:
            if a_is_better_than_c:
                print("A")
                print("C")
                print("B")
            else:
                print("C")
                print("A")
                print("B")
    else:
        if a_is_better_than_c:
            print("B")
            print("A")
            print("C")
        else:
            if b_is_better_than_c:
                print("B")
                print("C")
                print("A")
            else:
                print("C")
                print("B")
                print("A")

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