题解 | #尼科彻斯定理#
尼科彻斯定理
https://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85
include
include
include
using namespace std;
int main(){
int m;
while(cin>>m){
int tmp=mm;
if(m%2==0)//如果n为偶数
{
int tmp1=tmp-1;
int first=tmp1-(m/2-1)2;
for(int i=0;i<m-1;i++){
cout<<first+2i<<'+';
}
cout<<first+2(m-1)<<endl;
}
else if(m%2!=0){
int tmp1=tmp;
int first=tmp1-m/22;
for(int i=0;i<m-1;i++){
cout<<first+2*i<<'+';
}
cout<<first+2(m-1)<<endl;
}
}
system("pause");
return 0;
}