标签:
Time Limit: 1000MS | Memory Limit: 10000K | |
Total Submissions: 2806 | Accepted: 1565 |
Description
6 8
35 49
Input
Output
Sample Input
Sample Output
6 8 35 49
Source
1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #include <stack> 5 #include <queue> 6 #include <map> 7 #include <algorithm> 8 #include <vector> 9 10 using namespace std; 11 12 const int maxn = 1000005; 13 14 int main() 15 { 16 int x,y,x1,y1,px,py,d; 17 x1 = 3; 18 y1 = 1; 19 px = 3; 20 py = 1; 21 d = 8; 22 for(int i=1;i<=10;i++){ 23 x = px*x1 + d*py*y1; 24 y = px*y1 + py*x1; 25 printf("%10d%10d\n",y,(x-1)/2); 26 px = x; 27 py = y; 28 } 29 return 0; 30 }
标签:
原文地址:http://www.cnblogs.com/lmlyzxiao/p/4937781.html