Riyuzak251097's blog

By Riyuzak251097, history, 6 years ago, In English

Hi everyone, i am trying to implement the solution for 1029D which was asked in last div3 contest. I am failing at test case number 17. Can someone tell me what mistake i am making and rectify my code?this is my solution It would be really helpful if one can also guide me how to find similar questions of this type.

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

| Write comment?
»
6 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Because long long is also overflow. Due to 10^10*10^10=10^20>2^63-1. Try other way to solve this situation. I hope it can help you. Thank you.

//Edit2

Sorry, it is my mistake. You used the function "pow()" and it will return a double type value. When this double type value Forced type conversion to long long will get an overflow.