When we multiply two numbers like (10^18)*(10^18) then it will exceed the long long int max value(i.e 10^18). In such case we use __int128.
As an extension the integer scalar type
__int128 is supported for targets which have an integer mode wide enough to hold 128 bits. Simply write
__int128 for a signed 128-bit integer, or
unsigned __int128 for an unsigned 128-bit integer.
Can be applied in the given question–>https://www.codechef.com/DRI22019/problems/VNFAR