結果

問題 No.267 トランプソート
ユーザー Akijin_007
提出日時 2023-08-31 18:18:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 1,000 ms
コード長 238 bytes
コンパイル時間 521 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2025-01-03 04:45:49
合計ジャッジ時間 2,437 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
S = list(input().split())

a = "DCHS"
b = "A23456789TJQK"
c = []

for i in range(N):
    u = a.index(S[i][0])
    v = b.index(S[i][1])
    c.append((u, v, S[i]))

c = sorted(c)
print(" ".join([c[i][2] for i in range(N)]))
0