L-am făcut de 100 de puncte.
#include <iostream>
using namespace std;
int main()
{
long int a, b;
cin>>a>>b;
long long int S = 0;
for(long int i = a; i <= b; i++)
{
long int x = i;
long int V = 0;
while(x > 0)
{
if(x%2 == 0) {V += x%10;}
else {V -= x%10;}
x /= 10;
}
if(V == 0) {S = S+i;}
}
cout<<S;
}