Code
#include<iostream>
using namespace std;
bool check(int n){
int tmp = n;
while(tmp){
int mod = tmp%10;
if(mod==2 || mod==0 || mod==1 || mod==9) return true;
tmp/=10;
}
return false;
}
int main(){
long long ans=0;
for(int i = 1;i<=2019;i++)
{
if(check(i)) ans+=i*i*i;
}
cout<<ans;
return 0;
}
Answer
283551455541