Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
125971 王金檐 不吉利的数 C++ Compile Error 0 MS 0 KB 314 2025-07-15 16:59:13

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int n,m; cin>>n>>m; int k,s=0; for(int i=n;i<=m;i++){ k=i; j=0; while(k==0){ if(k%10==4){ s++; break; } if(k%10==2){ if(k%100==6){ s++; break; } } k/=10; } } cout<<s-k; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:3: error: 'j' was not declared in this scope
   j=0;
   ^