FATCHEF wrong answer


i’m getting wrong because GCC give wrong multiplication answer of big numbers and java is slow as it show TLE so what should i do?

its clearly written in the problem statement that you have to give answers modulo 10^9+9

i know its 10^9+9 but the multiplication of 10^7(round off) and 10^7(round off) is wrong so the resultant modulo is also wrong so what to do in this case

Its written that we have to take modulo of 10^9, so how are you saying that its 10^7. I am repeatedly getting wa!!

I think it is not 10^9+7 but it is 10^9+9

1 Like

but what to do if 10^9*10^4 give wrong answer of multiplication… don’t say that this condition will not arise

yupp sorry! mixed it up. 10^9+9

Okay even i suffered a modulo pain in the early stage. But modulo arithmetic is far simpler. read all the links following in khan academy https://www.khanacademy.org/computing/computer-science/cryptography/modarithmetic/a/modular-addition-and-subtraction