User Tools

Site Tools


prelude_two_to_carmichael_numbers_--_efficient_power_mod

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
prelude_two_to_carmichael_numbers_--_efficient_power_mod [2011/09/25 06:38] – created jtkorbprelude_two_to_carmichael_numbers_--_efficient_power_mod [2011/09/25 06:54] (current) jtkorb
Line 3: Line 3:
 First, start by reading the problem statement for [[http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=35&page=show_problem&problem=947|Carmichael Numbers]]. First, start by reading the problem statement for [[http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=35&page=show_problem&problem=947|Carmichael Numbers]].
  
-For this prelude, you are to power of one number modulo another number.+For this prelude, you are to compute the power of one number to a second number modulo a third number.
  
 ===== Input ===== ===== Input =====
Line 19: Line 19:
 3 2 2 3 2 2
 5 3 7 5 3 7
 +4 13 497 
 +0 0 0
 </code> </code>
  
Line 27: Line 28:
 3 ^ 2 mod 2 is 1. 3 ^ 2 mod 2 is 1.
 5 ^ 3 mod 7 is 6. 5 ^ 3 mod 7 is 6.
 +4 ^ 13 mod 497 is 445.
 </code> </code>
prelude_two_to_carmichael_numbers_--_efficient_power_mod.1316957881.txt.gz · Last modified: 2011/09/25 06:38 by jtkorb