1-9 These 9 numbers are divided into three 3-digit numbers, the first of which is the second to third twice times, and 3 times times void Mygetthreenum () { int j,k; int <span style= "font-family:arial, Helvetica, Sans-serif;" >arr</span><span style= "font-family:arial, Helvetica, Sans-serif;" >[10],sum;</span> for (int i = 123; I * 3 < 987; i++) { //the previous sizeof (int) * 10 bytes of arr is cleared to 0 memset ( arr,0,sizeof (int) *); ARR[I/100] = 1; Arr[i/10%] = 1; Arr[i%] = 1; j = i * 2; ARR[J/100] = 1; Arr[j/10%] = 1; Arr[j%] = 1; K = i * 3; ARR[K/100] = 1; Arr[k/10%] = 1; Arr[k%] = 1; sum = 0; for (int x = 1; x < n × x + +) { sum + = arr[x]; } if (sum = = 9) { printf ("a =%d,b =%d,c =%d\n", k,j,i);}}}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Snail-1-9 The 9 numbers are divided into three 3 digits, the first one is twice times the second to third, 3 times times