| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 147759 | 罗迎甲 | 不吉利的数 | C++ | Compile Error | 0 MS | 0 KB | 585 | 2026-02-07 15:25:49 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n=0,m=0; int a=0; cin>>n>>m; for(int x=n;x<=m;x++){ while(x>0){ if(x%10==4||x%10==2&&(x/10)%10==6){ a++; break; } a/=10 } } cout<<m+1-n-a<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:13:32: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if(x%10==4||x%10==2&&(x/10)%10==6){
^
Main.cc:18:13: error: expected ';' before '}' token
}
^