题解 | #尼科彻斯定理#
尼科彻斯定理
https://www.nowcoder.com/practice/dbace3a5b3c4480e86ee3277f3fe1e85
public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int n = sc.nextInt(); String[] strs = new String[n]; int k = n*n-n+1; int j = 0; for (int i = 0; i < n; i++) { strs[i] = String.valueOf(k+j); j+=2; } System.out.println(String.join("+",strs)); } }}#利用数学公式推算的#