ACACACACACAC
2025-03-01 19:46:08
发布于:重庆
0阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int n,ans;
int main(){
cin>>n;
for(int i=1;i<=n;i++){
int temp=i;
while(temp!=0){
if(temp%10==1) ans++;
temp/=10;
}
}
cout<<ans;
return 0;
}
这里空空如也
有帮助,赞一个