Home > Back-end >  PTA topic for 7-6 in a batch of integer (20) the unit digit of most given a group of integers, analy
PTA topic for 7-6 in a batch of integer (20) the unit digit of most given a group of integers, analy

Time:12-17

Children did didn't make a night to don't know what happened to this point
Seek help from dl



# include & lt; Stdio. H>
Int main ()
{
Int n, I;
The scanf (" % d ", & amp; n);
Int a [1000], [1000] b;
Static int c [10];
for (i=0; iThe scanf (" % d ", & amp; A [I]);
Int number=0, k=0;
for(i=0; i{
If (a [I]==0)
{number++;
B [k]=0;
k++; }
The else
Do
{
Number++;
B=[k] a [I] % 10;
A [I]/=10;
k++;
} while (a [I]!=0);
}
for(i=0; i{
The switch (b [I])
[0] {0 case: c + +; break;
Case 1: c + + [1]; break;
Case 2: c [2] + +; break;
Case 3: [3] c + +; break;
Case 4: [4] c + +; break;
Case 5: [5] c + +; break;
Case 6: [6] c + +; break;
Case 7: [7] c + +; break;
Case 8: [8] c + +; break;
Case 9: [9] c + +; break;
}}
Int min=0;
for(i=0; i<10; I++)
If (c/min & lt; C [I])
Min=I;
Printf (", "% d, c/min).
for(i=0; i<10; I++)
If (c/min==c [I])
Printf (" % d ", I);
return 0;
}
  • Related