Back to Problem Solutions forum
I'm trying to solve this challenge, but I wonder if it can be solved quickly using php. since with php you can not use very large numbers. I'm a bit stuck
Hello!
I don't well remember this problem already :) but its statement says that it uses large numbers exactly to prevent people calculating result directly. Note "Hint: you need not long arithmetic for this task." in the statement.
So there should be some simple math trick involved, I think.
Probably if you try "Modular Calculator" problem first, it will give you enough insight! Hope it helps!