import java.io.*;
public class Main{
static int n;
static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException
{
n = Integer.parseInt(in.readLine());
int rs = 0;
for(int i = 1; i <= n; i++)
{
int x = i;
while(x > 0)
{
int t = x % 10;
x /= 10;
if(t == 2 || t == 9 || t == 0|| t == 1)
{
rs+=i;
break;
}
}
}
System.out.println(rs);
in.close();
}
}
特别数的和
于 2023-12-08 08:06:29 首次发布