Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
12052 欧阳漌 K 好数 C++ Time Limit Exceeded 0 1000 MS 244 KB 282 2020-12-26 17:18:54

Tests(0/10):


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


Judgement Protocol: