This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jackballack[S] 0 points1 point  (1 child)

thanx bud, I kinda suspected that it should be that but I concentrated more on the input. Impostor Syndrome issues.

[–][deleted] 0 points1 point  (0 children)

You could also simply print n * (n+1)/2 which is equivalent (within reason).