尼科彻斯定理
Step 1 : Find the rule between output with n, found print n nums, and start = n * n - n + 1, and increase with common step
Step 2 : Coding and have a try.
#include <stdio.h>
int main()
{
int n;
while (scanf("%d", &n) != EOF) {
int start = n * n - n + 1;
printf("%d", start);
int i;
for (i = 1; i < n; i++) {
printf("+%d", start + 2 * i);
}
printf("\n");
}
return 0;
}