Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
109099 | 6张轶涵 | 不吉利的数 | C++ | Accepted | 15 MS | 272 KB | 405 | 2025-01-26 17:11:50 |
#include<bits/stdc++.h> using namespace std; int pd(int n) { while(n>=1) { int h=n%10; int c=n/10%10; if(h==4) { return 1; } if(h==2&&c==6) { return 1; } n/=10; } return 0; } int main() { int n,m; cin>>n>>m; int s=0; for(int i=n;i<=m;i++) { bool f=pd(i); if(f==0) { //cout<<i<<endl; s++; } } cout<<s<<endl; return 0; }