Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
46743 | 老方 | 数字判断 | C++ | Accepted | 1 MS | 244 KB | 309 | 2024-05-05 10:56:31 |
#include<bits/stdc++.h> using namespace std; bool isj(int x){ string s=to_string(x); for(int i=0;i<s.length();i++){ int a=s[i]-'0'; if(a%2==0)return false; } return true; } int main(){ int a,b,cnt=0; cin>>a>>b; for(int i=a;i<=b;i++){ if(isj(i))cnt++; } cout<<cnt; return 0; }