Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

简短AC代码,pell方程打的表

Posted by ACAccepted at 2019-01-24 09:25:04 on Problem 1320 and last updated at 2019-01-24 09:27:26
#include <cstdio>

int main()
{
	printf("\
         6         8\n\
        35        49\n\
       204       288\n\
      1189      1681\n\
      6930      9800\n\
     40391     57121\n\
    235416    332928\n\
   1372105   1940449\n\
   7997214  11309768\n\
  46611179  65918161\n\
	");
	return 0;
}

-------------------------------------------------------------------------------------------------------------------------------------------------//我是分界线

//pell方程
#include <cstdio>
using namespace std;
const int MAXN=105;
int x[MAXN],y[MAXN];

int main()
{
	x[0]=3;y[0]=1;
	for(int i=1;i<=10;i++)
	{
		x[i]=x[i-1]*x[0]+8*y[i-1]*y[0];
		y[i]=x[0]*y[i-1]+y[0]*x[i-1];
		printf("%10d%10d\n",y[i],(x[i]-1)/2);
	}
	return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator