1 /* 2 模拟:找到规律分别输出就可以了,简单但是蛮有意思的 3 */ 4 #include5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 11 const int MAXN = 2e2 + 10;12 const int INF = 0x3f3f3f3f;13 14 void print_An(int n)15 {16 for (int i=1; i<=n; ++i)17 {18 printf ("sin(%d", i);19 if (i < n) printf ("%c", (i&1) ? '-' : '+');20 }21 22 for (int i=1; i<=n; ++i) printf ("%c", ')');23 }24 25 void work(int n)26 {27 for (int i=1; i =1; --i)30 {31 printf ("%c", ')'); print_An (++j);32 printf ("%c%d", '+', i);33 }34 puts ("");35 }36 37 int main(void) //URAL 1149 Sinus Dances38 {39 // freopen ("F.in", "r", stdin);40 41 int n;42 while (scanf ("%d", &n) == 1)43 {44 work (n);45 }46 47 return 0;48 }