Invert FizzBuzz by clock

System.in.eachLine{m=it.split(/[iuz]/).join().replace(' ','_*').replace('FB','X')
x="__F_BF__FB_F__X"*12=~/${m=='F_*B'?'FB':m}/
println x?x.start(0)+1+" "+x.end():""}

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

download

return to the top page