Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
314205 | 242310陈在 | NOIP2010 普及:第一题 数字统计 | C++ | Wrong Answer | 20 | 0 MS | 280 KB | 253 | 2024-12-12 17:20:13 |
#include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; int s,f=0; for(int i=1; i<=b; i++) { s=i; while(true) { if(s%10==a) f++; if(s>=10) s=s/10; else break; } } cout<<f; return 0; }