Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- //https://www.algorithmist.com/index.php/UVa_138
- int main()
- {
- long long int i,j,k,a=6,b=8,c=35,d=49,e,f,g,cnt=3,pre,pre1,x,y;
- printf("%10lld%10lld\n%10lld%10lld\n",a,b,c,d);
- pre1=6;
- pre=35;
- e=pre*6-pre1;
- while(cnt<=10)
- {
- x=pre*6-pre1;;
- y=(long long int)sqrt(x*x*2);
- printf("%10lld%10lld\n",x,y);
- pre1=pre;
- pre=x;
- cnt++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement