main = sequence [readLn,readLn,readLn] >>= \[v,p,n] -> print $ ceiling $ max v $ v + logBase (p+1) (10^6/n)
16 0.02 10000
249
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!