- Code: Select all
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.
judge's compiler is 32-bit, so 'int' and 'long' are both 32-bit integers.