Activity for General Sebast1anâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #284399 |
Post edited: |
— | about 3 years ago |
Edit | Post #284399 |
Post edited: |
— | about 3 years ago |
Comment | Post #284401 |
@#8056 There are times that `|` indeed does save more bytes. I can't find a proper code that saves at least a byte. (more) |
— | about 3 years ago |
Edit | Post #284396 |
Post edited: |
— | about 3 years ago |
Edit | Post #284397 |
Post edited: |
— | about 3 years ago |
Edit | Post #284396 |
Post edited: |
— | about 3 years ago |
Edit | Post #284401 | Initial revision | — | about 3 years ago |
Answer | — |
A: Tips for golfing in Python `| == or` This bitwise operator can sometimes be used as the replacement for `or`. a=-2;b=3 if(a>0)|(b>0):print(a+b) Try it online! (more) |
— | about 3 years ago |
Edit | Post #283987 |
Post edited: |
— | about 3 years ago |
Edit | Post #284399 | Initial revision | — | about 3 years ago |
Answer | — |
A: 1, 2, Fizz, 4, Buzz! [shortC], 95 93 91 bytes AIi;Wi++<100){Ch[]={"%d "," "},p=h;i%3||(p++="Fizz%2$s");i%5||(p="Buzz ");Rh,i,h[1]); Try it online! From @celtschk's C (gcc) answer. (more) |
— | about 3 years ago |
Edit | Post #284396 |
Post edited: |
— | about 3 years ago |
Edit | Post #284396 |
Post edited: |
— | about 3 years ago |
Suggested Edit | Post #284397 |
Suggested edit: (more) |
helpful | about 3 years ago |
Edit | Post #284396 |
Post edited: |
— | about 3 years ago |
Edit | Post #284396 | Initial revision | — | about 3 years ago |
Answer | — |
A: Convert integer to English [Python 3], 596 589 585 482 468 467 429 bytes def f(x): 	s="";i="r fif six seven eigh nine";a=f"zero one two three four five six seven eight nine ten eleven twelve thir fou{i} twen thir fo{i}".split();t=1000;c=tt 	if x>=c:s=f(x//c)+" million";x%=c 	if x>=t:s+=" "(s>"")+f(x... (more) |
— | about 3 years ago |
Edit | Post #283948 |
Post edited: |
— | about 3 years ago |
Edit | Post #283948 |
Post edited: |
— | about 3 years ago |
Edit | Post #284088 |
Post edited: |
— | about 3 years ago |
Edit | Post #284088 |
Post edited: |
— | about 3 years ago |
Comment | Post #284088 |
@#8056 Okay, I'll let it pass. (more) |
— | about 3 years ago |
Comment | Post #284088 |
@#8056 I don't understand how you can get a newline on the output. And any characters not part of the specification can be ignored, keyword "can". (more) |
— | about 3 years ago |
Comment | Post #284088 |
@#8056 Thanks for these testcases. (more) |
— | about 3 years ago |
Edit | Post #284088 |
Post edited: |
— | about 3 years ago |
Comment | Post #282280 |
So which of the characters formatted with `\` won't be in the count on characters? (more) |
— | about 3 years ago |
Edit | Post #284337 |
Post edited: |
— | about 3 years ago |
Comment | Post #284350 |
Can you please make the examples to prove that the answer is valid? (more) |
— | about 3 years ago |
Edit | Post #284334 |
Post edited: |
— | about 3 years ago |
Edit | Post #284180 |
Post edited: |
— | about 3 years ago |
Suggested Edit | Post #284326 |
Suggested edit: (more) |
helpful | about 3 years ago |
Suggested Edit | Post #284180 |
Suggested edit: (more) |
helpful | about 3 years ago |
Edit | Post #284337 |
Post edited: |
— | about 3 years ago |
Edit | Post #284337 | Initial revision | — | about 3 years ago |
Article | — |
99 FizzBuzzes of Beer On Golf [cancelled] Background Randomly encountered this challenge on CGCC. Looks like a nice challenge, and since the 2 originating challenges are already here, why not add this to the fun? Challenge Recreate the "99 Bottles of Beer" song, however, "beer" is twisted by the FizzBuzz sequence, where if the value... (more) |
— | about 3 years ago |
Edit | Post #284336 | Initial revision | — | about 3 years ago |
Answer | — |
A: "Hello, World!" [shortC], 16 bytes AJ"Hello, World! Try it online! (more) |
— | about 3 years ago |
Edit | Post #284334 |
Post edited: |
— | about 3 years ago |
Edit | Post #284334 |
Post edited: |
— | about 3 years ago |
Edit | Post #284334 | Initial revision | — | about 3 years ago |
Answer | — |
A: The Ludic Numbers [Python 3], 80 77 75 72 bytes def f(): 	yield 1;l=[range(2,236425)] 	while l:yield l[0];del l[::l[0]] Try it online! Prints out the whole sequence. I did my best to get the biggest number that won't crash the program. Golfed 3 bytes thanks to @Moshi's advice. (more) |
— | about 3 years ago |
Edit | Post #284040 |
Post edited: |
— | about 3 years ago |
Edit | Post #284267 |
Post edited: |
— | about 3 years ago |
Suggested Edit | Post #284267 |
Suggested edit: (more) |
helpful | about 3 years ago |
Comment | Post #284271 |
@#53579 No. The whole program must be outputted, so if you have a newline to be printed, then you must put a newline at the beginning of your program (considering this is reverse quining), which you probably don't want. (more) |
— | about 3 years ago |
Edit | Post #284191 |
Post edited: |
— | about 3 years ago |
Edit | Post #284271 | Initial revision | — | about 3 years ago |
Question | — |
Reverse your quine Challenge Write a program that prints its reversed self. For example, if your code is ``` foo() ``` Then it'll output: ``` )(oof ``` Make sure that the quine is a valid one, as defined here: > No cheating -- that means that you can't just read the source file and print it. Also, in ... (more) |
— | about 3 years ago |
Edit | Post #283555 |
Post edited: |
— | about 3 years ago |
Edit | Post #284191 |
Post edited: |
— | about 3 years ago |