1. 你读入的A,B,C的值不是数字,而是字符串。字符串排序是按照字典序的。
2. 数据有锅,`for key in input()` 的 input() 需要 strip。
修改后就是:
```py
num = dict(zip(
['A', 'B', 'C'],
sorted(map(int, input().split(' ')))
))
result = []
for key in input().strip():
result.append(str(num[key]))
print(' '.join(result))
```
by lusers @ 2023-08-25 16:25:33
@[love_chemistry](/user/605626)
by lusers @ 2023-08-25 16:29:34
@[lusers](/user/315554) 好吧つ﹏⊂感谢解惑
by love_chemistry @ 2023-08-25 23:25:14