Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
333890 小林老师 【C3-5】数的统计 C++ 通过 100 28 MS 244 KB 304 2025-07-16 21:39:54

Tests(3/3):


#include<bits/stdc++.h> using namespace std; int main(){ int n,x,t,w,c=0; cin>>n>>x; //列举所有可能的情况 for(int i=1; i<=n; i++){ //验证符合题目要求 //数字x t=i; while(t>0){ w=t%10; t=t/10; if(w==x){ c++; } } } cout<<c; return 0; }


测评信息: