結果

問題 No.267 トランプソート
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-08-21 22:50:22
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 1,000 ms
コード長 229 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-07-18 11:51:32
合計ジャッジ時間 1,082 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
s = 'DCHS'
t = 'A23456789TJQK'
calc = lambda x: 13 * s.index(x[0]) + t.index(x[1])

n = int(raw_input())
arr = raw_input().split()
res = sorted(map(lambda x: (calc(x), x), arr))
print ' '.join(e[1] for e in res)
0