Tak z _FIXED_ by 51b

import std.stdio;void main(){for(int x,y,z,n;~scanf("%d%d%d",&x,&y,&z);writeln(x>y?x<z&y>x-6?x:y>z+5&n?(y+~z)%5-~z:x<z-5?(z+~x)/5&1?x:x-n*5:y:z))n=(x+~y)/5;}

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

download

return to the top page