Timeline for Calculate the sum of ILD
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | CommunityBot | Commonmark migration | |
| Apr 13, 2017 at 12:39 | history | edited | CommunityBot | replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/ | |
| Jun 30, 2016 at 9:52 | history | edited | Denker | CC BY-SA 3.0 | added 2 characters in body |
| Jun 30, 2016 at 9:24 | comment | added | Erik the Outgolfer | @KevinCruijssen - + 1 -> - 1. The unary plus operator exists, so - + 1 is essentially the same as -(+(1)). +a is the same as a, for numbers. | |
| Jun 30, 2016 at 9:24 | comment | added | Denker | @KevinCruijssen like you said -123 becomes "-+1+2+3" after joining which yields the correct result when you eval it. Try eval("-+1") for example which results in -1. | |
| Jun 30, 2016 at 9:19 | comment | added | Kevin Cruijssen | I never used Python, so forget my possible ignorance, but how does the eval and join know to take the negative first digit for negative input? I would expect -123 to become something like - + 1 + 2 + 3 written out, but apparently it isn't.. (Or is it, and it automatically merged - + 1 to -1 as second step?) | |
| Jun 30, 2016 at 9:09 | history | answered | Denker | CC BY-SA 3.0 |