On Thu, Apr 14, 2011 at 7:40 PM, Akash Mukherjee <[email protected]> wrote:
> search nd read chinese remainder theorem > > please elaborate how can i use chinese remainder theorem. > On Thu, Apr 14, 2011 at 7:04 PM, AAMIR KHAN <[email protected]> wrote: > >> *Output:* >> 0 >> 0 >> >> >> On Thu, Apr 14, 2011 at 7:01 PM, AAMIR KHAN <[email protected]> wrote: >> >>> #include<cstdio> >>> #define MOD (int)1e9 >>> using namespace std; >>> int main() { >>> int A = 33554432; >>> printf("%d\n",A*A); >>> printf("%d\n",((A*A)%MOD)); >>> return 0; >>> } >>> >>> How can i calculate, lets say last 9 digits of square of 33554432 ? >>> >>> >>> >>> >>> Thanks, >>> Aamir >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
