题解 | #尼科彻斯定理#
尼科彻斯定理
http://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
if (sc.hasNext()) {
int input = sc.nextInt();
int num=input*input*input;
StringBuilder sb = new StringBuilder();
for(int i=1;i<num;i+=2){
if(input*i+((input-1)*input)==num){
for(int j =1;j<=input;j++){
if(j==input){
sb.append(i+(j-1)*2);
}else{
sb.append((i+(j-1)*2)+"+");
}
}
}
}
System.out.println(sb);
}
}
}