結果
問題 | No.571 3人兄弟(その2) |
ユーザー |
|
提出日時 | 2017-11-02 13:00:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 1,542 bytes |
コンパイル時間 | 167 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-22 13:12:21 |
合計ジャッジ時間 | 1,383 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
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()