Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
46702 Jerry 数字判断 C++ Wrong Answer 0 MS 244 KB 277 2024-05-05 09:26:23

Tests(0/1):


#include<iostream> using namespace std; int main(){ int a,b,n,cnt=0; bool flag=true; cin>>a>>b; for (int i=a;i<=b;i++){ int x=i; flag=true; while(x>0){ if(x%10==2){ flag=false; break; } x/=10; } if(flag) cnt++; } cout<<cnt; }


Judgement Protocol: