code_warrior's blog

By code_warrior, history, 4 years ago, In English

Can anyone help me figure how to get AC in this problem. I tried to solve it with binary search, made several submissions,but couldn't get AC. My idea is to search from 0 upto 1e18 and check if this number of products is possible or not and thus correspondingly increase or decrease my bounds and keep a track of maximum number of products possible and finally output it. It would be very helpful if someone could share his/her approach.

Problem SPOJ

  • Vote: I like it
  • 0
  • Vote: I do not like it