| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 12312 | 郑奚桐 | K 好数 | C++ | Accepted | 100 | 6 MS | 252 KB | 260 | 2020-12-31 17:14:03 |
#include<bits/stdc++.h> using namespace std; int n,k,s=0,m,h; int main(){ cin>>n>>k; for(int i=1;i<=n;i++){ h=i; while(h!=0){ m=h%10; if(m>k) break; if(h/10==0){ s++; break; } h/=10; } } cout<<s; return 0; }