Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
12048 李正谦 K 好数 C++ Accepted 100 6 MS 248 KB 260 2020-12-26 17:17:02

Tests(10/10):


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


Judgement Protocol: