euro denominations

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

Form the given price (in euro cents) by repeatedly adding the largest denomination that still fits.

Note that 500 euros (50000 cents) is the largest bill.

Options

exec is denied

now post-mortem time, all source codes will be revealed

Sample input:_

95
2698
3355
30
609
70417
407
47
85
72592
79
2465
640
21
1983
18
6886
57
689
7422
555
226
3
28
23
710
51
4944
77010
15490
506
74
545
93
5104
7354
9274
7256
6192
9447
2666
90179
768
7059
310
3982
40
1199
7302
22

Sample output:

50+20+20+5
2000+500+100+50+20+20+5+2+1
2000+1000+200+100+50+5
20+10
500+100+5+2+2
50000+20000+200+200+10+5+2
200+200+5+2
20+20+5+2
50+20+10+5
50000+20000+2000+500+50+20+20+2
50+20+5+2+2
2000+200+200+50+10+5
500+100+20+20
20+1
1000+500+200+200+50+20+10+2+1
10+5+2+1
5000+1000+500+200+100+50+20+10+5+1
50+5+2
500+100+50+20+10+5+2+2
5000+2000+200+200+20+2
500+50+5
200+20+5+1
2+1
20+5+2+1
20+2+1
500+200+10
50+1
2000+2000+500+200+200+20+20+2+2
50000+20000+5000+2000+10
10000+5000+200+200+50+20+20
500+5+1
50+20+2+2
500+20+20+5
50+20+20+2+1
5000+100+2+2
5000+2000+200+100+50+2+2
5000+2000+2000+200+50+20+2+2
5000+2000+200+50+5+1
5000+1000+100+50+20+20+2
5000+2000+2000+200+200+20+20+5+2
2000+500+100+50+10+5+1
50000+20000+20000+100+50+20+5+2+2
500+200+50+10+5+2+1
5000+2000+50+5+2+2
200+100+10
2000+1000+500+200+200+50+20+10+2
20+20
1000+100+50+20+20+5+2+2
5000+2000+200+100+2
20+2

Sample input:_

46
9918
12
67431
36
77
6697
4438
88
21
164
8
36253
2762
1660
15595
794
5868
730
9024
6233
56842
22938
6712
24569
26
682
8900
1
36
74
243
52
9
49
788
74308
560
24
596
21
43215
1331
28
951
68
3250
64409
43300
68155

Sample output:

20+20+5+1
5000+2000+2000+500+200+200+10+5+2+1
10+2
50000+10000+5000+2000+200+200+20+10+1
20+10+5+1
50+20+5+2
5000+1000+500+100+50+20+20+5+2
2000+2000+200+200+20+10+5+2+1
50+20+10+5+2+1
20+1
100+50+10+2+2
5+2+1
20000+10000+5000+1000+200+50+2+1
2000+500+200+50+10+2
1000+500+100+50+10
10000+5000+500+50+20+20+5
500+200+50+20+20+2+2
5000+500+200+100+50+10+5+2+1
500+200+20+10
5000+2000+2000+20+2+2
5000+1000+200+20+10+2+1
50000+5000+1000+500+200+100+20+20+2
20000+2000+500+200+200+20+10+5+2+1
5000+1000+500+200+10+2
20000+2000+2000+500+50+10+5+2+2
20+5+1
500+100+50+20+10+2
5000+2000+1000+500+200+200
1
20+10+5+1
50+20+2+2
200+20+20+2+1
50+2
5+2+2
20+20+5+2+2
500+200+50+20+10+5+2+1
50000+20000+2000+2000+200+100+5+2+1
500+50+10
20+2+2
500+50+20+20+5+1
20+1
20000+20000+2000+1000+200+10+5
1000+200+100+20+10+1
20+5+2+1
500+200+200+50+1
50+10+5+2+1
2000+1000+200+50
50000+10000+2000+2000+200+200+5+2+2
20000+20000+2000+1000+200+100
50000+10000+5000+2000+1000+100+50+5

Sample input:_

209633
955
2055
18425
997
59062
39597
933
82
89819
524055
874933
45071
3455
397941
31
2701
610
487231
630388
11971
119754
81967
58478
57217
28322
952
60006
526227
77386
928
7492
39267
39
79454
4671
315
477
168
1471
468
772
969
36877
19407
135331
58
780
47817
8297

Sample output:

50000+50000+50000+50000+5000+2000+2000+500+100+20+10+2+1
500+200+200+50+5
2000+50+5
10000+5000+2000+1000+200+200+20+5
500+200+200+50+20+20+5+2
50000+5000+2000+2000+50+10+2
20000+10000+5000+2000+2000+500+50+20+20+5+2
500+200+200+20+10+2+1
50+20+10+2
50000+20000+10000+5000+2000+2000+500+200+100+10+5+2+2
50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+20000+2000+2000+50+5
50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+20000+2000+2000+500+200+200+20+10+2+1
20000+20000+5000+50+20+1
2000+1000+200+200+50+5
50000+50000+50000+50000+50000+50000+50000+20000+20000+5000+2000+500+200+200+20+20+1
20+10+1
2000+500+200+1
500+100+10
50000+50000+50000+50000+50000+50000+50000+50000+50000+20000+10000+5000+2000+200+20+10+1
50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+20000+10000+200+100+50+20+10+5+2+1
10000+1000+500+200+200+50+20+1
50000+50000+10000+5000+2000+2000+500+200+50+2+2
50000+20000+10000+1000+500+200+200+50+10+5+2
50000+5000+2000+1000+200+200+50+20+5+2+1
50000+5000+2000+200+10+5+2
20000+5000+2000+1000+200+100+20+2
500+200+200+50+2
50000+10000+5+1
50000+50000+50000+50000+50000+50000+50000+50000+50000+50000+20000+5000+1000+200+20+5+2
50000+20000+5000+2000+200+100+50+20+10+5+1
500+200+200+20+5+2+1
5000+2000+200+200+50+20+20+2
20000+10000+5000+2000+2000+200+50+10+5+2
20+10+5+2+2
50000+20000+5000+2000+2000+200+200+50+2+2
2000+2000+500+100+50+20+1
200+100+10+5
200+200+50+20+5+2
100+50+10+5+2+1
1000+200+200+50+20+1
200+200+50+10+5+2+1
500+200+50+20+2
500+200+200+50+10+5+2+2
20000+10000+5000+1000+500+200+100+50+20+5+2
10000+5000+2000+2000+200+200+5+2
50000+50000+20000+10000+5000+200+100+20+10+1
50+5+2+1
500+200+50+20+10
20000+20000+5000+2000+500+200+100+10+5+2
5000+2000+1000+200+50+20+20+5+2

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1mitchs850.05522014/09/24 00:08:383B / 40B / 38B
2ukzk880.04262014/09/23 15:59:190B / 38B / 44B
3Histocrat941.14652014/09/12 04:03:010B / 48B / 40B
4BioFALSE1230.03742014/09/23 19:46:340B / 65B / 38B
5mitchs810.05152014/09/25 08:29:280B / 42B / 34B
6mitchs (llhuii)820.05612014/09/25 07:35:590B / 44B / 33B

Perl _

RankUserSizeTimeDateStatistics
1tails630.04032014/09/23 17:07:470B / 19B / 44B
2BioFALSE790.03912014/09/23 19:04:390B / 30B / 49B
3brx910.07862014/09/24 04:29:431B / 28B / 60B
4BioFALSE(rxs)1200.03552014/09/18 05:57:070B / 40B / 71B

Python _

RankUserSizeTimeDateStatistics
1hallvabo910.19442014/09/23 20:40:100B / 43B / 47B
2llhuii910.16522014/09/23 21:55:040B / 45B / 44B
3xsot980.09812014/09/19 18:45:500B / 50B / 34B
4_1060.09562014/09/19 22:53:070B / ?B / ?B
5asdf1060.11112014/09/19 22:53:180B / ?B / ?B
6rolf1070.22472014/09/17 05:13:430B / 54B / 52B
7mitchs (llhuii)900.18052014/09/25 08:31:390B / 43B / 45B
8xsot (hallvabo)900.16162014/09/25 14:20:530B / 43B / 46B

Python3 _

RankUserSizeTimeDateStatistics
1llhuii980.27842014/09/23 22:36:450B / 49B / 48B
2hallvabo990.18972014/09/23 11:28:200B / 46B / 46B
3flow1770.25532014/09/19 21:50:460B / 105B / 47B

JavaScript _

RankUserSizeTimeDateStatistics
1madshall1100.05312014/09/17 05:11:070B / 58B / 52B
2_nderscore1280.05682014/09/20 00:55:290B / 69B / 59B

Lua _

RankUserSizeTimeDateStatistics
1_1800.03702014/09/13 07:00:080B / 111B / 52B
2AndoDaan1800.04912014/09/13 07:45:210B / 111B / 52B

C _

RankUserSizeTimeDateStatistics
1llhuii900.03202014/09/24 22:08:550B / 42B / 48B
2nu900.03212014/09/24 23:56:000B / 47B / 43B
3lpha930.03262014/09/16 16:24:340B / 45B / 48B
4pandamonium930.03242014/09/19 21:13:110B / 47B / 46B
5chocobi1140.02392014/09/21 08:10:220B / 53B / 61B

Haskell _

RankUserSizeTimeDateStatistics
1cojna1020.03802014/09/24 19:28:260B / 60B / 37B
2henkma1030.04162014/09/16 20:38:270B / 54B / 46B

AWK _

RankUserSizeTimeDateStatistics
1llhuii550.03512014/09/21 17:06:230B / 25B / 30B

xgawk _

RankUserSizeTimeDateStatistics
1llhuii540.03532014/09/21 17:02:530B / 24B / 30B

R _

RankUserSizeTimeDateStatistics
1NikNakk1680.43552014/09/15 04:40:350B / ?B / ?B
2vlo1940.49502014/09/25 06:56:080B / ?B / ?B
3vlo (Nik)1840.53162014/09/29 22:56:230B / ?B / ?B

GolfScript _

RankUserSizeTimeDateStatistics
1whio470.23502014/09/25 06:37:583B / 10B / 34B
2tails480.50602014/09/23 22:32:520B / 16B / 31B

Nibbles _

RankUserSizeTimeDateStatistics
1tails220.04482022/02/16 10:56:0717B / 4B / 1B

Language Ranking_

RankLangUserSizeScore
1Nibblestails2210000
2GolfScriptwhio474680
3xgawkllhuii544074
4AWKllhuii554000
5Perltails633492
6Rubymitchs812716
7Cllhuii902444
8Pythonxsot (hallvabo)902444
9Python3llhuii982244
10Haskellcojna1022156
11JavaScriptmadshall1102000
12RNikNakk1681309
13Lua1801222

return to the top page