int Count_Digit ( const int N, const int D ){
int n;
if(N<0)
n=-N;
else n=N;
if(N==0&&D==0)
return 1;
int count=0;
while(n){
if(n%10==D)
count++;
n/=10;
}
return count;
}
6-9 统计个位数字
最新推荐文章于 2022-08-13 13:20:21 发布
这篇博客主要探讨了如何统计一个数列中所有数字的个位数出现的频次,包括使用循环和数学方法来解决问题的思路。
1546

被折叠的 条评论
为什么被折叠?



