euro denominations by AndoDaan

a={5e4,2e4,1e4,5e3,2e3,1e3,500,200,100,50,20,10,5,2,1}while""do l=io.read'*n't=''i=1 while i<16 do v=a[i]if l>=v then t=t==""and v or t.."+"..v l=l-v else i=i+1 end end print(t)end

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page