Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
689 hhz123 记数问题 C++ 通过 10 MS 248 KB 219 2022-05-21 20:28:58

Tests(10/10):


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


测评信息: