Difference: LeetCode5 (3 vs. 4)

Revision 42016-10-25 - JimSkon

Line: 1 to 1
 
META TOPICPARENT name="Math391F2016"

LeetCode5

Line: 23 to 23
 This cannot possibily be computed directly with (32 bit) int's or even long's in C++. Also - we need to use integers, as using doubles will not work because of round-off error.

Fortunately we can use the following modular property to break a given modular exponentiation into smaller problems.

Deleted:
<
<

 
c mod m = (ab) mod m
c mod m = [(a mod m) ⋅ (b mod m)] mod m

Line: 55 to 54
 
34523 23 713 391
43565 335 271 114
43311 3661 51 48
Changed:
<
<
544654 325 5511 913
>
>
544654 325 5511 1639
 
12343 32123 211 83
4354 211 23 ?
24411 331 533 ?
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback