一组数据如下:
```
100 100 99
ABC
```
应输出
```
99 100 100
```
你的输出
```
100 100 99
```
原因:读入时是一个字符串,将读入的`i`转为整数即可。
更改后的代码:
```python
a=sorted([int(i) for i in input().strip().split()])
b=input().strip()
d={'A':0, 'B':1, 'C':2}
for i in range(3):
print(a[d[b[i]]], end=' ')
```
[AC 记录](https://www.luogu.com.cn/record/145511884)
by Ivan422 @ 2024-02-01 08:56:16
有没有可能A<B<C,100=100
by cat_and_love @ 2024-02-15 15:44:41