|
|
back to boardDiscussion of Problem 1068. SumРешение C | Solution C Posted by Viktor 4 Apr 2017 04:37 #include <stdio.h> int main() { int n, i = 0; scanf("%d", &n); while (n != 1){ if (n <= 1){ i+= n; n++; } else if (n >= 1){ i+= n; n--; } } printf("%d", i+1); return 0; } |
|
|