7月30日编程札记

时间:2021-03-26 14:18:16

字符串的完美度

题目详情

我们要给每个字母配一个1-26之间的整数,具体怎么分配由你决定,但不同字母的完美度不同,

而一个字符串的完美度等于它里面所有字母的完美度之和,且不在乎字母大小写,也就是说字母F和f的完美度是一样的。



现在给定一个字符串,输出它的最大可能的完美度。

例如:dad,你可以将26分配给d,25分配给a,这样整个字符串最大可能的完美度为77。


解决

#include
#include
#include
#include
#include
using namespace std;

//求给定的有count个数据的数组中的最大值,返回最大值,并将其位于数组中的位置存在count中

//求解字符串s的完美度
int perfect(const string &s) {
int length = s.length();
int number[26];
for(int i=0;i<26;i++)
number[i]=0;
for(int i=0;i
{
if(s[i]>=65&&s[i]<=90)
number[s[i]e]++;
elseif(s[i]>=97&&s[i]<=122)
number[s[i]�]++;
}
int result=0;
 

//冒泡排序整个频数统计数组
  for(int i = 0; i< 25 ; i++)
for(int j=0; j<25-i;j++)
if(number[j+1]
{
int temp = number[j+1];
number[j+1]= number[j];
number[j] = temp;
}
for(int i=0;i<26 ; i++)
  result = result +number[i]*(i+1); 
return result;
}
int main()
{
cout<<"input"<<endl;
string s;
cin>>s;
cout<<perfect(s);
system("pause");
return 0;
}

题目本身的意思就是依次找到字符串中出现次数最多的字母,次数*26,在加上次多的字母,次数*25……

上述给出了两种方法,一种是寻找最大值,把依次赋值的过程看着一个权值在自减,每次查到一个最大值用完后就置数为0,这种方法是首先想到的,

第二种方法是直接将数组再排序,从小到大,然后数组的下标+1以后就是其完美度,这样解决非常简单。


顺便学习了c++中的string类,输入输出string的对象,直接用>>和<<,而其他常用函数如下:

C++string类常用函数

string类的构造函数:
string(const char *s); //用c字符串s初始化
string(int n,char c); //用n个字符c初始化
此外,string类还支持默认构造函数和复制构造函数,如string s1;strings2="hello";都是正确的写法。当构造的string太长而无法表达时会抛出length_error异常

string类的字符操作:
const char &operator[](int n)const;
const char &at(int n)const;
char &operator[](int n);
char &at(int n);
operator[]和at()均返回当前字符串中第n个字符的位置,但at函数提供范围检查,当越界时会抛出out_of_range异常,下标运算符[]不提供检查访问。
const char *data()const;//返回一个非null终止的c字符数组
const char *c_str()const;//返回一个以null终止的c字符串
int copy(char *s, int n, int pos = 0)const;//把当前串中以pos开始的n个字符拷贝到以s为起始位置的字符数组中,返回实际拷贝的数目

string的特性描述:
int capacity()const; //返回当前容量(即string中不必增加内存即可存放的元素个数)
int max_size()const; //返回string对象中可存放的最大字符串的长度
int size()const; //返回当前字符串的大小
int length()const; //返回当前字符串的长度
bool empty()const; //当前字符串是否为空
void resize(int len,char c);//把字符串当前大小置为len,并用字符c填充不足的部分

string类的输入输出操作:
string类重载运算符operator>>用于输入,同样重载运算符operator<<用于输出操作。
函数getline(istream &in,string&s);用于从输入流in中读取字符串到s中,以换行符'\n'分开。


string的赋值:
string &operator=(const string&s);//把字符串s赋给当前字符串
string &assign(const char *s);//用c类型字符串s赋值
string &assign(const char *s,intn);//用c字符串s开始的n个字符赋值
string &assign(const string&s);//把字符串s赋给当前字符串
string &assign(int n,char c);//用n个字符c赋值给当前字符串
string &assign(const string &s,intstart,int n);//把字符串s中从start开始的n个字符赋给当前字符串
string &assign(const_iterator first,const_itertorlast);//把first和last迭代器之间的部分赋给字符串


string的连接:
string &operator+=(const string&s);//把字符串s连接到当前字符串的结尾
string &append(const char *s);//把c类型字符串s连接到当前字符串结尾
string &append(const char *s,intn);//把c类型字符串s的前n个字符连接到当前字符串结尾
string &append(const string &s);//同operator+=()
string &append(const string &s,intpos,int n);//把字符串s中从pos开始的n个字符连接到当前字符串的结尾
string &append(int n,char c);//在当前字符串结尾添加n个字符c
string &append(const_iterator first,const_iteratorlast);//把迭代器first和last之间的部分连接到当前字符串的结尾


string的比较:
bool operator==(const string &s1,const string&s2)const;//比较两个字符串是否相等
运算符">","<",">=","<=","!="均被重载用于字符串的比较;
int compare(const string &s)const;//比较当前字符串和s的大小
int compare(int pos, int n,const string&s)const;//比较当前字符串从pos开始的n个字符组成的字符串与s的大小
int compare(int pos, int n,const string &s,intpos2,intn2)const;//比较当前字符串从pos开始的n个字符组成的字符串与s中pos2开始的n2个字符组成的字符串的大小
int compare(const char *s) const;
int compare(int pos, int n,const char *s) const;
int compare(int pos, int n,const char *s, int pos2) const;
compare函数在>时返回1,<时返回-1,==时返回0

string的子串:
string substr(int pos = 0,int n = npos)const;//返回pos开始的n个字符组成的字符串


string的交换:
void swap(string &s2); //交换当前字符串与s2的值



string类的查找函数:

int find(char c, int pos = 0) const;//从pos开始查找字符c在当前字符串的位置
int find(const char *s, int pos = 0)const;//从pos开始查找字符串s在当前串中的位置
int find(const char *s, int pos, int n)const;//从pos开始查找字符串s中前n个字符在当前串中的位置
int find(const string &s, int pos = 0)const;//从pos开始查找字符串s在当前串中的位置
//查找成功时返回所在位置,失败返回string::npos的值

int rfind(char c, int pos = npos)const;//从pos开始从后向前查找字符c在当前串中的位置
int rfind(const char *s, int pos = npos) const;
int rfind(const char *s, int pos, int n = npos) const;
int rfind(const string &s,int pos = npos)const;
//从pos开始从后向前查找字符串s中前n个字符组成的字符串在当前串中的位置,成功返回所在位置,失败时返回string::npos的值

int find_first_of(char c, int pos = 0)const;//从pos开始查找字符c第一次出现的位置
int find_first_of(const char *s, int pos = 0) const;
int find_first_of(const char *s, int pos, int n) const;
int find_first_of(const string &s,int pos = 0)const;
//从pos开始查找当前串中第一个在s的前n个字符组成的数组里的字符的位置。查找失败返回string::npos

int find_first_not_of(char c, int pos = 0) const;
int find_first_not_of(const char *s, int pos = 0) const;
int find_first_not_of(const char *s, int pos,int n) const;
int find_first_not_of(const string &s,int pos = 0)const;
//从当前串中查找第一个不在串s中的字符出现的位置,失败返回string::npos

int find_last_of(char c, int pos = npos) const;
int find_last_of(const char *s, int pos = npos) const;
int find_last_of(const char *s, int pos, int n = npos) const;
int find_last_of(const string &s,int pos = npos)const;

int find_last_not_of(char c, int pos = npos) const;
int find_last_not_of(const char *s, int pos = npos) const;
int find_last_not_of(const char *s, int pos, int n) const;
int find_last_not_of(const string &s,int pos =npos) const;
//find_last_of和find_last_not_of与find_first_of和find_first_not_of相似,只不过是从后向前查找



string类的替换函数:

string &replace(int p0, int n0,const char*s);//删除从p0开始的n0个字符,然后在p0处插入串s
string &replace(int p0, int n0,const char *s, intn);//删除p0开始的n0个字符,然后在p0处插入字符串s的前n个字符
string &replace(int p0, int n0,const string&s);//删除从p0开始的n0个字符,然后在p0处插入串s
string &replace(int p0, int n0,const string&s, int pos, intn);//删除p0开始的n0个字符,然后在p0处插入串s中从pos开始的n个字符
string &replace(int p0, int n0,int n, charc);//删除p0开始的n0个字符,然后在p0处插入n个字符c
string &replace(iterator first0, iteratorlast0,const char *s);//把[first0,last0)之间的部分替换为字符串s
string &replace(iterator first0, iteratorlast0,const char *s, int n);//把[first0,last0)之间的部分替换为s的前n个字符
string &replace(iterator first0, iteratorlast0,const string&s);//把[first0,last0)之间的部分替换为串s
string &replace(iterator first0, iterator last0,intn, char c);//把[first0,last0)之间的部分替换为n个字符c
string &replace(iterator first0, iteratorlast0,const_iterator first, const_iteratorlast);//把[first0,last0)之间的部分替换成[first,last)之间的字符串

string类的插入函数:

string &insert(int p0, const char *s);
string &insert(int p0, const char *s, int n);
string &insert(int p0,const string&s);
string &insert(int p0,const string&s, int pos, int n);
//前4个函数在p0位置插入字符串s中pos开始的前n个字符
string &insert(int p0, int n, charc);//此函数在p0处插入n个字符c
iterator insert(iterator it, char c);//在it处插入字符c,返回插入后迭代器的位置
void insert(iterator it, const_iterator first, const_iteratorlast);//在it处插入[first,last)之间的字符
void insert(iterator it, int n, char c);//在it处插入n个字符c


string类的删除函数

iterator erase(iterator first, iteratorlast);//删除[first,last)之间的所有字符,返回删除后迭代器的位置
iterator erase(iterator it);//删除it指向的字符,返回删除后迭代器的位置
string &erase(int pos = 0, int n =npos);//删除pos开始的n个字符,返回修改后的字符串



string类的迭代器处理:

string类提供了向前和向后遍历的迭代器iterator,迭代器提供了访问各个字符的语法,类似于指针操作,迭代器不检查范围。
用string::iterator或string::const_iterator声明迭代器变量,const_iterator不允许改变迭代的内容。常用迭代器函数有:
const_iterator begin()const;
iterator begin(); //返回string的起始位置
const_iterator end()const;
iterator end(); //返回string的最后一个字符后面的位置
const_iterator rbegin()const;
iterator rbegin(); //返回string的最后一个字符的位置
const_iterator rend()const;
iterator rend(); //返回string第一个字符位置的前面
rbegin和rend用于从后向前的迭代访问,通过设置迭代器string::reverse_iterator,string::const_reverse_iterator实现


上述引用于http://www.cppblog.com/lmlf001/archive/2006/04/19/5883.html

第二个题目如下:

幸运数
题目详情:

如果一个数各个数位上的数字之和是质数,并且各个数位上的数字的平方和也是质数,则称它为幸运数。

给定x,y,求x,y之间( 包含x,y,即闭区间[x,y])有多少个幸运数。



例如1到20之间有4个幸运数,它们是11,12,14,16,像因为1+1 = 2是质数,1^2 + 1^2 =2也是质数等等。

给定函数原型,其中1<=x<=y<=1000000000,请完成函数,实现上述功能。


答题说明:
可额外编写其它的函数,然后lucky调用你编写的其它函数返回结果值;
限时3s,程序运行时间超过3s即挑战失败。


这个题目没搞定,超过了时间限制。

#include
#include
#include
#include
#include
using namespace std;



bool isprime( int number )//查表的方法判断素数
{
static bool prims[] = {
0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0,0, 1, 0, 0, 0, 0
, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0,0, 0, 0, 1, 0
, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1,0, 0, 1, 0, 0
, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1,1, 0, 1, 1, 1
, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0,1, 0, 0, 1, 0
, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1,1, 1, 1, 0, 1
, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1,1, 1, 0, 1, 0
, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1,1, 1, 1, 1, 1
, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1,1, 1, 1, 0, 1
, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1,1, 1, 1, 1, 1
, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1,1, 1, 1, 1, 0
, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 0, 1
, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 0
, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,0, 1, 1, 1, 1
, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1,1, 1, 1, 1, 1
, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1,1, 1, 1, 1, 1
, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 0, 1, 1, 0
, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 0
, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1
, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 0
, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1, 1, 1
};

return prims[number];
}

bool islucky(int number)
{

int sum=0; //存放各位之和
int quadraticSum=0; //存放各位数的平方和
while(number!=0)
{
int positionValue=number;
sum+=positionValue;
quadraticSum+=positionValue*positionValue;
number=number/10;
}
if(isprime(sum)&&isprime(quadraticSum))
return true;
return false;
}
int lucky(int x,int y) {
int count=0;
for(int i=x; i<=y; i++)
if(islucky(i))
count++;
return count;
}



int main()

cout<<"input"<<endl;
int x,y;
cin>>x>>y;
cout<<lucky(x,y);
system("pause");
}
//end 


最终两种办法都超出时间界限,看论坛里面也讨论得很火,其实取得10位数的各个位上的数值的函数就超时了,还无需考虑判断素数的时间了,猜想是不是可以先把所有幸运数列表,然后采用查表的方式进行计算是不是能够在限定时间内完成计算,网上只看到了一种解决办法,还没来得及细看……


CSDN上面看到的一种解决方法

#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<bitset>
using namespace std;

const int inf = 81*9+5;
bitset<inf> prime;

void init()
{
prime.set();
prime[0] = prime[1] = 0;
for(int i=4;i<inf;i+=2)
prime[i] = 0;
double t= sqrt(inf*1.0);
for(int i=3;i<=t;i+=2)
{
if(prime[i])
{
int k = i*i, p =i+i;
for(int j=k;j<inf;j+=p)
prime[j] = 0;
}
}
}

int judge(int n)
{
int s = 0, t = 0;
while(n)
{
s += n;
t += (n)*(n);
n /= 10;
}
return prime[s] && prime[t];
}



int sum[] =
{
0,9716,10446,10121,9077,9886,9140,7887,8856,8496,7646,10447,10348,9410,9631,10060,9214,9575,8990,8400,8370,10122,9410,10262,9740,9251,9591,9175,9086,8840,8965,9077,9631,9740,8792,9495,9067,8375,9051,8885,7935,9887,10060,9250,9495,9642,8936,8740,9570,8586,9076,9140,9214,9591,9067,8936,9176,8981,8638,8983,8781,7888,9575,9175,8375,8741,8981,8417,8400,8740,7430,8856,8990,9086,9050,9570,8637,8400,9182,8460,8530,8496,8400,8841,8885,8586,8983,8740,8460,8411,8390,7646,8370,8965,7936,9076,8781,7430,8530,8390,7451,
10447,10348,9410,9631,10060,9214,9575,8990,8400,8371,10348,9117,9227,9965,8792,9512,9599,8232,8901,8988,9410,9226,9905,9037,9011,8895,8936,9120,8461,8557,9631,9965,9038,9126,8984,8550,8681,8897,8637,8612,10060,8792,9011,8984,8897,8836,9286,8153,9097,9182,9213,9512,8895,8550,8835,8746,9197,9120,8995,8836,9575,9599,8936,8681,9286,9198,9150,9212,8930,8917,8990,8232,9121,8897,8153,9120,9212,8165,8967,8877,8400,8900,8461,8637,9097,8995,8930,8966,8165,8497,8371,8987,8557,8611,9182,8835,8918,8877,8498,8230,
10122,9410,10262,9740,9251,9591,9175,9086,8840,8966,9410,9226,9905,9037,9011,8895,8936,9120,8461,8557,10261,9905,8954,9798,9227,8897,9090,9251,8418,8984,9740,9038,9798,8976,8341,9195,9071,9197,9448,9057,9250,9011,9227,8341,9000,9045,8777,9177,8666,8931,9591,8895,8897,9195,9045,8022,9640,8981,8445,9265,9175,8936,9090,9071,8777,9640,9345,9050,8888,8910,9086,9120,9251,9197,9177,8981,9050,9486,9036,8717,8840,8461,8417,9448,8666,8445,8888,9036,7963,8490,8965,8558,8983,9057,8930,9265,8910,8718,8490,8360,
9077,9631,9740,8792,9495,9067,8375,9051,8885,7935,9631,9965,9038,9126,8984,8550,8681,8897,8637,8612,9740,9038,9798,8976,8341,9195,9071,9197,9448,9057,8793,9126,8976,8092,8601,9216,8023,8845,9397,8165,9495,8984,8341,8601,9270,8506,8751,9137,9050,8726,9067,8550,9196,9216,8506,8958,8730,8970,9302,9035,8375,8680,9071,8023,8751,8730,8355,8618,8690,7847,9051,8897,9198,8845,9137,8970,8618,9000,9128,9021,8885,8637,9448,9397,9050,9303,8690,9128,8762,8560,7935,8611,9057,8165,8726,9035,7848,9020,8560,7313,
9887,10060,9250,9495,9642,8936,8740,9570,8586,9077,10060,8792,9011,8984,8897,8836,9286,8153,9097,9182,9250,9011,9227,8341,9000,9045,8777,9177,8666,8930,9495,8984,8341,8601,9270,8506,8751,9137,9050,8726,9642,8897,9001,9270,8548,9435,9142,8355,9096,9392,8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,8741,9286,8778,8751,9142,8790,9126,8892,8566,8700,9570,8153,9177,9137,8355,9031,8892,8047,8897,9045,8585,9097,8666,9050,9095,9095,8566,8897,8540,8058,9076,9182,8930,8727,9392,9127,8700,9045,8057,8766,
9140,9214,9591,9067,8936,9176,8981,8638,8983,8781,9213,9512,8895,8550,8835,8746,9197,9120,8995,8836,9591,8895,8897,9195,9045,8022,9640,8981,8445,9265,9067,8550,9196,9216,8506,8958,8730,8970,9302,9035,8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,9175,8746,8023,8958,8656,7815,9123,8536,8048,8747,8981,9197,9640,8730,8790,9124,9586,8490,8885,8720,8637,9120,8981,8970,9030,8536,8490,8821,8660,8296,8983,8995,8445,9302,9095,8047,8885,8660,7702,8370,8781,8835,9265,9035,9128,8746,8720,8295,8370,7771,
7888,9575,9175,8375,8741,8981,8417,8400,8740,7431,9575,9599,8936,8681,9286,9198,9150,9212,8930,8917,9175,8936,9090,9071,8777,9640,9345,9050,8888,8910,8375,8680,9071,8023,8751,8730,8355,8618,8690,7847,8741,9286,8778,8751,9142,8790,9126,8892,8566,8701,8981,9197,9640,8730,8790,9124,9586,8490,8885,8720,8418,9150,9345,8355,9126,9586,7823,8765,8610,7702,8400,9212,9050,8618,8892,8490,8765,8745,8006,8417,8740,8930,8889,8690,8566,8885,8610,8006,7722,7320,7430,8917,8910,7847,8700,8720,7702,8418,7320,6916,
8856,8990,9086,9050,9570,8637,8400,9182,8460,8530,8990,8232,9121,8897,8153,9120,9212,8165,8967,8877,9086,9120,9251,9197,9177,8981,9050,9486,9036,8717,9051,8897,9198,8845,9137,8970,8618,9000,9128,9020,9570,8153,9177,9137,8355,9031,8892,8047,8897,9045,8637,9120,8981,8970,9030,8536,8490,8821,8660,8295,8400,9212,9050,8618,8892,8490,8765,8745,8006,8417,9182,8165,9487,9000,8047,8821,8745,7443,8561,8181,8460,8966,9036,9127,8897,8660,8006,8560,8071,7567,8531,8877,8718,9020,9045,8295,8418,8181,7567,7740,
8496,8400,8841,8885,8586,8983,8740,8460,8411,8390,8400,8900,8461,8637,9097,8995,8930,8966,8165,8497,8840,8461,8417,9448,8666,8445,8888,9036,7963,8491,8885,8637,9448,9397,9050,9303,8690,9128,8762,8560,8585,9097,8666,9050,9095,9095,8566,8897,8540,8058,8983,8995,8445,9302,9095,8047,8885,8660,7702,8370,8740,8930,8889,8690,8566,8885,8610,8006,7722,7320,8460,8966,9036,9127,8897,8660,8006,8560,8071,7567,8411,8165,7963,8762,8540,7702,7721,8071,6626,6855,8390,8498,8490,8560,8057,8371,7320,7567,6855,6697,
7646,8370,8965,7936,9076,8781,7430,8530,8390,7451,8371,8987,8557,8611,9182,8835,8918,8877,8498,8230,8965,8558,8983,9057,8930,9265,8910,8718,8490,8360,7935,8611,9057,8165,8726,9035,7848,9020,8560,7314,9076,9182,8930,8727,9392,9127,8700,9045,8057,8766,8781,8835,9265,9035,9128,8746,8720,8295,8370,7771,7430,8917,8910,7847,8700,8720,7702,8418,7320,6916,8531,8877,8718,9020,9045,8295,8418,8181,7567,7740,8390,8498,8490,8560,8057,8371,7320,7567,6855,6697,7452,8230,8360,7313,8766,7771,6916,7740,6697,6967,
10447,10348,9410,9631,10060,9214,9575,8990,8400,8371,10348,9117,9227,9965,8792,9512,9599,8232,8901,8988,9410,9226,9905,9037,9011,8895,8936,9120,8461,8557,9631,9965,9038,9126,8984,8550,8681,8897,8637,8612,10060,8792,9011,8984,8897,8836,9286,8153,9097,9182,9213,9512,8895,8550,8835,8746,9197,9120,8995,8836,9575,9599,8936,8681,9286,9198,9150,9212,8930,8917,8990,8232,9121,8897,8153,9120,9212,8165,8967,8877,8400,8900,8461,8637,9097,8995,8930,8966,8165,8497,8371,8987,8557,8611,9182,8835,8918,8877,8498,8231,
10348,9117,9227,9965,8792,9512,9599,8232,8901,8988,9117,9896,9360,8954,9126,9097,8121,8741,9060,7571,9227,9360,10500,8720,8976,9660,8835,8985,9950,9022,9965,8953,8720,9245,8092,9001,9107,8400,9120,9022,8793,9126,8976,8092,8601,9216,8023,8845,9397,8165,9512,9097,9660,9001,9216,10130,8867,9345,10065,9031,9599,8121,8836,9107,8022,8867,9137,7940,9486,8831,8232,8740,8985,8401,8845,9345,7940,8990,9035,7962,8901,9060,9950,9120,9397,10065,9486,9035,9985,8758,8987,7571,9021,9022,8165,9031,8831,7962,8757,8031,
9410,9226,9905,9037,9011,8895,8936,9120,8461,8557,9227,9360,10500,8720,8976,9660,8835,8985,9950,9021,9905,10501,9236,8817,10400,8600,9045,10211,9150,8995,9037,8720,8817,8937,8660,8290,8505,8867,8981,8810,9011,8976,10400,8661,9385,9495,9435,8730,10225,9486,8895,9660,8600,8290,9495,8440,8656,10050,8617,8811,8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,9120,8985,10210,8867,8730,10050,9031,9236,10145,8860,8461,9951,9150,8981,10225,8617,9095,10145,8700,8910,8557,9021,8995,8810,9486,8811,9127,8860,8910,8721,
9631,9965,9038,9126,8984,8550,8681,8897,8637,8612,9965,8953,8720,9245,8092,9001,9107,8400,9120,9022,9037,8720,8817,8937,8660,8290,8505,8867,8981,8811,9126,9245,8937,9205,8625,8825,8440,9142,8970,8990,8984,8092,8660,8625,8102,8541,8898,7815,9031,9000,8550,9000,8290,8825,8541,8960,8400,8855,8536,8566,8681,9107,8505,8440,8898,8400,8967,8840,8491,8736,8897,8400,8867,9142,7815,8855,8840,7823,8821,8640,8637,9120,8981,8970,9030,8536,8490,8821,8660,8295,8611,9022,8810,8991,9000,8567,8735,8640,8295,8007,
10060,8792,9011,8984,8897,8836,9286,8153,9097,9182,8793,9126,8976,8092,8601,9216,8023,8845,9397,8165,9011,8976,10400,8661,9385,9495,9435,8730,10225,9486,8984,8092,8660,8625,8102,8541,8898,7815,9031,9000,8897,8601,9385,8102,9076,9082,8300,8968,9586,8047,8836,9216,9495,8541,9082,9905,8825,8751,10130,8822,9286,8022,9435,8898,8300,8826,9276,7988,8921,8745,8154,8845,8730,7815,8967,8751,7988,8660,8545,7443,9097,9397,10225,9031,9586,10130,8921,8545,9640,8560,9182,8165,9487,9000,8047,8821,8745,7443,8561,8181,
9213,9512,8895,8550,8835,8746,9197,9120,8995,8835,9512,9097,9660,9001,9216,10130,8867,9345,10065,9031,8895,9660,8600,8290,9495,8440,8656,10050,8617,8811,8550,9000,8290,8825,8541,8960,8400,8855,8536,8566,8836,9216,9495,8541,9082,9905,8825,8751,10130,8821,8746,10130,8440,8960,9905,8775,9196,10430,8660,8480,9197,8867,8656,8400,8825,9196,9017,8817,8750,8433,9120,9345,10050,8855,8751,10430,8817,9035,9715,8201,8995,10065,8617,8536,10130,8660,8750,9715,8306,8406,8835,9031,8811,8566,8821,8480,8433,8201,8406,7398,
9575,9599,8936,8681,9286,9198,9150,9212,8930,8917,9599,8121,8836,9107,8022,8867,9137,7940,9486,8831,8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,8681,9107,8505,8440,8898,8400,8967,8840,8491,8736,9286,8022,9435,8898,8300,8826,9276,7988,8921,8745,9197,8867,8656,8400,8825,9196,9017,8817,8750,8434,9150,9137,8790,8968,9276,9018,9065,8885,8877,8306,9212,7940,9030,8840,7988,8817,8885,7755,8016,8601,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,8917,8831,9128,8735,8745,8433,8307,8601,8025,7830,
8990,8232,9121,8897,8153,9120,9212,8165,8967,8877,8232,8740,8985,8401,8845,9345,7940,8990,9035,7962,9120,8985,10210,8867,8730,10050,9031,9236,10145,8861,8897,8400,8867,9142,7815,8855,8840,7823,8821,8640,8154,8845,8730,7815,8967,8751,7988,8660,8545,7443,9120,9345,10050,8855,8751,10430,8817,9035,9715,8201,9212,7940,9030,8840,7988,8817,8885,7755,8016,8601,8165,8991,9236,7823,8660,9035,7755,8657,8430,7200,8966,9035,10145,8821,8545,9715,8016,8430,9190,7536,8877,7962,8860,8640,7443,8202,8601,7200,7535,7563,
8400,8900,8461,8637,9097,8995,8930,8966,8165,8497,8901,9060,9950,9120,9397,10065,9486,9035,9985,8757,8461,9951,9150,8981,10225,8617,9095,10145,8700,8910,8637,9120,8981,8970,9030,8536,8490,8821,8660,8295,9097,9397,10225,9031,9586,10130,8921,8545,9640,8560,8995,10065,8617,8536,10130,8660,8750,9715,8306,8406,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,8966,9035,10145,8821,8545,9715,8016,8430,9190,7535,8165,9985,8700,8660,9640,8306,8285,9190,7645,7380,8497,8757,8910,8295,8560,8406,8025,7535,7380,6947,
8371,8987,8557,8611,9182,8835,8918,8877,8498,8231,8987,7571,9021,9022,8165,9031,8831,7962,8757,8030,8557,9021,8995,8810,9486,8811,9127,8860,8910,8721,8611,9022,8810,8991,9000,8567,8735,8640,8295,8006,9182,8165,9487,9000,8047,8821,8745,7443,8561,8181,8835,9031,8811,8566,8821,8480,8433,8201,8406,7397,8917,8831,9128,8735,8745,8433,8307,8601,8025,7831,8877,7962,8860,8640,7443,8202,8601,7200,7535,7563,8497,8757,8910,8295,8560,8406,8025,7535,7380,6948,8230,8030,8721,8007,8181,7397,7830,7563,6947,6815,
10122,9410,10262,9740,9251,9591,9175,9086,8840,8966,9410,9226,9905,9037,9011,8895,8936,9120,8461,8557,10261,9905,8954,9798,9227,8897,9090,9251,8418,8984,9740,9038,9798,8976,8341,9195,9071,9197,9448,9057,9250,9011,9227,8341,9000,9045,8777,9177,8666,8931,9591,8895,8897,9195,9045,8022,9640,8981,8445,9265,9175,8936,9090,9071,8777,9640,9345,9050,8888,8910,9086,9120,9251,9197,9177,8981,9050,9486,9036,8717,8840,8461,8417,9448,8666,8445,8888,9036,7963,8490,8965,8558,8983,9057,8930,9265,8910,8718,8490,8361,
9410,9226,9905,9037,9011,8895,8936,9120,8461,8557,9227,9360,10500,8720,8976,9660,8835,8985,9950,9021,9905,10501,9236,8817,10400,8600,9045,10211,9150,8995,9037,8720,8817,8937,8660,8290,8505,8867,8981,8810,9011,8976,10400,8661,9385,9495,9435,8730,10225,9486,8895,9660,8600,8290,9495,8440,8656,10050,8617,8811,8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,9120,8985,10210,8867,8730,10050,9031,9236,10145,8860,8461,9951,9150,8981,10225,8617,9095,10145,8700,8910,8557,9021,8995,8810,9486,8811,9127,8860,8910,8721,
10261,9905,8954,9798,9227,8897,9090,9251,8418,8983,9905,10501,9236,8817,10400,8600,9045,10211,9150,8995,8954,9236,9247,8462,9206,9385,8549,8751,9345,8446,9798,8817,8462,9310,9211,8103,8828,8656,8355,9302,9227,10400,9205,9211,10140,9076,8960,10295,9125,9095,8897,8601,9385,8102,9076,9082,8300,8968,9586,8047,9090,9045,8549,8828,8960,8300,9325,8831,7823,8885,9251,10211,8751,8656,10295,8967,8831,10130,8765,8660,8418,9150,9345,8355,9126,9586,7823,8765,8610,7703,8983,8995,8445,9302,9095,8047,8885,8660,7702,8371,
9740,9038,9798,8976,8341,9195,9071,9197,9448,9057,9037,8720,8817,8937,8660,8290,8505,8867,8981,8811,9798,8817,8462,9310,9211,8103,8828,8656,8355,9302,8976,8937,9311,8466,8209,9053,9082,8400,9124,9236,8341,8660,9211,8208,9200,8341,9010,8825,8831,8490,9195,8290,8103,9053,8341,8025,9012,9196,7988,8697,9071,8506,8828,9082,9010,9012,9175,9018,9101,8545,9197,8867,8656,8400,8825,9196,9017,8817,8750,8433,9448,8981,8355,9123,8831,7989,9101,8750,7506,8567,9057,8810,9303,9236,8490,8697,8545,8433,8567,7700,
9250,9011,9227,8341,9000,9045,8777,9177,8666,8930,9011,8976,10400,8661,9385,9495,9435,8730,10225,9486,9227,10400,9205,9211,10140,9076,8960,10295,9125,9095,8341,8660,9211,8208,9200,8341,9010,8825,8831,8490,9001,9385,10140,9200,9427,10280,9501,9175,10430,8921,9045,9495,9076,8341,10280,8940,9175,9966,9065,8750,8777,9435,8960,9010,9501,9175,9502,8915,8880,8877,9177,8730,10295,8825,9175,9965,8915,8920,9570,8015,8666,10225,9125,8831,10431,9065,8880,9570,8656,8285,8930,9486,9095,8490,8921,8750,8877,8015,8285,8026,
9591,8895,8897,9195,9045,8022,9640,8981,8445,9265,8895,9660,8600,8290,9495,8440,8656,10050,8617,8811,8897,8601,9385,8102,9076,9082,8300,8968,9586,8047,9195,8290,8103,9053,8341,8025,9012,9196,7988,8697,9045,9495,9076,8341,10280,8940,9175,9966,9065,8750,8022,8440,9082,8025,8941,8670,8446,9025,8920,7755,9640,8656,8300,9012,9175,8446,9181,9280,7722,8697,8981,10050,8967,9196,9966,9025,9280,9980,8821,8266,8445,8618,9586,7989,9065,8920,7722,8822,8156,7277,9265,8811,8047,8697,8750,7755,8697,8266,7277,8075,
9175,8936,9090,9071,8777,9640,9345,9050,8888,8910,8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,9090,9045,8549,8828,8960,8300,9325,8831,7823,8885,9071,8506,8828,9082,9010,9012,9175,9018,9101,8545,8777,9435,8960,9010,9501,9175,9502,8915,8880,8877,9640,8656,8300,9012,9175,8446,9181,9280,7722,8697,9345,8790,9325,9175,9503,9181,8645,8700,8476,8156,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,8888,9095,7824,9101,8880,7722,8475,8411,7111,7595,8910,9127,8885,8545,8877,8698,8156,7785,7595,7276,
9086,9120,9251,9197,9177,8981,9050,9486,9036,8717,9120,8985,10210,8867,8730,10050,9031,9236,10145,8860,9251,10211,8751,8656,10295,8967,8831,10130,8765,8660,9197,8867,8656,8400,8825,9196,9017,8817,8750,8433,9177,8730,10295,8825,9175,9965,8915,8920,9570,8015,8981,10050,8967,9196,9966,9025,9280,9980,8821,8266,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,9487,9236,10130,8817,8920,9980,8717,7846,9235,8010,9036,10145,8765,8750,9570,8821,8411,9235,8060,7776,8717,8860,8660,8433,8015,8266,7785,8010,7776,7060,
8840,8461,8417,9448,8666,8445,8888,9036,7963,8490,8461,9951,9150,8981,10225,8617,9095,10145,8700,8910,8418,9150,9345,8355,9126,9586,7823,8765,8610,7702,9448,8981,8355,9123,8831,7989,9101,8750,7506,8567,8666,10225,9125,8831,10431,9065,8880,9570,8656,8285,8445,8618,9586,7989,9065,8920,7722,8822,8156,7277,8888,9095,7824,9101,8880,7722,8475,8411,7111,7595,9036,10145,8765,8750,9570,8821,8411,9235,8060,7776,7962,8700,8610,7506,8657,8156,7111,8060,7032,6753,8490,8910,7702,8567,8285,7277,7595,7776,6752,7105,
8965,8558,8983,9057,8930,9265,8910,8718,8490,8360,8557,9021,8995,8810,9486,8811,9127,8860,8910,8722,8983,8995,8445,9302,9095,8047,8885,8660,7702,8370,9057,8810,9303,9236,8490,8697,8545,8433,8567,7700,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,9265,8811,8047,8697,8750,7755,8697,8266,7277,8075,8910,9127,8885,8545,8877,8698,8156,7785,7595,7276,8717,8860,8660,8433,8015,8266,7785,8010,7776,7061,8490,8910,7702,8567,8285,7277,7595,7776,6752,7105,8360,8721,8370,7700,8025,8075,7276,7060,7105,6660,
9077,9631,9740,8792,9495,9067,8375,9051,8885,7935,9631,9965,9038,9126,8984,8550,8681,8897,8637,8612,9740,9038,9798,8976,8341,9195,9071,9197,9448,9057,8793,9126,8976,8092,8601,9216,8023,8845,9397,8165,9495,8984,8341,8601,9270,8506,8751,9137,9050,8726,9067,8550,9196,9216,8506,8958,8730,8970,9302,9035,8375,8680,9071,8023,8751,8730,8355,8618,8690,7847,9051,8897,9198,8845,9137,8970,8618,9000,9128,9021,8885,8637,9448,9397,9050,9303,8690,9128,8762,8560,7935,8611,9057,8165,8726,9035,7848,9020,8560,7313,
9631,9965,9038,9126,8984,8550,8681,8897,8637,8612,9965,8953,8720,9245,8092,9001,9107,8400,9120,9022,9037,8720,8817,8937,8660,8290,8505,8867,8981,8811,9126,9245,8937,9205,8625,8825,8440,9142,8970,8990,8984,8092,8660,8625,8102,8541,8898,7815,9031,9000,8550,9000,8290,8825,8541,8960,8400,8855,8536,8566,8681,9107,8505,8440,8898,8400,8967,8840,8491,8736,8897,8400,8867,9142,7815,8855,8840,7823,8821,8640,8637,9120,8981,8970,9030,8536,8490,8821,8660,8295,8611,9022,8810,8991,9000,8567,8735,8640,8295,8007,
9740,9038,9798,8976,8341,9195,9071,9197,9448,9057,9037,8720,8817,8937,8660,8290,8505,8867,8981,8811,9798,8817,8462,9310,9211,8103,8828,8656,8355,9302,8976,8937,9311,8466,8209,9053,9082,8400,9124,9236,8341,8660,9211,8208,9200,8341,9010,8825,8831,8490,9195,8290,8103,9053,8341,8025,9012,9196,7988,8697,9071,8506,8828,9082,9010,9012,9175,9018,9101,8545,9197,8867,8656,8400,8825,9196,9017,8817,8750,8433,9448,8981,8355,9123,8831,7989,9101,8750,7506,8567,9057,8810,9303,9236,8490,8697,8545,8433,8567,7700,
8793,9126,8976,8092,8601,9216,8023,8845,9397,8166,9126,9245,8937,9205,8625,8825,8440,9142,8970,8990,8976,8937,9311,8466,8209,9053,9082,8400,9124,9236,8092,9206,8466,7918,8486,9427,8025,8775,8751,7823,8600,8625,8209,8486,9155,8765,8941,9382,9017,8661,9216,8826,9053,9427,8765,9438,8670,9503,9471,9035,8022,8440,9082,8025,8941,8670,8446,9025,8920,7756,8845,9142,8400,8776,9382,9503,9025,8765,8562,8656,9397,8970,9123,8751,9018,9471,8920,8562,8698,8430,8165,8991,9236,7823,8660,9035,7755,8657,8430,7200,
9495,8984,8341,8601,9270,8506,8751,9137,9050,8726,8984,8092,8660,8625,8102,8541,8898,7815,9031,9000,8341,8660,9211,8208,9200,8341,9010,8825,8831,8490,8600,8625,8209,8486,9155,8765,8941,9382,9017,8661,9270,8102,9200,9155,8395,9181,9652,8445,8915,8885,8505,8541,8341,8765,9181,9075,8842,8946,9280,8563,8751,8898,9010,8940,9652,8843,9340,9040,8700,8821,9137,7815,8826,9382,8445,8946,9040,7846,8716,8425,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,8727,9000,8490,8660,8885,8562,8821,8425,7785,8015,
9067,8550,9196,9216,8506,8958,8730,8970,9302,9035,8550,9000,8290,8825,8541,8960,8400,8855,8536,8566,9195,8290,8103,9053,8341,8025,9012,9196,7988,8698,9216,8826,9053,9427,8765,9438,8670,9503,9471,9035,8505,8541,8341,8765,9181,9075,8842,8946,9280,8563,8958,8960,8025,9437,9075,8096,8785,9025,7846,8475,8730,8400,9013,8670,8842,8785,8660,8353,8237,7846,8970,8855,9196,9502,8946,9025,8353,8796,8651,7891,9302,8536,7989,9471,9280,7846,8236,8651,7201,8010,9035,8566,8697,9035,8562,8476,7846,7891,8010,7032,
8375,8680,9071,8023,8751,8730,8355,8618,8690,7847,8681,9107,8505,8440,8898,8400,8967,8840,8491,8735,9071,8506,8828,9082,9010,9012,9175,9018,9101,8545,8022,8440,9082,8025,8941,8670,8446,9025,8920,7756,8751,8898,9010,8940,9652,8843,9340,9040,8700,8821,8730,8400,9013,8670,8842,8785,8660,8353,8237,7846,8355,8967,9175,8446,9340,8660,7712,8840,8090,7201,8617,8840,9018,9025,9040,8353,8840,8651,7891,8156,8690,8491,9101,8920,8700,8236,8090,7891,7575,7135,7848,8735,8545,7755,8822,7846,7201,8155,7135,6876,
9051,8897,9198,8845,9137,8970,8618,9000,9128,9021,8897,8400,8867,9142,7815,8855,8840,7823,8821,8640,9197,8867,8656,8400,8825,9196,9017,8817,8750,8434,8845,9142,8400,8776,9382,9503,9025,8765,8562,8656,9137,7815,8826,9382,8445,8946,9040,7846,8716,8425,8970,8855,9196,9502,8946,9025,8353,8796,8651,7891,8617,8840,9018,9025,9040,8353,8840,8651,7891,8156,9000,7823,8817,8765,7846,8796,8651,6946,7445,7709,9127,8821,8750,8562,8716,8651,7891,7445,8002,7544,9020,8640,8433,8656,8425,7891,8155,7709,7543,7521,
8885,8637,9448,9397,9050,9303,8690,9128,8762,8560,8637,9120,8981,8970,9030,8536,8490,8821,8660,8295,9448,8981,8355,9123,8831,7989,9101,8750,7506,8567,9397,8970,9123,8751,9018,9471,8920,8562,8698,8430,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,9302,8536,7989,9471,9280,7846,8236,8651,7201,8011,8690,8491,9101,8920,8700,8236,8090,7891,7575,7135,9127,8821,8750,8562,8716,8651,7891,7445,8002,7544,8762,8660,7506,8697,8411,7201,7575,8002,6712,7446,8560,8295,8568,8430,7785,8010,7135,7543,7446,6370,
7935,8611,9057,8165,8726,9035,7848,9020,8560,7313,8611,9022,8810,8991,9000,8567,8735,8640,8295,8006,9057,8810,9303,9236,8490,8697,8545,8433,8567,7700,8165,8991,9236,7823,8660,9035,7755,8657,8430,7200,8727,9000,8490,8660,8885,8562,8821,8425,7785,8015,9035,8566,8697,9035,8562,8476,7846,7891,8010,7032,7848,8735,8545,7755,8822,7846,7201,8155,7135,6877,9020,8640,8433,8656,8425,7891,8155,7709,7543,7520,8560,8295,8568,8430,7785,8010,7135,7543,7446,6370,7313,8006,7700,7200,8015,7032,6876,7520,6370,6250,
9887,10060,9250,9495,9642,8936,8740,9570,8586,9077,10060,8792,9011,8984,8897,8836,9286,8153,9097,9182,9250,9011,9227,8341,9000,9045,8777,9177,8666,8930,9495,8984,8341,8601,9270,8506,8751,9137,9050,8726,9642,8897,9001,9270,8548,9435,9142,8355,9096,9392,8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,8741,9286,8778,8751,9142,8790,9126,8892,8566,8700,9570,8153,9177,9137,8355,9031,8892,8047,8897,9045,8585,9097,8666,9050,9095,9095,8566,8897,8540,8058,9076,9182,8930,8727,9392,9127,8700,9045,8057,8767,
10060,8792,9011,8984,8897,8836,9286,8153,9097,9182,8793,9126,8976,8092,8601,9216,8023,8845,9397,8165,9011,8976,10400,8661,9385,9495,9435,8730,10225,9486,8984,8092,8660,8625,8102,8541,8898,7815,9031,9000,8897,8601,9385,8102,9076,9082,8300,8968,9586,8047,8836,9216,9495,8541,9082,9905,8825,8751,10130,8822,9286,8022,9435,8898,8300,8826,9276,7988,8921,8745,8154,8845,8730,7815,8967,8751,7988,8660,8545,7443,9097,9397,10225,9031,9586,10130,8921,8545,9640,8560,9182,8165,9487,9000,8047,8821,8745,7443,8561,8181,
9250,9011,9227,8341,9000,9045,8777,9177,8666,8930,9011,8976,10400,8661,9385,9495,9435,8730,10225,9486,9227,10400,9205,9211,10140,9076,8960,10295,9125,9095,8341,8660,9211,8208,9200,8341,9010,8825,8831,8490,9001,9385,10140,9200,9427,10280,9501,9175,10430,8921,9045,9495,9076,8341,10280,8940,9175,9966,9065,8750,8777,9435,8960,9010,9501,9175,9502,8915,8880,8877,9177,8730,10295,8825,9175,9965,8915,8920,9570,8015,8666,10225,9125,8831,10431,9065,8880,9570,8656,8285,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,
9495,8984,8341,8601,9270,8506,8751,9137,9050,8726,8984,8092,8660,8625,8102,8541,8898,7815,9031,9000,8341,8660,9211,8208,9200,8341,9010,8825,8831,8490,8600,8625,8209,8486,9155,8765,8941,9382,9017,8661,9270,8102,9200,9155,8395,9181,9652,8445,8915,8885,8505,8541,8341,8765,9181,9075,8842,8946,9280,8563,8751,8898,9010,8940,9652,8843,9340,9040,8700,8821,9137,7815,8826,9382,8445,8946,9040,7846,8716,8425,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,8727,9000,8490,8660,8885,8562,8821,8425,7785,8015,
9642,8897,9001,9270,8548,9435,9142,8355,9096,9392,8897,8601,9385,8102,9076,9082,8300,8968,9586,8047,9001,9385,10140,9200,9427,10280,9501,9175,10430,8922,9270,8102,9200,9155,8395,9181,9652,8445,8915,8885,8548,9076,9427,8395,9112,9400,8097,9340,8645,7722,9435,9082,10280,9182,9400,10325,9436,8660,10110,8716,9142,8300,9501,9652,8096,9436,9475,7712,8797,8381,8355,8967,9175,8446,9340,8660,7712,8840,8090,7201,9096,9586,10430,8915,8645,10110,8796,8090,9165,7666,9392,8047,8921,8885,7722,8717,8381,7201,7665,7894,
8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,8836,9216,9495,8541,9082,9905,8825,8751,10130,8821,9045,9495,9076,8341,10280,8940,9175,9966,9065,8750,8505,8541,8341,8765,9181,9075,8842,8946,9280,8562,9435,9082,10280,9182,9400,10325,9436,8660,10110,8716,8656,9905,8940,9075,10325,8775,8850,9945,8840,8651,8790,8825,9175,8842,9436,8850,8707,8341,8350,7891,9030,8751,9965,8946,8660,9945,8342,7905,9025,7445,9095,10131,9065,9280,10110,8840,8350,9025,8405,8002,9127,8821,8750,8562,8716,8651,7891,7445,8002,7543,
8741,9286,8778,8751,9142,8790,9126,8892,8566,8701,9286,8022,9435,8898,8300,8826,9276,7988,8921,8745,8777,9435,8960,9010,9501,9175,9502,8915,8880,8878,8751,8898,9010,8940,9652,8843,9340,9040,8700,8821,9142,8300,9501,9652,8096,9436,9475,7712,8797,8381,8790,8825,9175,8842,9436,8850,8707,8341,8350,7891,9126,9276,9503,9340,9475,8707,8441,8586,8107,8406,8892,7988,8915,9040,7712,8342,8586,7420,7290,7807,8566,8921,8880,8700,8796,8350,8107,7290,7840,7476,8700,8745,8877,8822,8381,7891,8405,7807,7476,7811,
9570,8153,9177,9137,8355,9031,8892,8047,8897,9045,8154,8845,8730,7815,8967,8751,7988,8660,8545,7443,9177,8730,10295,8825,9175,9965,8915,8920,9570,8015,9137,7815,8826,9382,8445,8946,9040,7846,8716,8425,8355,8967,9175,8446,9340,8660,7712,8840,8090,7201,9030,8751,9965,8946,8660,9945,8342,7905,9025,7446,8892,7988,8915,9040,7712,8342,8586,7420,7290,7807,8047,8660,8920,7846,8841,7905,7420,8175,7456,6740,8897,8545,9570,8716,8090,9025,7290,7456,8455,6945,9045,7443,8015,8425,7201,7445,7807,6740,6946,7675,
8585,9097,8666,9050,9095,9095,8566,8897,8540,8057,9097,9397,10225,9031,9586,10130,8921,8545,9640,8560,8666,10225,9125,8831,10431,9065,8880,9570,8656,8285,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,9096,9586,10430,8915,8645,10110,8796,8090,9165,7665,9095,10131,9065,9280,10110,8840,8350,9025,8405,8002,8566,8921,8880,8700,8796,8350,8107,7290,7840,7476,8897,8545,9570,8716,8090,9025,7290,7456,8455,6945,8540,9640,8656,8411,9165,8405,7840,8455,7791,7265,8057,8560,8285,7785,7665,8002,7476,6945,7265,7031,
9076,9182,8930,8727,9392,9127,8700,9045,8057,8766,9182,8165,9487,9000,8047,8821,8745,7443,8561,8181,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,8727,9000,8490,8660,8885,8562,8821,8425,7785,8016,9392,8047,8921,8885,7722,8717,8381,7201,7665,7894,9127,8821,8750,8562,8716,8651,7891,7445,8002,7543,8700,8745,8877,8822,8381,7891,8405,7807,7476,7811,9045,7443,8015,8425,7201,7445,7807,6740,6946,7675,8057,8560,8285,7785,7665,8002,7476,6945,7265,7030,8767,8181,8025,8015,7894,7543,7812,7675,7030,7366,
9140,9214,9591,9067,8936,9176,8981,8638,8983,8781,9213,9512,8895,8550,8835,8746,9197,9120,8995,8836,9591,8895,8897,9195,9045,8022,9640,8981,8445,9265,9067,8550,9196,9216,8506,8958,8730,8970,9302,9035,8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,9175,8746,8023,8958,8656,7815,9123,8536,8048,8747,8981,9197,9640,8730,8790,9124,9586,8490,8885,8720,8637,9120,8981,8970,9030,8536,8490,8821,8660,8296,8983,8995,8445,9302,9095,8047,8885,8660,7702,8370,8781,8835,9265,9035,9128,8746,8720,8295,8370,7771,
9213,9512,8895,8550,8835,8746,9197,9120,8995,8835,9512,9097,9660,9001,9216,10130,8867,9345,10065,9031,8895,9660,8600,8290,9495,8440,8656,10050,8617,8811,8550,9000,8290,8825,8541,8960,8400,8855,8536,8566,8836,9216,9495,8541,9082,9905,8825,8751,10130,8821,8746,10130,8440,8960,9905,8775,9196,10430,8660,8480,9197,8867,8656,8400,8825,9196,9017,8817,8750,8433,9120,9345,10050,8855,8751,10430,8817,9035,9715,8201,8995,10065,8617,8536,10130,8660,8750,9715,8306,8406,8835,9031,8811,8566,8821,8480,8433,8201,8406,7398,
9591,8895,8897,9195,9045,8022,9640,8981,8445,9265,8895,9660,8600,8290,9495,8440,8656,10050,8617,8811,8897,8601,9385,8102,9076,9082,8300,8968,9586,8047,9195,8290,8103,9053,8341,8025,9012,9196,7988,8697,9045,9495,9076,8341,10280,8940,9175,9966,9065,8750,8022,8440,9082,8025,8941,8670,8446,9025,8920,7755,9640,8656,8300,9012,9175,8446,9181,9280,7722,8697,8981,10050,8967,9196,9966,9025,9280,9980,8821,8266,8445,8618,9586,7989,9065,8920,7722,8822,8156,7277,9265,8811,8047,8697,8750,7755,8697,8266,7277,8075,
9067,8550,9196,9216,8506,8958,8730,8970,9302,9035,8550,9000,8290,8825,8541,8960,8400,8855,8536,8566,9195,8290,8103,9053,8341,8025,9012,9196,7988,8698,9216,8826,9053,9427,8765,9438,8670,9503,9471,9035,8505,8541,8341,8765,9181,9075,8842,8946,9280,8563,8958,8960,8025,9437,9075,8096,8785,9025,7846,8475,8730,8400,9013,8670,8842,8785,8660,8353,8237,7846,8970,8855,9196,9502,8946,9025,8353,8796,8651,7891,9302,8536,7989,9471,9280,7846,8236,8651,7201,8010,9035,8566,8697,9035,8562,8476,7846,7891,8010,7032,
8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,8836,9216,9495,8541,9082,9905,8825,8751,10130,8821,9045,9495,9076,8341,10280,8940,9175,9966,9065,8750,8505,8541,8341,8765,9181,9075,8842,8946,9280,8562,9435,9082,10280,9182,9400,10325,9436,8660,10110,8716,8656,9905,8940,9075,10325,8775,8850,9945,8840,8651,8790,8825,9175,8842,9436,8850,8707,8341,8350,7891,9030,8751,9965,8946,8660,9945,8342,7905,9025,7445,9095,10131,9065,9280,10110,8840,8350,9025,8405,8002,9127,8821,8750,8562,8716,8651,7891,7445,8002,7543,
9175,8746,8023,8958,8656,7815,9123,8536,8048,8746,8746,10130,8440,8960,9905,8775,9196,10430,8660,8480,8022,8440,9082,8025,8941,8670,8446,9025,8920,7756,8958,8960,8025,9437,9075,8096,8785,9025,7846,8475,8656,9905,8940,9075,10325,8775,8850,9945,8840,8651,7815,8776,8670,8096,8775,8615,7783,8441,7905,6946,9123,9196,8445,8785,8850,7783,8946,8620,7420,8040,8536,10431,9025,9025,9945,8440,8620,9135,8175,7840,8047,8660,8920,7846,8841,7905,7420,8175,7456,6741,8746,8480,7755,8475,8651,6946,8040,7840,6740,7419,
8981,9197,9640,8730,8790,9124,9586,8490,8885,8720,9197,8867,8656,8400,8825,9196,9017,8817,8750,8433,9640,8656,8300,9012,9175,8446,9181,9280,7722,8697,8730,8400,9013,8670,8842,8785,8660,8353,8237,7846,8790,8825,9175,8842,9436,8850,8707,8341,8350,7891,9123,9196,8445,8785,8850,7783,8946,8620,7420,8041,9586,9018,9181,8660,8707,8946,8356,8156,7775,7456,8490,8817,9280,8353,8341,8620,8156,7720,7472,7257,8885,8750,7722,8236,8350,7420,7775,7472,6307,6812,8720,8433,8698,7846,7891,8040,7456,7257,6813,6950,
8637,9120,8981,8970,9030,8536,8490,8821,8660,8295,9120,9345,10050,8855,8751,10430,8817,9035,9715,8201,8981,10050,8967,9196,9966,9025,9280,9980,8821,8266,8970,8855,9196,9502,8946,9025,8353,8796,8651,7891,9030,8751,9965,8946,8660,9945,8342,7905,9025,7445,8536,10431,9025,9025,9945,8440,8620,9135,8175,7840,8490,8817,9280,8353,8341,8620,8156,7720,7472,7257,8821,9035,9980,8797,7905,9135,7720,7241,9145,7145,8660,9715,8821,8651,9025,8175,7472,9145,7706,7350,8295,8201,8266,7891,7445,7840,7257,7145,7350,6796,
8983,8995,8445,9302,9095,8047,8885,8660,7702,8370,8995,10065,8617,8536,10130,8660,8750,9715,8306,8406,8445,8618,9586,7989,9065,8920,7722,8822,8156,7277,9302,8536,7989,9471,9280,7846,8236,8651,7201,8010,9095,10131,9065,9280,10110,8840,8350,9025,8405,8002,8047,8660,8920,7846,8841,7905,7420,8175,7456,6740,8885,8750,7722,8236,8350,7420,7775,7472,6307,6812,8660,9715,8821,8651,9025,8175,7472,9145,7706,7350,7702,8307,8156,7201,8405,7456,6307,7706,6811,6550,8370,8406,7277,8010,8002,6740,6812,7350,6551,6908,
8781,8835,9265,9035,9128,8746,8720,8295,8370,7771,8835,9031,8811,8566,8821,8480,8433,8201,8406,7397,9265,8811,8047,8697,8750,7755,8697,8266,7277,8075,9035,8566,8697,9035,8562,8476,7846,7891,8010,7032,9127,8821,8750,8562,8716,8651,7891,7445,8002,7544,8746,8480,7755,8475,8651,6946,8040,7840,6740,7418,8720,8433,8698,7846,7891,8040,7456,7257,6813,6950,8295,8201,8266,7891,7445,7840,7257,7145,7350,6795,8370,8406,7277,8010,8002,6740,6812,7350,6551,6908,7771,7397,8075,7032,7543,7419,6950,6796,6908,6796,
7888,9575,9175,8375,8741,8981,8417,8400,8740,7431,9575,9599,8936,8681,9286,9198,9150,9212,8930,8917,9175,8936,9090,9071,8777,9640,9345,9050,8888,8910,8375,8680,9071,8023,8751,8730,8355,8618,8690,7847,8741,9286,8778,8751,9142,8790,9126,8892,8566,8701,8981,9197,9640,8730,8790,9124,9586,8490,8885,8720,8418,9150,9345,8355,9126,9586,7823,8765,8610,7702,8400,9212,9050,8618,8892,8490,8765,8745,8006,8417,8740,8930,8889,8690,8566,8885,8610,8006,7722,7320,7430,8917,8910,7847,8700,8720,7702,8418,7320,6917,
9575,9599,8936,8681,9286,9198,9150,9212,8930,8917,9599,8121,8836,9107,8022,8867,9137,7940,9486,8831,8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,8681,9107,8505,8440,8898,8400,8967,8840,8491,8736,9286,8022,9435,8898,8300,8826,9276,7988,8921,8745,9197,8867,8656,8400,8825,9196,9017,8817,8750,8434,9150,9137,8790,8968,9276,9018,9065,8885,8877,8306,9212,7940,9030,8840,7988,8817,8885,7755,8016,8601,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,8917,8831,9128,8735,8745,8433,8307,8601,8025,7830,
9175,8936,9090,9071,8777,9640,9345,9050,8888,8910,8936,8835,9045,8505,9435,8656,8790,9030,9095,9127,9090,9045,8549,8828,8960,8300,9325,8831,7823,8885,9071,8506,8828,9082,9010,9012,9175,9018,9101,8545,8777,9435,8960,9010,9501,9175,9502,8915,8880,8877,9640,8656,8300,9012,9175,8446,9181,9280,7722,8697,9345,8790,9325,9175,9503,9181,8645,8700,8476,8156,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,8888,9095,7824,9101,8880,7722,8475,8411,7111,7595,8910,9127,8885,8545,8877,8698,8156,7785,7595,7276,
8375,8680,9071,8023,8751,8730,8355,8618,8690,7847,8681,9107,8505,8440,8898,8400,8967,8840,8491,8735,9071,8506,8828,9082,9010,9012,9175,9018,9101,8545,8022,8440,9082,8025,8941,8670,8446,9025,8920,7756,8751,8898,9010,8940,9652,8843,9340,9040,8700,8821,8730,8400,9013,8670,8842,8785,8660,8353,8237,7846,8355,8967,9175,8446,9340,8660,7712,8840,8090,7201,8617,8840,9018,9025,9040,8353,8840,8651,7891,8156,8690,8491,9101,8920,8700,8236,8090,7891,7575,7135,7848,8735,8545,7755,8822,7846,7201,8155,7135,6876,
8741,9286,8778,8751,9142,8790,9126,8892,8566,8701,9286,8022,9435,8898,8300,8826,9276,7988,8921,8745,8777,9435,8960,9010,9501,9175,9502,8915,8880,8878,8751,8898,9010,8940,9652,8843,9340,9040,8700,8821,9142,8300,9501,9652,8096,9436,9475,7712,8797,8381,8790,8825,9175,8842,9436,8850,8707,8341,8350,7891,9126,9276,9503,9340,9475,8707,8441,8586,8107,8406,8892,7988,8915,9040,7712,8342,8586,7420,7290,7807,8566,8921,8880,8700,8796,8350,8107,7290,7840,7476,8700,8745,8877,8822,8381,7891,8405,7807,7476,7812,
8981,9197,9640,8730,8790,9124,9586,8490,8885,8720,9197,8867,8656,8400,8825,9196,9017,8817,8750,8433,9640,8656,8300,9012,9175,8446,9181,9280,7722,8697,8730,8400,9013,8670,8842,8785,8660,8353,8237,7846,8790,8825,9175,8842,9436,8850,8707,8341,8350,7891,9123,9196,8445,8785,8850,7783,8946,8620,7420,8041,9586,9018,9181,8660,8707,8946,8356,8156,7775,7456,8490,8817,9280,8353,8341,8620,8156,7720,7472,7257,8885,8750,7722,8236,8350,7420,7775,7472,6307,6812,8720,8433,8698,7846,7891,8040,7456,7257,6813,6950,
8418,9150,9345,8355,9126,9586,7823,8765,8610,7703,9150,9137,8790,8968,9276,9018,9065,8885,8877,8306,9345,8790,9325,9175,9503,9181,8645,8700,8476,8156,8355,8967,9175,8446,9340,8660,7712,8840,8090,7201,9126,9276,9503,9340,9475,8707,8441,8586,8107,8406,9586,9018,9181,8660,8707,8946,8356,8156,7775,7456,7824,9065,8645,7712,8440,8356,7052,7820,7241,6307,8765,8885,8700,8841,8586,8156,7820,8175,6875,7706,8610,8877,8475,8090,8107,7775,7241,6875,7275,6811,7702,8307,8156,7201,8405,7456,6307,7706,6811,6550,
8400,9212,9050,8618,8892,8490,8765,8745,8006,8417,9212,7940,9030,8840,7988,8817,8885,7755,8016,8601,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,8617,8840,9018,9025,9040,8353,8840,8651,7891,8156,8892,7988,8915,9040,7712,8342,8586,7420,7290,7807,8490,8817,9280,8353,8341,8620,8156,7720,7472,7257,8765,8885,8700,8841,8586,8156,7820,8175,6875,7706,8745,7755,8716,8651,7420,7720,8175,6797,7490,7935,8006,8015,8411,7891,7290,7472,6875,7490,7050,6800,8418,8601,7785,8155,7807,7257,7706,7935,6800,7610,
8740,8930,8889,8690,8566,8885,8610,8006,7722,7320,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,8888,9095,7824,9101,8880,7722,8475,8411,7111,7596,8690,8491,9101,8920,8700,8236,8090,7891,7575,7135,8566,8921,8880,8700,8796,8350,8107,7290,7840,7476,8885,8750,7722,8236,8350,7420,7775,7472,6307,6812,8610,8877,8475,8090,8107,7775,7241,6875,7275,6811,8006,8015,8411,7891,7290,7472,6875,7490,7050,6800,7721,8285,7111,7575,7840,6307,7275,7050,6465,6836,7320,8025,7595,7135,7476,6812,6811,6800,6835,6391,
7430,8917,8910,7847,8700,8720,7702,8418,7320,6916,8917,8831,9128,8735,8745,8433,8307,8601,8025,7830,8910,9127,8885,8545,8877,8698,8156,7785,7595,7276,7848,8735,8545,7755,8822,7846,7201,8155,7135,6876,8700,8745,8877,8822,8381,7891,8405,7807,7476,7811,8720,8433,8698,7846,7891,8040,7456,7257,6813,6950,7702,8307,8156,7201,8405,7456,6307,7706,6811,6550,8418,8601,7785,8155,7807,7257,7706,7935,6800,7611,7320,8025,7595,7135,7476,6812,6811,6800,6835,6391,6916,7830,7276,6876,7812,6950,6550,7610,6391,6517,
8856,8990,9086,9050,9570,8637,8400,9182,8460,8530,8990,8232,9121,8897,8153,9120,9212,8165,8967,8877,9086,9120,9251,9197,9177,8981,9050,9486,9036,8717,9051,8897,9198,8845,9137,8970,8618,9000,9128,9020,9570,8153,9177,9137,8355,9031,8892,8047,8897,9045,8637,9120,8981,8970,9030,8536,8490,8821,8660,8295,8400,9212,9050,8618,8892,8490,8765,8745,8006,8417,9182,8165,9487,9000,8047,8821,8745,7443,8561,8181,8460,8966,9036,9127,8897,8660,8006,8560,8071,7567,8531,8877,8718,9020,9045,8295,8418,8181,7567,7740,
8990,8232,9121,8897,8153,9120,9212,8165,8967,8877,8232,8740,8985,8401,8845,9345,7940,8990,9035,7962,9120,8985,10210,8867,8730,10050,9031,9236,10145,8861,8897,8400,8867,9142,7815,8855,8840,7823,8821,8640,8154,8845,8730,7815,8967,8751,7988,8660,8545,7443,9120,9345,10050,8855,8751,10430,8817,9035,9715,8201,9212,7940,9030,8840,7988,8817,8885,7755,8016,8601,8165,8991,9236,7823,8660,9035,7755,8657,8430,7200,8966,9035,10145,8821,8545,9715,8016,8430,9190,7536,8877,7962,8860,8640,7443,8202,8601,7200,7535,7563,
9086,9120,9251,9197,9177,8981,9050,9486,9036,8717,9120,8985,10210,8867,8730,10050,9031,9236,10145,8860,9251,10211,8751,8656,10295,8967,8831,10130,8765,8660,9197,8867,8656,8400,8825,9196,9017,8817,8750,8433,9177,8730,10295,8825,9175,9965,8915,8920,9570,8015,8981,10050,8967,9196,9966,9025,9280,9980,8821,8266,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,9487,9236,10130,8817,8920,9980,8717,7846,9235,8010,9036,10145,8765,8750,9570,8821,8411,9235,8060,7776,8717,8860,8660,8433,8015,8266,7785,8010,7776,7060,
9051,8897,9198,8845,9137,8970,8618,9000,9128,9021,8897,8400,8867,9142,7815,8855,8840,7823,8821,8640,9197,8867,8656,8400,8825,9196,9017,8817,8750,8434,8845,9142,8400,8776,9382,9503,9025,8765,8562,8656,9137,7815,8826,9382,8445,8946,9040,7846,8716,8425,8970,8855,9196,9502,8946,9025,8353,8796,8651,7891,8617,8840,9018,9025,9040,8353,8840,8651,7891,8156,9000,7823,8817,8765,7846,8796,8651,6946,7445,7709,9127,8821,8750,8562,8716,8651,7891,7445,8002,7544,9020,8640,8433,8656,8425,7891,8155,7709,7543,7520,
9570,8153,9177,9137,8355,9031,8892,8047,8897,9045,8154,8845,8730,7815,8967,8751,7988,8660,8545,7443,9177,8730,10295,8825,9175,9965,8915,8920,9570,8015,9137,7815,8826,9382,8445,8946,9040,7846,8716,8425,8355,8967,9175,8446,9340,8660,7712,8840,8090,7201,9030,8751,9965,8946,8660,9945,8342,7905,9025,7446,8892,7988,8915,9040,7712,8342,8586,7420,7290,7807,8047,8660,8920,7846,8841,7905,7420,8175,7456,6740,8897,8545,9570,8716,8090,9025,7290,7456,8455,6945,9045,7443,8015,8425,7201,7445,7807,6740,6946,7675,
8637,9120,8981,8970,9030,8536,8490,8821,8660,8295,9120,9345,10050,8855,8751,10430,8817,9035,9715,8201,8981,10050,8967,9196,9966,9025,9280,9980,8821,8266,8970,8855,9196,9502,8946,9025,8353,8796,8651,7891,9030,8751,9965,8946,8660,9945,8342,7905,9025,7445,8536,10431,9025,9025,9945,8440,8620,9135,8175,7840,8490,8817,9280,8353,8341,8620,8156,7720,7472,7257,8821,9035,9980,8797,7905,9135,7720,7241,9145,7145,8660,9715,8821,8651,9025,8175,7472,9145,7706,7350,8295,8201,8266,7891,7445,7840,7257,7145,7350,6795,
8400,9212,9050,8618,8892,8490,8765,8745,8006,8417,9212,7940,9030,8840,7988,8817,8885,7755,8016,8601,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,8617,8840,9018,9025,9040,8353,8840,8651,7891,8156,8892,7988,8915,9040,7712,8342,8586,7420,7290,7807,8490,8817,9280,8353,8341,8620,8156,7720,7472,7257,8765,8885,8700,8841,8586,8156,7820,8175,6875,7706,8745,7755,8716,8651,7420,7720,8175,6797,7490,7935,8006,8015,8411,7891,7290,7472,6875,7490,7050,6800,8418,8601,7785,8155,7807,7257,7706,7935,6800,7610,
9182,8165,9487,9000,8047,8821,8745,7443,8561,8181,8165,8991,9236,7823,8660,9035,7755,8657,8430,7200,9487,9236,10130,8817,8920,9980,8717,7846,9235,8011,9000,7823,8817,8765,7846,8796,8651,6946,7445,7709,8047,8660,8920,7846,8841,7905,7420,8175,7456,6740,8821,9035,9980,8797,7905,9135,7720,7241,9145,7145,8745,7755,8716,8651,7420,7720,8175,6797,7490,7935,7443,8657,7846,6946,8175,7241,6797,7163,6605,6465,8561,8430,9235,7445,7456,9145,7491,6605,8090,7193,8181,7200,8010,7709,6740,7145,7935,6465,7192,7350,
8460,8966,9036,9127,8897,8660,8006,8560,8071,7567,8966,9035,10145,8821,8545,9715,8016,8430,9190,7535,9036,10145,8765,8750,9570,8821,8411,9235,8060,7776,9127,8821,8750,8562,8716,8651,7891,7445,8002,7543,8897,8545,9570,8716,8090,9025,7290,7456,8455,6945,8660,9715,8821,8651,9025,8175,7472,9145,7706,7350,8006,8015,8411,7891,7290,7472,6875,7490,7050,6800,8561,8430,9235,7445,7456,9145,7491,6605,8090,7192,8071,9190,8060,8002,8455,7706,7050,8091,7281,7027,7567,7535,7776,7543,6945,7350,6800,7192,7027,6835,
8531,8877,8718,9020,9045,8295,8418,8181,7567,7741,8877,7962,8860,8640,7443,8202,8601,7200,7535,7563,8717,8860,8660,8433,8015,8266,7785,8010,7776,7061,9020,8640,8433,8656,8425,7891,8155,7709,7543,7520,9045,7443,8015,8425,7201,7445,7807,6740,6946,7675,8295,8201,8266,7891,7445,7840,7257,7145,7350,6795,8418,8601,7785,8155,7807,7257,7706,7935,6800,7611,8181,7200,8010,7709,6740,7145,7935,6465,7192,7350,7567,7535,7776,7543,6945,7350,6800,7192,7027,6835,7740,7563,7060,7521,7675,6795,7610,7350,6835,7745,
8496,8400,8841,8885,8586,8983,8740,8460,8411,8390,8400,8900,8461,8637,9097,8995,8930,8966,8165,8497,8840,8461,8417,9448,8666,8445,8888,9036,7963,8491,8885,8637,9448,9397,9050,9303,8690,9128,8762,8560,8585,9097,8666,9050,9095,9095,8566,8897,8540,8058,8983,8995,8445,9302,9095,8047,8885,8660,7702,8370,8740,8930,8889,8690,8566,8885,8610,8006,7722,7320,8460,8966,9036,9127,8897,8660,8006,8560,8071,7567,8411,8165,7963,8762,8540,7702,7721,8071,6626,6855,8390,8498,8490,8560,8057,8371,7320,7567,6855,6697,
8400,8900,8461,8637,9097,8995,8930,8966,8165,8497,8901,9060,9950,9120,9397,10065,9486,9035,9985,8757,8461,9951,9150,8981,10225,8617,9095,10145,8700,8910,8637,9120,8981,8970,9030,8536,8490,8821,8660,8295,9097,9397,10225,9031,9586,10130,8921,8545,9640,8560,8995,10065,8617,8536,10130,8660,8750,9715,8306,8406,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,8966,9035,10145,8821,8545,9715,8016,8430,9190,7535,8165,9985,8700,8660,9640,8306,8285,9190,7645,7380,8497,8757,8910,8295,8560,8406,8025,7535,7380,6947,
8840,8461,8417,9448,8666,8445,8888,9036,7963,8490,8461,9951,9150,8981,10225,8617,9095,10145,8700,8910,8418,9150,9345,8355,9126,9586,7823,8765,8610,7702,9448,8981,8355,9123,8831,7989,9101,8750,7506,8567,8666,10225,9125,8831,10431,9065,8880,9570,8656,8285,8445,8618,9586,7989,9065,8920,7722,8822,8156,7277,8888,9095,7824,9101,8880,7722,8475,8411,7111,7595,9036,10145,8765,8750,9570,8821,8411,9235,8060,7776,7962,8700,8610,7506,8657,8156,7111,8060,7032,6753,8490,8910,7702,8567,8285,7277,7595,7776,6752,7106,
8885,8637,9448,9397,9050,9303,8690,9128,8762,8560,8637,9120,8981,8970,9030,8536,8490,8821,8660,8295,9448,8981,8355,9123,8831,7989,9101,8750,7506,8567,9397,8970,9123,8751,9018,9471,8920,8562,8698,8430,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,9302,8536,7989,9471,9280,7846,8236,8651,7201,8011,8690,8491,9101,8920,8700,8236,8090,7891,7575,7135,9127,8821,8750,8562,8716,8651,7891,7445,8002,7544,8762,8660,7506,8697,8411,7201,7575,8002,6712,7446,8560,8295,8568,8430,7785,8010,7135,7543,7446,6370,
8585,9097,8666,9050,9095,9095,8566,8897,8540,8057,9097,9397,10225,9031,9586,10130,8921,8545,9640,8560,8666,10225,9125,8831,10431,9065,8880,9570,8656,8285,9050,9030,8831,9017,8915,9280,8700,8716,8411,7785,9096,9586,10430,8915,8645,10110,8796,8090,9165,7665,9095,10131,9065,9280,10110,8840,8350,9025,8405,8002,8566,8921,8880,8700,8796,8350,8107,7290,7840,7476,8897,8545,9570,8716,8090,9025,7290,7456,8455,6945,8540,9640,8656,8411,9165,8405,7840,8455,7791,7265,8057,8560,8285,7785,7665,8002,7476,6945,7265,7031,
8983,8995,8445,9302,9095,8047,8885,8660,7702,8370,8995,10065,8617,8536,10130,8660,8750,9715,8306,8406,8445,8618,9586,7989,9065,8920,7722,8822,8156,7277,9302,8536,7989,9471,9280,7846,8236,8651,7201,8010,9095,10131,9065,9280,10110,8840,8350,9025,8405,8002,8047,8660,8920,7846,8841,7905,7420,8175,7456,6740,8885,8750,7722,8236,8350,7420,7775,7472,6307,6812,8660,9715,8821,8651,9025,8175,7472,9145,7706,7350,7702,8307,8156,7201,8405,7456,6307,7706,6811,6550,8370,8406,7277,8010,8002,6740,6812,7350,6551,6908,
8740,8930,8889,8690,8566,8885,8610,8006,7722,7320,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,8888,9095,7824,9101,8880,7722,8475,8411,7111,7596,8690,8491,9101,8920,8700,8236,8090,7891,7575,7135,8566,8921,8880,8700,8796,8350,8107,7290,7840,7476,8885,8750,7722,8236,8350,7420,7775,7472,6307,6812,8610,8877,8475,8090,8107,7775,7241,6875,7275,6811,8006,8015,8411,7891,7290,7472,6875,7490,7050,6800,7721,8285,7111,7575,7840,6307,7275,7050,6465,6836,7320,8025,7595,7135,7476,6812,6811,6800,6835,6391,
8460,8966,9036,9127,8897,8660,8006,8560,8071,7567,8966,9035,10145,8821,8545,9715,8016,8430,9190,7535,9036,10145,8765,8750,9570,8821,8411,9235,8060,7776,9127,8821,8750,8562,8716,8651,7891,7445,8002,7543,8897,8545,9570,8716,8090,9025,7290,7456,8455,6945,8660,9715,8821,8651,9025,8175,7472,9145,7706,7350,8006,8015,8411,7891,7290,7472,6875,7490,7050,6800,8561,8430,9235,7445,7456,9145,7491,6605,8090,7192,8071,9190,8060,8002,8455,7706,7050,8091,7281,7027,7567,7535,7776,7543,6945,7350,6800,7192,7027,6835,
8411,8165,7963,8762,8540,7702,7721,8071,6626,6855,8165,9985,8700,8660,9640,8306,8285,9190,7645,7380,7962,8700,8610,7506,8657,8156,7111,8060,7032,6753,8762,8660,7506,8697,8411,7201,7575,8002,6712,7446,8540,9640,8656,8411,9165,8405,7840,8455,7791,7265,7702,8307,8156,7201,8405,7456,6307,7706,6811,6550,7721,8285,7111,7575,7840,6307,7275,7050,6465,6835,8071,9190,8060,8002,8455,7706,7050,8091,7281,7027,6626,7645,7032,6712,7791,6811,6466,7281,6505,6293,6855,7380,6752,7446,7265,6550,6835,7027,6293,6700,
8390,8498,8490,8560,8057,8371,7320,7567,6855,6697,8497,8757,8910,8295,8560,8406,8025,7535,7380,6948,8490,8910,7702,8567,8285,7277,7595,7776,6752,7105,8560,8295,8568,8430,7785,8010,7135,7543,7446,6370,8057,8560,8285,7785,7665,8002,7476,6945,7265,7030,8370,8406,7277,8010,8002,6740,6812,7350,6551,6909,7320,8025,7595,7135,7476,6812,6811,6800,6835,6391,7567,7535,7776,7543,6945,7350,6800,7192,7027,6835,6855,7380,6752,7446,7265,6550,6835,7027,6293,6700,6697,6947,7105,6370,7031,6908,6391,6835,6700,6650,
7646,8370,8965,7936,9076,8781,7430,8530,8390,7451,8371,8987,8557,8611,9182,8835,8918,8877,8498,8230,8965,8558,8983,9057,8930,9265,8910,8718,8490,8360,7935,8611,9057,8165,8726,9035,7848,9020,8560,7314,9076,9182,8930,8727,9392,9127,8700,9045,8057,8766,8781,8835,9265,9035,9128,8746,8720,8295,8370,7771,7430,8917,8910,7847,8700,8720,7702,8418,7320,6916,8531,8877,8718,9020,9045,8295,8418,8181,7567,7740,8390,8498,8490,8560,8057,8371,7320,7567,6855,6697,7452,8230,8360,7313,8766,7771,6916,7740,6697,6967,
8371,8987,8557,8611,9182,8835,8918,8877,8498,8231,8987,7571,9021,9022,8165,9031,8831,7962,8757,8030,8557,9021,8995,8810,9486,8811,9127,8860,8910,8721,8611,9022,8810,8991,9000,8567,8735,8640,8295,8006,9182,8165,9487,9000,8047,8821,8745,7443,8561,8181,8835,9031,8811,8566,8821,8480,8433,8201,8406,7397,8917,8831,9128,8735,8745,8433,8307,8601,8025,7831,8877,7962,8860,8640,7443,8202,8601,7200,7535,7563,8497,8757,8910,8295,8560,8406,8025,7535,7380,6948,8230,8030,8721,8007,8181,7397,7830,7563,6947,6815,
8965,8558,8983,9057,8930,9265,8910,8718,8490,8360,8557,9021,8995,8810,9486,8811,9127,8860,8910,8722,8983,8995,8445,9302,9095,8047,8885,8660,7702,8370,9057,8810,9303,9236,8490,8697,8545,8433,8567,7700,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,9265,8811,8047,8697,8750,7755,8697,8266,7277,8075,8910,9127,8885,8545,8877,8698,8156,7785,7595,7276,8717,8860,8660,8433,8015,8266,7785,8010,7776,7061,8490,8910,7702,8567,8285,7277,7595,7776,6752,7105,8360,8721,8370,7700,8025,8075,7276,7060,7105,6660,
7935,8611,9057,8165,8726,9035,7848,9020,8560,7313,8611,9022,8810,8991,9000,8567,8735,8640,8295,8006,9057,8810,9303,9236,8490,8697,8545,8433,8567,7700,8165,8991,9236,7823,8660,9035,7755,8657,8430,7200,8727,9000,8490,8660,8885,8562,8821,8425,7785,8015,9035,8566,8697,9035,8562,8476,7846,7891,8010,7032,7848,8735,8545,7755,8822,7846,7201,8155,7135,6877,9020,8640,8433,8656,8425,7891,8155,7709,7543,7520,8560,8295,8568,8430,7785,8010,7135,7543,7446,6370,7313,8006,7700,7200,8015,7032,6876,7520,6370,6251,
9076,9182,8930,8727,9392,9127,8700,9045,8057,8766,9182,8165,9487,9000,8047,8821,8745,7443,8561,8181,8930,9486,9095,8490,8921,8750,8877,8015,8285,8025,8727,9000,8490,8660,8885,8562,8821,8425,7785,8016,9392,8047,8921,8885,7722,8717,8381,7201,7665,7894,9127,8821,8750,8562,8716,8651,7891,7445,8002,7543,8700,8745,8877,8822,8381,7891,8405,7807,7476,7811,9045,7443,8015,8425,7201,7445,7807,6740,6946,7675,8057,8560,8285,7785,7665,8002,7476,6945,7265,7030,8767,8181,8025,8015,7894,7543,7812,7675,7030,7366,
8781,8835,9265,9035,9128,8746,8720,8295,8370,7771,8835,9031,8811,8566,8821,8480,8433,8201,8406,7397,9265,8811,8047,8697,8750,7755,8697,8266,7277,8075,9035,8566,8697,9035,8562,8476,7846,7891,8010,7032,9127,8821,8750,8562,8716,8651,7891,7445,8002,7544,8746,8480,7755,8475,8651,6946,8040,7840,6740,7418,8720,8433,8698,7846,7891,8040,7456,7257,6813,6950,8295,8201,8266,7891,7445,7840,7257,7145,7350,6795,8370,8406,7277,8010,8002,6740,6812,7350,6551,6908,7771,7397,8075,7032,7543,7419,6950,6796,6908,6796,
7430,8917,8910,7847,8700,8720,7702,8418,7320,6916,8917,8831,9128,8735,8745,8433,8307,8601,8025,7830,8910,9127,8885,8545,8877,8698,8156,7785,7595,7276,7848,8735,8545,7755,8822,7846,7201,8155,7135,6876,8700,8745,8877,8822,8381,7891,8405,7807,7476,7811,8720,8433,8698,7846,7891,8040,7456,7257,6813,6950,7702,8307,8156,7201,8405,7456,6307,7706,6811,6550,8418,8601,7785,8155,7807,7257,7706,7935,6800,7611,7320,8025,7595,7135,7476,6812,6811,6800,6835,6391,6916,7830,7276,6876,7812,6950,6550,7610,6391,6517,
8531,8877,8718,9020,9045,8295,8418,8181,7567,7741,8877,7962,8860,8640,7443,8202,8601,7200,7535,7563,8717,8860,8660,8433,8015,8266,7785,8010,7776,7061,9020,8640,8433,8656,8425,7891,8155,7709,7543,7520,9045,7443,8015,8425,7201,7445,7807,6740,6946,7675,8295,8201,8266,7891,7445,7840,7257,7145,7350,6795,8418,8601,7785,8155,7807,7257,7706,7935,6800,7611,8181,7200,8010,7709,6740,7145,7935,6465,7192,7350,7567,7535,7776,7543,6945,7350,6800,7192,7027,6835,7740,7563,7060,7521,7675,6795,7610,7350,6835,7745,
8390,8498,8490,8560,8057,8371,7320,7567,6855,6697,8497,8757,8910,8295,8560,8406,8025,7535,7380,6948,8490,8910,7702,8567,8285,7277,7595,7776,6752,7105,8560,8295,8568,8430,7785,8010,7135,7543,7446,6370,8057,8560,8285,7785,7665,8002,7476,6945,7265,7030,8370,8406,7277,8010,8002,6740,6812,7350,6551,6909,7320,8025,7595,7135,7476,6812,6811,6800,6835,6391,7567,7535,7776,7543,6945,7350,6800,7192,7027,6835,6855,7380,6752,7446,7265,6550,6835,7027,6293,6700,6697,6947,7105,6370,7031,6908,6391,6835,6700,6650,
7452,8230,8360,7313,8766,7771,6916,7740,6697,6968,8230,8030,8721,8007,8181,7397,7830,7563,6947,6815,8360,8721,8370,7700,8025,8075,7276,7060,7105,6660,7313,8006,7700,7200,8015,7032,6876,7520,6370,6250,8767,8181,8025,8015,7894,7543,7812,7675,7030,7366,7771,7397,8075,7032,7543,7419,6950,6796,6908,6796,6916,7830,7276,6876,7812,6950,6550,7610,6391,6517,7740,7563,7060,7521,7675,6795,7610,7350,6835,7745,6697,6947,7105,6370,7031,6908,6391,6835,6700,6650,6967,6815,6660,6250,7366,6796,6517,7745,6650,6682,

};

int lucky(int a,int b)
{
int c=a,d=b;
int e=a/100000,f=b/100000;
a -= a0000, b -= b0000;

int ans=0;
for(int i=e+1;i<=f;++i)
ans += sum[i];
for(int i=a+1;i<c;++i)
ans += judge(i);
for(int i=b+1;i<=d;++i)
ans += judge(i);

return ans;
}

int main()
{
init();
int x,y;

while(scanf("%d%d",&x,&y) ==2)
{
printf("%d\n",lucky(x,y));
}

return 0;
}

来自CSDN http://blog.csdn.net/aihahaheihei/article/details/9175691