Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
77655 sh25_wuyy 数1的个数 C++ 通过 0 MS 248 KB 198 2025-12-26 14:36:22

Tests(1/1):


#include<bits/stdc++.h> int main(){ int a,b,c,d,e=0,i; scanf("%d",&a); for(i=1;i<=a;i++){ b=i; while(b){ if((b%10)==1) e++; b=b/10; } } printf("%d",e); return 0; }


测评信息: