Difficult Math problem

Altomotto

New member
Joined
Oct 9, 2016
Messages
3
Hello there. I am a programmer, and have just hit a serious math problem with numbers here. I need help, and here are the rules.

You need to be able to convert any number 0 between 399 to a number 0 between 93, be able to reverse it, it cannot end up at a decimal or a negative number, and you can use only the following functions:

Addition
Subtraction
Multiplication
Division
Modulo

Any ideas?
 
Hello there. I am a programmer, and have just hit a serious math problem with numbers here. I need help, and here are the rules.

You need to be able to convert any number 0 between 399 to a number 0 between 93, be able to reverse it, it cannot end up at a decimal or a negative number, and you can use only the following functions:

Addition
Subtraction
Multiplication
Division
Modulo

Any ideas?
What does reverse it - mean?
 
Reverse here means that I can reverse the process. Say 100-10=90, I can reverse the process because I can add 10 back to 90 and get 100. But an unrecoverable process, is when you divide 5 by 2, and round 2.5 to 3. This is because we do not know what the number was before the rounding, making it impossible to backtrack.
 
Yes, the starting number is between 0 and 399, meaning the minimum number is 1, and the maximum is 398, and after you do your solution, the end number must be between 1 and 93, say the start number is 257, and after the conversion you ended up with 45. That would be acceptable. Though it needs to be recoverable, meaning I need to be able to backtrack the equation when I need to in the program. Think of it as a temporary encryption.
 
Top