結果

問題 No.571 3人兄弟(その2)
ユーザー rocoderrocoder
提出日時 2017-10-07 16:05:15
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 15 ms / 2,000 ms
コード長 501 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 11,008 KB
実行使用メモリ 7,932 KB
最終ジャッジ日時 2023-08-10 19:30:43
合計ジャッジ時間 991 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,856 KB
testcase_01 AC 15 ms
7,932 KB
testcase_02 AC 14 ms
7,900 KB
testcase_03 AC 14 ms
7,824 KB
testcase_04 AC 14 ms
7,764 KB
testcase_05 AC 14 ms
7,748 KB
testcase_06 AC 14 ms
7,792 KB
testcase_07 AC 14 ms
7,832 KB
testcase_08 AC 13 ms
7,856 KB
testcase_09 AC 13 ms
7,800 KB
testcase_10 AC 13 ms
7,852 KB
testcase_11 AC 14 ms
7,928 KB
testcase_12 AC 14 ms
7,844 KB
testcase_13 AC 14 ms
7,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# your code goes here
def c(l,m):
    if l[1]>m[1]:
        return 1
    elif m[1]>l[1]:
        return 0
    elif l[2]<m[2]:
        return 1
    else:
        return 0
def s(li,n1,n2):
    t=li[n1]
    li[n1]=li[n2]
    li[n2]=t
    return li  
g=[["A"],["B"],["C"]]
for i in range(3):
    g[i]+=[int(i) for i in input().split()]
#print(g)
if c(g[0],g[1])==0:
    g=s(g,0,1)
if c(g[0],g[2])==0:
    g=s(g,0,2)
    g=s(g,1,2)
elif c(g[1],g[2])==0:
    g=s(g,1,2)
for i in range(3):
    print(g[i][0])
0