摘要:
URAL_1149 根据通项公式找到递推式之后就可以递归打印任意的An及Sn了。#include<stdio.h>#include<string.h>int N;void dfsA(int n, int up){ if(n == 1) { printf("sin(%d)", up); return ; } printf("sin(%d%c", up - n + 1, (up - n + 1) & 1 ? '-' : '+'); dfsA(n - 1, up); printf(")& 阅读全文