Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
23489 qwertyuiop 记数问题 C++ 通过 14 MS 240 KB 259 2023-07-15 16:18:08

Tests(10/10):


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


测评信息: