学上位
2026-08-30 19:35:02
发布于:上海
1阅读
0回复
0点赞
#include< bi ts / st d c+ + .h i o str eam >
u si ng n am e s p a ce s t d;
in t m a in( ){
i n t n , cn t= 0 ;
c in >> n;
fo r( i n t i= 1;i<=n;i++){
i n t a = i;
whi l e(a >0 ) {
if(a% 10== 1) cnt++;
a/=10;
}
}
cou t< <cn t
r e t ur n 0 ;
` ``
全部评论 1
简单
2026-08-30 来自 上海
0







有帮助,赞一个