結果
問題 |
No.267 トランプソート
|
ユーザー |
👑 ![]() |
提出日時 | 2020-06-11 00:59:29 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 1,000 ms |
コード長 | 435 bytes |
コンパイル時間 | 208 ms |
コンパイル使用メモリ | 82,392 KB |
実行使用メモリ | 54,152 KB |
最終ジャッジ日時 | 2024-06-23 21:21:30 |
合計ジャッジ時間 | 2,065 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
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()