decimal to roman

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

convert decimal numbers to roman numerals

Options

exec is denied

no deadline, the server will not save your submission

Sample input:_

842
1838
201
1679
558
1726
202
1583
1492
1305
1323
1241
119
357
1400
175
1868
1119
875
1371
645
933
1947
1262
1971
1112
284
1512
362
777
1633
1433
211
1194
1948
418
1383
735
462
1696
627
1592
592
1239
352
1801
27
897
1087
1616
265
279
1375
1204
1170
872
1745
1736
1846
710
1333
1268
264
938
1669
253
1704
410
1068
1970
1491
52
1867
538
1852
1621
1350
579
1866
877
1946
440
1212
995
1769
809
231
425
578
829
318
736
271
133
1225
727
248
496
1029
486
789
1956
1054
1822
1675
490
316
1263
1519
390
374
660
1720
1856
1533
510
1382
1192
1825
593
1732
1927
1714
190
1570
154
1790
826
823
146
1161
448
803
1830
1301
1793
1288
1035
797
715
1828
1322
237
844
124
135
1562
1244
153
1196
700
677
1582
1903
1243
1303
1827
910
1500
1447
443
1111
1823
375
1707
223
874
1295
392
958
1294
102
1891
408
751
750
1038
838
1175
584
819
885
1033
755
1248
511
557
969
1505
1663
24
243
345
1845
1108
1685
794
1705
899
1138
1630
1641
67
1952
1693
744
1220
479
1236
1216
714
528
1061
1814
320
62
321
1098
1573
679
545
1780
1887
1279
1893
1315
1125
1761
553
1048
494
882
433
680
879
926
530
1272
323
376
1090
1772
168
144
313
1237
217
1501
1345
630
682
1339
1291
1173
74
811
116
1379
606
1147
1418
541
286
1697
501
235
1016
873
610
1623
1919
1920
1399
468
702
459
1421
856
556
1198
97
1095
1979
1319
562
241
846
233
720
1065
1966
1159
1918
1030
1258
1306
851
971
101

Sample output:

DCCCXLII
MDCCCXXXVIII
CCI
MDCLXXIX
DLVIII
MDCCXXVI
CCII
MDLXXXIII
MCDXCII
MCCCV
MCCCXXIII
MCCXLI
CXIX
CCCLVII
MCD
CLXXV
MDCCCLXVIII
MCXIX
DCCCLXXV
MCCCLXXI
DCXLV
CMXXXIII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 40B / 23B
2mitchs (ton)670.01332015/03/08 03:38:060B / 34B / 33B
3%20740.13732016/12/09 22:57:540B / 35B / 34B
4tails760.01372015/03/08 01:15:530B / 44B / 30B
5whio870.06742015/03/07 04:41:2531B / 16B / 40B

Python _

RankUserSizeTimeDateStatistics
1leonid830.07142016/07/19 06:52:270B / ?B / ?B
2clock1110.09992015/03/07 21:27:080B / 60B / 49B
3hallvabo1110.21552015/04/08 05:47:200B / 58B / 52B
4Puzzlet Chung1310.03422015/03/08 00:23:310B / 76B / 38B
5rolf1770.04332015/03/07 02:53:400B / 87B / 75B
6dosmanak13540.03262015/03/24 19:24:520B / 634B / 195B

Pike _

RankUserSizeTimeDateStatistics
1clock750.08592015/03/10 02:53:030B / 51B / 23B
2teebee750.08252015/03/10 06:00:410B / 49B / 25B

Common LISP _

RankUserSizeTimeDateStatistics
1teebee280.04422015/03/09 05:18:300B / 16B / 10B
2clock280.07002015/03/09 20:45:070B / 16B / 10B
3mitchs280.04912015/03/10 11:25:050B / 16B / 10B
4%20280.26032016/12/09 23:40:460B / 16B / 10B

JavaScript _

RankUserSizeTimeDateStatistics
1test1480.05602015/03/06 09:02:550B / ?B / ?B

C _

RankUserSizeTimeDateStatistics
1tsunderu1620.01102015/09/16 21:19:167B / ?B / ?B

Haskell _

RankUserSizeTimeDateStatistics
1henkma1340.02052015/09/07 07:17:570B / 67B / 59B

Maxima _

RankUserSizeTimeDateStatistics
1teebee380.16852015/03/09 10:16:340B / 21B / 13B
2clock380.16392015/03/09 20:44:100B / 21B / 13B

sed _

RankUserSizeTimeDateStatistics
1tails910.03112017/05/29 02:47:420B / 50B / 37B
2%20940.03982016/07/21 00:54:492B / 32B / 35B
3clock1080.01362015/03/08 02:15:560B / 47B / 51B

R _

RankUserSizeTimeDateStatistics
1teebee390.17082015/03/09 08:06:140B / 27B / 12B
2clock390.17162015/03/09 08:50:110B / 27B / 12B

Brainfuck _

RankUserSizeTimeDateStatistics
1mitchs (cheat)2100.04062015/12/09 15:51:198B / 7B / 194B
2mitchs2570.02212015/12/09 15:49:030B / 0B / 257B

Language Ranking_

RankLangUserSizeScore
1Common LISPteebee2810000
2Maximateebee387368
3Rteebee397179
4Perlteebee(primo)644375
5Pikeclock753733
6Pythonleonid833373
7sedtails913076
8Haskellhenkma1342089
9JavaScripttest1481891
10Ctsunderu1621728
11Brainfuckmitchs (cheat)2101333

return top