| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 39075 | jiabokai | 数字统计 | C++ | Wrong Answer | 0 MS | 244 KB | 316 | 2024-01-30 15:52:38 |
#include<bits/stdc++.h> using namespace std; bool judge(int m){ while(m){ if(m%10==2){ return true; } m/=10; } return false; } int main(){ int l,r,cnt=0; while(cin>>l>>r){ cnt=0; for(int i=l;i<=r;i++){ if(judge(i)){ cnt++; } } cout<<cnt+1; } return 0; }