Timeline for How much do I have to write?
Current License: CC BY-SA 3.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 16, 2017 at 22:22 | history | edited | micsthepick | CC BY-SA 3.0 |
64 bytes!
|
Mar 16, 2017 at 22:09 | history | edited | micsthepick | CC BY-SA 3.0 |
added 71 byte version
|
Mar 16, 2017 at 13:40 | comment | added | Felipe Nardi Batista |
lambda x:sum(map(len,map(str,(range(x+1)if x>0 else range(0,x-1,-1))))) for 71 bytes
|
|
Mar 11, 2017 at 6:04 | history | edited | micsthepick | CC BY-SA 3.0 |
fixed some arithmetic
|
S Mar 10, 2017 at 7:46 | history | suggested | numbermaniac | CC BY-SA 3.0 |
added TIO links
|
Mar 10, 2017 at 7:16 | review | Suggested edits | |||
S Mar 10, 2017 at 7:46 | |||||
Mar 10, 2017 at 6:27 | history | edited | micsthepick | CC BY-SA 3.0 |
added my own version
|
Mar 10, 2017 at 6:21 | history | edited | micsthepick | CC BY-SA 3.0 |
78-char version
|
Mar 10, 2017 at 6:16 | history | edited | micsthepick | CC BY-SA 3.0 |
added 3 characters in body
|
Mar 10, 2017 at 6:14 | comment | added | micsthepick |
@numbermaniac here is an equivalent: print sum(map(len,map(str,(range(x+1)if x>0 else range(0,x-1,-1)))))
|
|
Mar 10, 2017 at 6:12 | comment | added | micsthepick | @numbermaniac can I do something similar this way? | |
Mar 10, 2017 at 6:09 | history | edited | micsthepick | CC BY-SA 3.0 |
sum instead of ''.join()
|
Mar 10, 2017 at 6:07 | comment | added | numbermaniac |
You can use map on the second line for 78 bytes: print len(''.join(map(str,(range(x+1)if x>0 else range(0,x-1,-1))))) . You might save even more by making it a lambda.
|
|
Mar 10, 2017 at 5:57 | history | answered | micsthepick | CC BY-SA 3.0 |