結果
| 問題 | No.8116 TCP ソート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-01 21:25:56 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 261 bytes |
| 記録 | |
| コンパイル時間 | 236 ms |
| コンパイル使用メモリ | 95,976 KB |
| 実行使用メモリ | 78,988 KB |
| 最終ジャッジ日時 | 2026-07-08 06:31:48 |
| 合計ジャッジ時間 | 3,160 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 16 |
ソースコード
S=input()
l=[]
m=[]
for i in S:
if ord(i)>ord("T") and i not in "CTP":
l.append(i)
for i in S:
if ord(i)<ord("T") and i not in "CTP":
m.append(i)
l="".join(sorted(l))
m="".join(sorted(m))
print(m+"T"*(S.count("T"))+"C"*(S.count("C"))+"P"*(S.count("P"))+l)