Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Explain the idea of big integer division in C language programming! ! ! Urgent! !
Explain the idea of big integer division in C language programming! ! ! Urgent! !
Store numbers in an array and then calculate them according to the definition of division. Namely:

Assuming that divisor x and divisor y are m and n bits respectively, then these two numbers need to be stored in a string of m and n bytes;

Then start from the higher level, just like we do manually.

For example, 1234 is divided by 32, 123 is divided by 32 to get quotient and remainder, and the remainder and the rest continue to operate together … until the final result is obtained. General ACM algorithm books have source programs.