Remainder Codes

Requires understanding division and remainders, calculater encouraged.

Ahia is counting her inventory, but she miscounts often, especially with big numbers. So instead of counting the whole number once, she counts it many times, but only counts mod a small number. For numbers X and Y, X mod Y is the remainder of X after dividing by Y. So for instance, 32 mod 3 = 2, 9 mod 6 = 3, and 5 mod 100 = 5. Counting mod numbers is really easy. To count mod 4, you just count 1, 2, 3, 0, 1, 2, 3, and so on. You only need to remember one of 0, 1, 2, and 3 and it just cycles. Since there are no big numbers to remember, Ahia messes up less.

Unfortunately, even counting mod, she might still make a mistake. Can you recover the full number?

After choosing a difficulty, you will be asked to guess a number X. You will get various pairs of modulus and the remainder when dividing X by that modulus, but some of these remainders will be wrong. You will get a max value that X could be and a maximum number of errors. Can you find the original X?

Game Settings

Choose a difficulty

Game