【十二题解】 | #尼科彻斯定理#
尼科彻斯定理
http://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85
#include<stdio.h>
int main(){
int number;
while(scanf("%d", &number) != EOF){
int pinfang = number*number;
int start;
if (number%2 == 0){
start = pinfang-number+1;
}
else{
start = pinfang - number/2*2;
}
for(int i=0; i<number; i++){
printf("%d", start+i*2);
if(i!=number-1)printf("+");
}
printf("\n");
}
}