for s in open(0):print(+(sum(max(0,s.count(p)-ord(p)%4)for p in'QRBNp')<9))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page