#include
using namespace std;
int main() {
int n;
cin >> n;
int m = n / 10;
int p = m / 100;
m %= 10;
switch (p) {
case 1: cout << "C"; break;
case 2: cout << "CC"; break;
case 3: cout << "CCC"; break;
case 4: cout << "CD"; break;
case 5: cout << "D"; break;
case 6: cout << "DC"; break;
case 7: cout << "DCC"; break;
case 8: cout << "DCCC"; break;
case 9: cout << "CM"; break;
}
switch (m) {
case 1: cout << "X"; break;
case 2: cout << "XX"; break;
case 3: cout << "XXX"; break;
case 4: cout << "XL"; break;
case 5: cout << "L"; break;
case 6: cout << "LX"; break;
case 7: cout << "LXX"; break;
case 8: cout << "LXXX"; break;
case 9: cout << "XC"; break;
}
switch (n % 10) {
case 1: cout << "I"; break;
case 2: cout << "II"; break;
case 3: cout << "III"; break;
case 4: cout << "IV"; break;
case 5: cout << "V"; break;
case 6: cout << "VI"; break;
case 7: cout << "VII"; break;
case 8: cout << "VIII"; break;
case 9: cout << "IX"; break;
}
return 0;
}
#include <iostream>
#include <math.h>
using namespace std;
{ case 1: coutint main(){
int n,m,p;
cin>>n; m=n/10; n%=10;
cin>>m; p=m/100; m%=100;
switch (m)<<"X";break;
case 2: cout<<"XX";break;
case 3: cout<<"XXX";break;
case 4: cout<<"XL";break;
case 5: cout<<"L";break;
case 6: cout<<"LX";break;
case 7: cout<<"LXX";break;
case 8: cout<<"LXXX";break;
case 9: cout<<"XC";break;
case 10: cout<<"C";break;
}
switch (n)
{
case 1: cout<<"I";break;
case 2: cout<<"II";break;
case 3: cout<<"III";break;
case 4: cout<<"IV";break;
case 5: cout<<"V";break;
case 6: cout<<"VI";break;
case 7: cout<<"VII";break;
case 8: cout<<"VIII";break;
case 9: cout<<"IX";break;
}
switch(p)
{
case 1: cout<<"CI";break;
case 2: cout<<"CC";break;
case 3: cout<<"CCC";break;
case 4: cout<<"D";break;
case 5: cout<<"DC";break;
case 6: cout<<"DCC";break;
case 7: cout<<"DCCC";break;
case 8: cout<<"CM";break;
case 9: cout<<"M";break;
}
return main();
}