Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
105211 李政 NOIP2013 普及:第一题 计数问题 C++ 解答错误 10 12 MS 276 KB 221 2023-06-10 16:25:54

Tests(1/10):


#include<bits/stdc++.h> using namespace std; int n,m,ans; int main(){ cin>>m>>n; for(int i=n;i<=m;i++){ int x=i; while(x!=0){ if(x%10==1){ ans++; } x/=10; } } cout<<ans; return 0; }


测评信息: