#include <cstdio> using namespace std; int main() { int n; while (EOF != scanf("%d", &n)) { int start = n * (n - 1) + 1; printf("%d", start); for(int i=1; i<n; i++) { start += 2; printf("+%d", start); } printf("\n"); } return 0; }
#include <cstdio> using namespace std; int main() { int n; while (EOF != scanf("%d", &n)) { int start = n * (n - 1) + 1; printf("%d", start); for(int i=1; i<n; i++) { start += 2; printf("+%d", start); } printf("\n"); } return 0; }