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.
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.
Got the mistake, thanks for the reply