Write a computer program to calculate abmod c where a; b; c are positive integers given by the user. Use your program to check your answer to part (b) of and to calculate 21000mod 99.
1. Ten pirates find a sack of gold coins. When they try to divide up the gold (with equal shares for all) they find there is one coin left over. Upset, one of the pirates cries “Arg!” and leaves (with no gold). The remaining pirates again try to divide up the gold and this time they find to their horror there are two coins left over. So two more of the pirates cry “Arg!” and leave (with no gold). The remaining pirates divide up the gold and find, to their delight, that each gets an equal share and no coins are left over. What can we say about the number of gold coins in the sack? In particular, what is the smallest number of coins that make the story correct.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here