Hi, I would advise you to use long or a 64 bit Variable… also find the code attached which I used over here Solution
why we should use long or 64 bit variable ??
please tell why we should use long or 64 bit variable ??
This is because sometimes the testcases are very big which cannot be computed by an integer.
why to use long ?
Sometimes there isn’t enough space. you can read here