#include<bits/stdc++.h> using namespace std; int main()//0000 { int m,n; cin>>m>>n; for(;m<=n;m++){ if(m>999){ if((m%100/10)-(m%10)==(m%1000/100)-(m%100/10)&&(m%1000/100)-(m%100/10)==(m/1000)-(m%1000/100)){ cout<<m<<endl; } }else if((m%100/10)-(m%10)==(m%1000/100)-(m%100/10)){ cout<<m<<endl; } } } /************************************************************** Problem: 1466 User: yangjunwen Language: C++ Result: Accepted Time:15 ms Memory:2072 kb ****************************************************************/