Блог пользователя Riyuzak251097

Автор Riyuzak251097, история, 6 лет назад, По-английски

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.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
6 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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.