Skip to main content

Timeline for Visualize a large int

Current License: CC BY-SA 4.0

19 events
when toggle format what by license comment
Oct 15, 2019 at 17:37 comment added squid You can remove the space after the 4, like: len(n)<4and
Oct 14, 2019 at 12:54 history edited Alfe CC BY-SA 4.0
added 85 characters in body
Oct 13, 2019 at 6:54 comment added Sanchises Your answer doesn't follow your own spec; just leave it at kGMT instead of your fancy Unicode. Especially because the default scoring is bytes not characters.
Oct 12, 2019 at 1:46 history edited Alfe CC BY-SA 4.0
added 2 characters in body
Oct 12, 2019 at 1:24 comment added xnor @Alfe See the golfing rules summary for Python.. Your first function is fine as a standalone. If you use Python 2, its input can take in a number or string. For functions, you can also generally assume whichever kind you prefer.
Oct 11, 2019 at 23:51 history edited Alfe CC BY-SA 4.0
added shorter solution
Oct 11, 2019 at 23:29 comment added Alfe @Arnauld Thanks for the clarification, but that leaves me with the option to replace the str(x) by input(), effectively even skipping the conversion to string (and adding a byte). How should we pass in a number in code-golf? Always via reading from stdin and converting it to int afterwards?
Oct 11, 2019 at 12:51 comment added manatwork Or the same pad & trim idea without reversing, but with a for loop over hardcoded list: Try it online!
Oct 11, 2019 at 12:23 comment added manatwork @Alfe, as the maximum length to handle is known, you could just pad the input up to a multiple of 3 ≥ 15, then split to groups from left, without reversing twice: Try it online! Just hint, it still violate the IO rule.
Oct 11, 2019 at 11:39 comment added Arnauld Taking input in a variable is not allowed. Typically, answers are either functions with the relevant number of arguments, or full programs using STDIN / STDOUT. For more detailed rules, see Default for Code Golf: Input/Output methods.
Oct 11, 2019 at 11:08 history edited Alfe CC BY-SA 4.0
Added an apology for posting an answer to my own challenge so quickly.
Oct 11, 2019 at 11:02 history undeleted Alfe
Oct 11, 2019 at 10:55 history deleted Alfe via Vote
Oct 11, 2019 at 10:54 history undeleted Alfe
Oct 11, 2019 at 10:54 history deleted Alfe via Vote
Oct 11, 2019 at 10:54 history undeleted Alfe
Oct 11, 2019 at 10:53 history deleted Alfe via Vote
Oct 11, 2019 at 10:53 comment added Adám It is fine to answer your own challenge, but normally, authors wait for a while (I'd say a week) to give others a chance.
Oct 11, 2019 at 10:43 history answered Alfe CC BY-SA 4.0