水就完事了
class e{
public static void main(String[] args) {
Scanner in =new Scanner(System.in);
int n=in.nextInt();
int ans=0;
for(int i=1;i<=n;i++) {
String s=i+”“;
if(s.contains(“2”)||s.contains(“0”)||s.contains(“1”)||s.contains(“9”)) {
ans+=i;
}
}
System.out.println(ans);
}
}