f=->(v,s,f){p(r=rand(20)+1)<2?f=0:r>19?s=0:r<v ?f-=1:s-=1while s*f>0p s<1}f[12, 5, 3]
Standard input is empty
3 2 11 false
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!