Skip to main content

Timeline for Randomizing until 0

Current License: CC BY-SA 4.0

7 events
when toggle format what by license comment
Jun 17, 2020 at 9:04 history edited CommunityBot
Commonmark migration
Jul 25, 2018 at 18:15 comment added user77406 Also, you should probably check out the Standard Loopholes and Tips for golfing in C, if you haven't already :)
Jul 25, 2018 at 18:11 comment added user77406 Adding the compiler flag -Dd='printf("%i,",x' instead of the #define would save you some bytes (-4), and is allowed as long as you count the bytes towards your result (because it is a non-standard preprocessor directive. You can also leave out the imports (at least with -std=c++98 and -w, which don't count for bytes), and the variable types. So, you'd have p(x){d);while(x>0)d=rand()%x;} and -Dd='printf("%i,",x'.
Jul 10, 2018 at 8:14 history edited eKKiM CC BY-SA 4.0
remove main function to make it valid.
Jul 9, 2018 at 15:25 comment added FryAmTheEggman Hi, and welcome to PPCG :) You do not need to include the sample call in your byte count (i.e. you don't need to write the main function) since we accept functions as valid submissions. Otherwise, your submission is technically not valid since if the input was some two or more digit number the output could be ambiguous. If you just add a space at the end of the format string in your macro you should be fine. Happy golfing!
Jul 9, 2018 at 14:17 review First posts
Jul 9, 2018 at 14:24
Jul 9, 2018 at 14:17 history answered eKKiM CC BY-SA 4.0