×

# lunchtime january (LCH15JEF)

 0 http://discuss.codechef.com/questions/62658/lch15jef -editorial this is the link to the editorial of the problem http://www.codechef.com/problems/LCH15JEF i want to ask will the method of multiplying 2 large numbers would work if two numbers are 2^36 and 2^36 , if yes please explain how will it work?? this is the template:: long long MOD; long long mult(long long A, long long B)  {if ( B == 0 ) return 0; long long u = mult(A, B/2); long long res; if ( B%2 == 0 ) res = u + u; else res = u + u + A; while ( res >= MOD ) res -= MOD; return res;  } then in which case it would work??? asked 02 Feb '15, 22:23 5★saisumit 11●2 accept rate: 0%

 0 How it'll work, you may refer this. answered 02 Feb '15, 23:04 3★damn_me 2.6k●2●13●36 accept rate: 24% what will happen after k is more than 20, that is what will happen for this expression (987654321^(12345678912345678912)) (02 Feb '15, 23:09) saisumit5★
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×342
×87
×9

question asked: 02 Feb '15, 22:23

question was seen: 763 times

last updated: 02 Feb '15, 23:09