Timeline for Sum of all integers from 1 to n
Current License: CC BY-SA 3.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 3, 2017 at 18:36 | history | edited | Steadybox | CC BY-SA 3.0 |
Changed the snippet to a lambda.
|
Dec 3, 2017 at 18:30 | review | Low quality posts | |||
Dec 3, 2017 at 18:36 | |||||
Aug 10, 2017 at 12:23 | history | edited | Rohit-Pandey | CC BY-SA 3.0 |
deleted 7 characters in body
|
Jul 20, 2017 at 18:27 | comment | added | Business Cat |
Our consensus is that submissions must be full programs or functions, of which yours is neither (yours is a snippet, as in it needs other code to run properly). You could fix it by counting the assignment of input() to n in your submission or changing it to a function/lambda that returns the result. By the way, welcome to PPCG!
|
|
Jul 20, 2017 at 16:19 | comment | added | Rohit-Pandey |
Here n is Input.
|
|
Jul 20, 2017 at 8:59 | comment | added | Eric Duminil |
Where is n defined?
|
|
Jul 19, 2017 at 17:30 | comment | added | Martin Ender | This community. Programming Puzzles & Code Golf. | |
Jul 19, 2017 at 17:28 | comment | added | Rohit-Pandey | Thank you, sir but what is PPCG? | |
Jul 19, 2017 at 17:22 | comment | added | Adalynn |
You can save a byte by changing it to print(n+1)*n/2 (Someone might already have print(n+1)*n/2 as answer though)
|
|
Jul 19, 2017 at 17:03 | comment | added | Rohit-Pandey | Is there any problem in my answer? | |
Jul 19, 2017 at 16:56 | comment | added | Martin Ender | Welcome to PPCG! | |
Jul 19, 2017 at 16:52 | review | First posts | |||
Jul 19, 2017 at 16:56 | |||||
Jul 19, 2017 at 16:50 | history | undeleted | Rohit-Pandey | ||
Jul 19, 2017 at 16:50 | history | deleted | Rohit-Pandey | via Vote | |
Jul 19, 2017 at 16:49 | history | answered | Rohit-Pandey | CC BY-SA 3.0 |