Golf ball pyramid by macik

import std.stdio;void main(){float i;while(scanf("%f",&i)>0){int z=cast(int)((i/21.335-2)/1.4142+2);writeln(z*(z+1)*(2*z+1)/6);}}

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

download

return to the top page