本题为COCI 2009-2010 2nd round T2 RIMSKI。
分值按原题设置,满分 50。
给定一个罗马数字 B,把 B 的字符重新排列,要求让排列后的数字最小。
一行一个罗马数字 B。
一行一个罗马数字,为你重排后能得到的最小的数字。
1≤B<100。
注意,在本题中I
如果在大数字之前,它只能在V
、X
之前。输入遵循同样的规则。(这就是样例 4 的输出为什么是 LI
而不是 IL
。)
By signing up a HFOJ universal account, you can submit code and join discussions in all online judging services provided by us.