Great! it worked, it is given that there would be atmost 10^4 steps that's
why i used (int). Thanks for making time to debug it. I appreciate it.
On Saturday, April 25, 2020 at 1:16:00 AM UTC+5:30, porker2008 wrote:
>
> You need to use long long to handle intermediate result, otherwise it will
You need to use long long to handle intermediate result, otherwise it will
overflow.
Otherwise, your solution looks pretty good!
*#include *
*#include *
*#include *
*using namespace std;*
*long long MOD = 10LL;*
*pair, int> xydis(string s) {*
* long long x = 0;*
* long long y = 0;*
* in