Check the number of repetitions in C language
Check whether each bit in a number is repeated. n% 10 gets the value of the current minimum number of bits. Each iteration is n/= 10, and the number of bits is shifted to the right by one bit n>0 to check whether the detection has been completed. For example, the number123; N% 10 == 3, indicating that 3 has already appeared, so digit_seen[3] == TRUE. If digit_seen[3] == TRUE is detected, it means that there is already a number 3, so repeat, let's just jump out of the loop. At this time, n! =0, and then it can be judged by detecting n, and N/= 10 shifts the number to the right by one bit. At this time, n == 12 continues the first two steps until n=0 (because any integer less than or equal to 9 divided by 10 is 0).