Chess960 by TFeld00

def f(v,n=0,i=-1):
 while i<n:i+=1;n+=a[i]>0
while 1:a=[0]*8;n=input();a[n%4*2+1]=a[n/4%4*2]='B';map(f,'QNNRKR',(n/16%6,)+[(y,x)for x in range(5)for y in range(x+1,5)][n/96]+(0,)*3);print''.join(a)

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)


return to the top page