- Code: Select all
ans=1;
for(i=1;i<=98;i++)
{
ans=(ans*100) % 2000000011;
}
will work pretty well, if you choose the right datatype for ans.
32-bit int won't do, because of a possible overflow in ans*100 (2000000010*100 > 2^31), but a 64-bit integer type is fine.
abid_iut,
judge's compiler is 32-bit, so 'int' and 'long' are both 32-bit integers.
