Given a number n, the task is to find the remainder when n is divided by 11. The input of number may be very large.
Input : str = 13589234356546756 Output : 6 Input : str = 3435346456547566345436457867978 Output : 4
Since the given number can be very large, we can not use n % 11. There are some steps that needs to be used to find remainder:
1. Store number in string. 2. Count length of number string. 3. Convert string character one by one into digit and check if it's less than 11. Then continue for next character otherwise take remainder and use remainder for next number. 4. We get remainder. Ex. str = "1345" len = 4 rem = 3
- Program to find remainder when large number is divided by r
- Largest number by which given 3 numbers should be divided such that they leaves same remainder
- Minimum number of operations on a binary string such that it gives 10^A as remainder when divided by 10^B
- Find N % 4 (Remainder with 4) for a large value of N
- Check if a large number can be divided into two or more segments of equal sum
- Remainder with 7 for large numbers
- Program to find remainder without using modulo or % operator
- Program for quotient and remainder of big number
- Find minimum number to be divided to make a number a perfect square
- Find reminder of array multiplication divided by n
- Find the sums for which an array can be divided into sub-arrays of equal sum
- Find (a^b)%m where 'b' is very large
- Find (a^b)%m where 'a' is very large
- Find the value of XXXX.....(N times) % M where N is large
- Find Last Digit of a^b for Large Numbers
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.