#include <bits/stdc++.h> using namespace std; int main() { int n,a,j,sum=0; cin >> n; for(int i=1;i<=n;++i) { a=i; while(a) { j=a%10; if(j==2 || j==0 || j==1 || j==9) { sum+=i; break; } a/=10; } } cout << sum; return 0; }
标签:std,10,特别,int,sum,蓝桥,main From: https://www.cnblogs.com/xjcxj/p/17848357.html