Problem Says wrong answer



Logic-> I am newbie here so just trying now. Although my logic seems correct by floor(b*log n (a))+1. But seem to give wrong answer why?

One thing I would say is that shift FAST I/O lines to the start before taking any input.
Refer this

1 Like