結果

問題 No.267 トランプソート
ユーザー 👑 KazunKazun
提出日時 2020-06-11 00:59:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 1,000 ms
コード長 435 bytes
コンパイル時間 561 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 71,268 KB
最終ジャッジ日時 2023-09-06 02:25:50
合計ジャッジ時間 3,636 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,084 KB
testcase_01 AC 75 ms
71,224 KB
testcase_02 AC 72 ms
71,248 KB
testcase_03 AC 73 ms
71,252 KB
testcase_04 AC 73 ms
71,040 KB
testcase_05 AC 72 ms
71,152 KB
testcase_06 AC 73 ms
71,052 KB
testcase_07 AC 71 ms
70,924 KB
testcase_08 AC 69 ms
70,920 KB
testcase_09 AC 68 ms
70,920 KB
testcase_10 AC 70 ms
71,220 KB
testcase_11 AC 70 ms
71,192 KB
testcase_12 AC 73 ms
71,048 KB
testcase_13 AC 72 ms
71,056 KB
testcase_14 AC 73 ms
71,152 KB
testcase_15 AC 72 ms
70,952 KB
testcase_16 AC 74 ms
71,044 KB
testcase_17 AC 72 ms
71,268 KB
testcase_18 AC 73 ms
71,044 KB
testcase_19 AC 74 ms
70,952 KB
testcase_20 AC 73 ms
71,200 KB
testcase_21 AC 72 ms
71,048 KB
testcase_22 AC 74 ms
71,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(s):
    if s[0]=="D":
        t=0
    elif s[0]=="C":
        t=100
    elif s[0]=="H":
        t=200
    else:
        t=300

    if s[1]=="A":
        t+=1
    elif s[1]=="T":
        t+=10
    elif s[1]=="J":
        t+=11
    elif s[1]=="Q":
        t+=12
    elif s[1]=="K":
        t+=13
    else:
        t+=int(s[1])

    return t

N=int(input())
A=input().split()
A.sort(key=f)

for a in A:
    print(a,end=" ")
print()
0