-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path206.cpp
More file actions
26 lines (26 loc) · 743 Bytes
/
Copy path206.cpp
File metadata and controls
26 lines (26 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include"bigint.h"
#include<cmath>
#include<fstream>
using namespace std;
bool is(BigInt ck,BigInt ck1)
{
if(ck._s[0]=='1'&&ck._s[2]=='2'&&ck._s[4]=='3'&&ck._s[6]=='4'&&ck._s[8]=='5'&&ck._s[10]=='6'&&ck._s[12]=='7')
cout<<ck._s[0]<<ck._s[2]<<ck._s[4]<<ck._s[6]<<ck._s[8]<<ck._s[10]<<ck._s[12]<<ck._s[14]<<ck._s[16]<<ck._s[18]<<endl<<ck1<<endl;
if(ck._s[0]=='1'&&ck._s[2]=='2'&&ck._s[4]=='3'&&ck._s[6]=='4'&&ck._s[8]=='5'&&ck._s[10]=='6'&&ck._s[12]=='7'&&ck._s[14]=='8'&&ck._s[16]=='9'&&ck._s[18]=='0')
{return true;}
return false;
}
int main()
{
for(BigInt a("1000000030"),b;(b=a.power(2))<BigInt("2000000000000000000");)
{
//cout<<a<<endl;
if(is(b,a))
{cout<<a;break;}
if(a._s[8]=='3')
a+=40;
else if(a._s[8]=='7')
a+=60;
}
return 0;
}