int main() { int m = 0; while (~scanf("%d", &m)) { int a = m * (m - 1) + 1; char buf[10240] = { 0 }; sprintf(buf, "%d", a); for (int i = 1; i < m; i++) { sprintf(buf, "%s+%d", buf, a += 2); } printf("%s\n", buf); } return 0; }