| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 27291 | 董承诺 | 数1的个数 | C++ | Compile Error | 0 | 0 MS | 0 KB | 216 | 2021-12-11 15:12:18 |
#include<bits/stdc++.h> using namespace std; int m,a,ans=0; int main(){ cin>>m; for(int i=1;i<=m;i++){ a=i; while(a>0){ if(a%10==1) ans++; n/=10; } } cout<<ans; return 0; }