Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
减小必要的拷贝int main( ) { int n[4]; BigInt A[4]; while (scanf("%d %d %d", n, n + 1, n + 2) == 3) { A[0] = n[0]; A[1] = n[1]; A[2] = n[2]; for (int i = 3; i <= 99; i++) { int j = i % 4; A[j] = A[(i - 1) % 4]; A[j] += A[(i - 2) % 4]; A[j] += A[(i - 3) % 4]; } A[3].print(); printf("\n"); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator