Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
47303 | liusiyu | 数字判断 | C++ | Accepted | 1 MS | 244 KB | 254 | 2024-05-14 21:56:19 |
#include<bits/stdc++.h> using namespace std; inline bool pd(int x){ while(x!=0){ if(x%10%2==0) return 0; x/=10; } return 1; } int main() { int n,m,cnt=0; cin>>n>>m; for(int i=n;i<=m;i++) if(pd(i)) cnt++; cout<<cnt; return 0; }