#include <iostream> #include <cstring> #include <cstdio> #include <algorithm> using namespace std; using ll=long long; int res; bool check(int n) { int x=n; while(x>0) { int y=x%10; if(y==2||y==0||y==1||y==9) { return true; } else x/=10; } return false; } int main() { int n;cin>>n; for(int i=1;i<=n;i++) { if(check(i))res+=i; } cout<<res; return 0; }
0.0分
2 人评分