Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs

Dashboard
Notifications
Mark all as read

Activity for Mark Giraffe‭

Type On... Excerpt Status Date
Edit Post #282901 Post edited:
7 days ago
Edit Post #282901 Post edited:
7 days ago
Edit Post #284611 Post edited:
7 days ago
Edit Post #284611 Post edited:
7 days ago
Edit Post #284614 Post edited:
8 days ago
Edit Post #284614 Post edited:
8 days ago
Edit Post #284614 Initial revision 8 days ago
Answer A: Reverse an ASCII string
[Java (JDK)], 88 83 bytes static void f(String s){for(int i=s.length();i>0;System.out.print(s.charAt(--i)));} Try it online!
(more)
8 days ago
Edit Post #284611 Post edited:
9 days ago
Edit Post #284611 Post edited:
9 days ago
Edit Post #284611 Initial revision 9 days ago
Answer A: Make $2 + 2 = 5$
[Java (JDK)], 51 50 23 21 bytes x->y->x==y&y==2?5:x+y Try it online! Golfed 27 bytes thanks to @Moshi's advice. Golfed 2 bytes thanks to @user's advice on Discord.
(more)
9 days ago
Edit Post #284605 Initial revision 10 days ago
Answer A: Tips for golfing in Java
A clever way to replace `Math` functions You can shorten `if-else` statements through the `a?b:c` syntax, where `a` is the statement of `if`, `b` is the result of `if`, and `c` is the result of `else`. static void main(String[]a){ 	int i = 95; 	System.out.print(i>0?"positive":"ne...
(more)
10 days ago
Edit Post #284604 Initial revision 10 days ago
Answer A: Tips for golfing in Java
Booleans are replaceable Java, like Python, has pretty convenient yet nasty ways to golfing down code through comparison operators. Especially this case, this time with booleans. You can compare `int`s and it will result to either `false` or `true`, which helps you break 1 and 2 bytes respectively...
(more)
10 days ago
Edit Post #284603 Initial revision 10 days ago
Answer A: Collatz conjecture; Count the tries to reach $1$
[Java (JDK)], 150 bytes interface M{static void main(String[]a){int i=new java.util.Scanner(System.in).nextInt(),j=0;for(;i!=1;j++){i=i%2==1?i3+1:i/2;}System.out.print(j);}} Try it online! From my shortC answer.
(more)
10 days ago
Edit Post #284589 Post edited:
10 days ago
Edit Post #284589 Post edited:
10 days ago
Comment Post #284578 I defy your rules! https://codegolf.codidact.com/posts/283141/284589#answer-284589
(more)
11 days ago
Edit Post #284589 Post edited:
11 days ago
Edit Post #284589 Initial revision 11 days ago
Answer A: 99 Shortened Bottles of Beer
[Java (JDK)], 311 301 bytes interface A{static void main(String[]x){String a=" bottle",b=" of beer",c=" on the wall. ";for(int i=99;i>0;i--){var e=i!=1?"s":"";System.out.println(i+a+e+b+c+(i)+a+e+b+(i!=1?".\nTake one down and pass it around. ":".\nGo to the store and buy some more. ")+(i!=...
(more)
11 days ago
Edit Post #284588 Initial revision 11 days ago
Answer A: Tips for golfing in Java
Use `interface` The special thing about this is that it lets you drop `public` when you originally call a `class` to run the `main` function. ```java class F{public static void main(String[]a{}} interface M{static void main(String[]a){}} ``` Try it online! Used on "Hello, {name}!"
(more)
11 days ago
Comment Post #284578 @#53837 Are you challenging me?
(more)
11 days ago
Edit Post #284579 Initial revision 12 days ago
Answer A: Tips for golfing in Java
Use `for(;;)` instead of `while(true)` The title's self-explanatory. A byte saver.
(more)
12 days ago
Edit Post #284578 Post edited:
12 days ago
Edit Post #284578 Initial revision 12 days ago
Question Tips for golfing in Java
This is a list of golfing tips for the language known as Java. If you have a tip, add it in!
(more)
12 days ago
Edit Post #284337 Post edited:
16 days ago
Edit Post #284407 Post edited:
16 days ago
Edit Post #284407 Post edited:
16 days ago
Edit Post #284519 Post edited:
16 days ago
Comment Post #284520 Yeah, I'm not so sure if that's even a valid way to set your inputs. Might update later.
(more)
17 days ago
Edit Post #284519 Post edited:
17 days ago
Edit Post #284407 Post edited:
17 days ago
Edit Post #284407 Post edited:
18 days ago
Edit Post #284519 Initial revision 18 days ago
Question Operation "Find The Operator"
Challenge Make a program that takes input of 3 non-negative integers: a result and 2 other values that once calculated results to the 3rd value. - The program must figure out how to get the 2 first numbers to equivalence itself with the 3rd. It could be either addition, subtraction, multiplicat...
(more)
18 days ago
Edit Post #284407 Post edited:
20 days ago
Edit Post #284407 Post edited:
20 days ago
Edit Post #284447 Initial revision 20 days ago
Answer A: "Hello, World!"
[Seriously], 1 byte H Try it online! Similar to HQ9+.
(more)
20 days ago
Edit Post #284446 Initial revision 20 days ago
Answer A: 99 Shortened Bottles of Beer
[Seriously], 1 byte N Try it online! Yep. lmao
(more)
20 days ago
Edit Post #284445 Initial revision 20 days ago
Answer A: Truthify an array
[shortC], 78 bytes i,j;f(Ix,Iy,Ip){R"[");O;i<x;i++)Oj=0;j<y;j++)p++&&R"[%d,%d],",i,j);J"\b]");} Try it online! From @Lundin's C (gcc) answer.
(more)
20 days ago
Edit Post #284443 Initial revision 21 days ago
Answer A: "Hello, {name}!"
[shortC], 30 bytes B){Cs[100];Qs);R"Hello, %s!",s Try it online!
(more)
21 days ago
Edit Post #284442 Initial revision 21 days ago
Answer A: Obligatory Quine Challenge
[shortC], 38 bytes Bs){Rs="Bs){Rs=%c%s%c,34,s,34",34,s,34 Try it online! From GeeksForGeeks's C implementation.
(more)
21 days ago
Edit Post #284428 Post edited:
21 days ago
Edit Post #284440 Initial revision 21 days ago
Answer A: Collatz conjecture; Count the tries to reach $1$
[shortC], 47 bytes a,b;AOK"%d",&b);b-1;b=b%2?b3+1:b/2)a++;R"%d",a Try it online! From @ugoren's C answer from CGCC.
(more)
21 days ago
Edit Post #284399 Post edited:
21 days ago
Edit Post #284407 Post edited:
21 days ago
Edit Post #284428 Post edited:
22 days ago
Edit Post #284428 Post edited:
22 days ago
Edit Post #284438 Initial revision 22 days ago
Answer A: 99 Shortened Bottles of Beer
[shortC], 223 bytes AOCw=" bottles of beer on the wall",i=100;--i;)R"%d%.s%s, %d%.s%.8s.\n%s, %d%.s%s.\n\n",i,i-1?8:7,w,w+8,i,i-1?8:7,w,w+8,i^1?"Take one down and pass it around":"Go to the store and buy some more",i^1?i-1:99,i^2?8:7,w,w+8 Try it online! From @Lundin's C (gcc) answer. ...
(more)
22 days ago
Edit Post #284428 Post edited:
22 days ago
Edit Post #284396 Post edited:
22 days ago
Edit Post #284396 Post edited:
22 days ago
Edit Post #284428 Post edited:
22 days ago
Edit Post #284428 Post edited:
22 days ago
Edit Post #284001 Post edited:
22 days ago
Edit Post #284428 Post edited:
22 days ago
Edit Post #284407 Post edited:
22 days ago
Comment Post #284407 @#53573 When I say "method", I mean the operator. Sorry about that. And to answer your question, the returning value is a character.
(more)
22 days ago
Edit Post #284430 Post edited:
22 days ago
Edit Post #284430 Initial revision 22 days ago
Answer A: Repeat the characters
[shortC], 40 37 bytes i;f(Cs,In){O;s;s++)Oi=n;i--;Ps));} Try it online! A shortC conversion of @Lundin's C (gcc) implementation.
(more)
22 days ago
Edit Post #284429 Initial revision 22 days ago
Answer A: Reverse an ASCII string
[shortC], 24 bytes f(Cs){s&&f(s+1)^Ps);} Try it online! A shortC conversion of @Sisyphus's C (gcc) implementation.
(more)
22 days ago
Edit Post #284428 Initial revision 22 days ago
Answer A: Encode and decode floating point integers
[Python 3], 268 250 235 233 210 197 148 bytes def a(n):e=(n>>6).bitlength();f=2e;l=n&(f-1);N=(n>>e)&31;return((e+(n>31))f) def b(r):E=r>>5;return((r&31)+32(E>0))2(E-(E>0)) Try it online! Golfed 15 bytes thanks to @celtschk's advice. Golfed another 23 bytes thanks to @celtschk's ...
(more)
22 days ago
Edit Post #282996 Post edited:
22 days ago
Edit Post #284396 Post edited:
22 days ago
Edit Post #284001 Post edited:
22 days ago
Edit Post #284407 Post edited:
23 days ago
Edit Post #284407 Post edited:
23 days ago
Edit Post #284396 Post edited:
23 days ago
Edit Post #284407 Post edited:
24 days ago
Edit Post #284407 Post edited:
24 days ago
Edit Post #284407 Post edited:
24 days ago
Edit Post #284407 Post edited:
24 days ago
Edit Post #284407 Post edited:
24 days ago
Comment Post #284337 Please place your reason of downvoting in this thread so I can fix the issues or figure if the challenge should be cancelled entirely.
(more)
24 days ago
Edit Post #284407 Initial revision 24 days ago
Article Operation "Find The Operator" [released]
Challenge Make a program that takes input of 3 non-negative integers: a result and 2 other values that once calculated results to the 3rd value. - The program must figure out how to get the 2 first numbers to equivalence itself with the 3rd. It could be either addition, subtraction, multiplicat...
(more)
24 days ago
Edit Post #284399 Post edited:
25 days ago
Edit Post #284399 Post edited:
25 days 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)
25 days ago
Edit Post #284396 Post edited:
25 days ago
Edit Post #284397 Post edited:
25 days ago
Edit Post #284396 Post edited:
25 days ago
Edit Post #284401 Initial revision 25 days 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)
25 days ago
Edit Post #283987 Post edited:
25 days ago
Edit Post #284399 Initial revision 25 days 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)
25 days ago
Edit Post #284396 Post edited:
25 days ago
Edit Post #284396 Post edited:
25 days ago
Suggested Edit Post #284397 Suggested edit:

(more)
helpful 25 days ago
Edit Post #284396 Post edited:
25 days ago
Edit Post #284396 Initial revision 25 days ago
Answer A: Convert integer to English
[Python 3], 596 589 585 482 468 467 429 bytes def f(x): &#9;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 &#9;if x&gt;=c:s=f(x//c)+" million";x%=c &#9;if x&gt;=t:s+=" "(s&gt;"")+f(x...
(more)
25 days ago
Edit Post #283948 Post edited:
26 days ago
Edit Post #283948 Post edited:
26 days ago
Edit Post #284088 Post edited:
26 days ago
Edit Post #284088 Post edited:
27 days ago
Comment Post #284088 @#8056 Okay, I'll let it pass.
(more)
27 days 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)
27 days ago
Comment Post #284088 @#8056 Thanks for these testcases.
(more)
27 days ago
Edit Post #284088 Post edited:
27 days ago
Comment Post #282280 So which of the characters formatted with `\` won't be in the count on characters?
(more)
29 days ago
Edit Post #284337 Post edited:
29 days ago
Comment Post #284350 Can you please make the examples to prove that the answer is valid?
(more)
29 days ago
Edit Post #284334 Post edited:
29 days ago
Edit Post #284180 Post edited:
29 days ago
Suggested Edit Post #284326 Suggested edit:

(more)
pending 29 days ago
Suggested Edit Post #284180 Suggested edit:

(more)
helpful 29 days ago
Edit Post #284337 Post edited:
30 days ago
Edit Post #284337 Initial revision 30 days 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)
30 days ago
Edit Post #284336 Initial revision 30 days ago
Answer A: "Hello, World!"
[shortC], 16 bytes AJ"Hello, World! Try it online!
(more)
30 days ago
Edit Post #284334 Post edited:
30 days ago
Edit Post #284334 Post edited:
30 days ago
Edit Post #284334 Initial revision 30 days ago
Answer A: The Ludic Numbers
[Python 3], 80 77 75 72 bytes def f(): &#9;yield 1;l=[range(2,236425)] &#9;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)
30 days ago
Edit Post #284040 Post edited:
about 1 month ago
Edit Post #284267 Post edited:
about 1 month ago
Suggested Edit Post #284267 Suggested edit:

(more)
helpful about 1 month 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 1 month ago
Edit Post #284191 Post edited:
about 1 month ago
Edit Post #284271 Initial revision about 1 month 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 1 month ago
Edit Post #283555 Post edited:
about 1 month ago
Edit Post #284191 Post edited:
about 1 month ago
Comment Post #284191 @#53579 The entire program must be reversed-quined, so no, no function answers allowed.
(more)
about 1 month ago
Comment Post #284159 You can remove the whitespace between parentheses and other symbols. [90 bytes](https://tio.run/##PY9BSsRAEEX3OUXRm0mGZjbuBrIQHXAhjAt3MUibdCel1V2hUxMyHsADeEQvEnuUDNTi8/7/UH84S8/hZnHly0LGv7UGaK/U7p0x5NUq5sJxhBkwwCcOr8Shs6PkW9IOiSZDJ1tuNkVdZC6yBxQbhZlGQD9wlO0iKd6Y0Y5QQpUBVOoDAyutGgzWmyQ8T2hVrf/MhlubWMf...
(more)
about 1 month ago
Comment Post #284191 @#53837 I think what ATaco is implying in the quote is the fact that in HTML, you can literally output anything without using the HTML tags, the supposed "data sections".
(more)
about 1 month ago
Edit Post #284040 Post edited:
about 1 month ago
Edit Post #284185 Post edited:
about 1 month ago
Edit Post #284191 Initial revision about 1 month ago
Article Reverse your quine [released]
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 1 month ago
Edit Post #284040 Post edited:
about 1 month ago
Edit Post #284185 Initial revision about 1 month ago
Question Collatz conjecture; Count the tries to reach $1$
Background Check out this video on the Collatz conjecture, also known as A006577. If you don't know what this is, we're given an equation of $3x + 1$, and it is applied this way: - If $x$ is odd, then $3x + 1$. - If $x$ is even, then $\frac{x}{2}$. This will send us in a loop of `4 → 2 →...
(more)
about 1 month ago
Edit Post #284132 Post edited:
about 1 month ago
Edit Post #283799 Post edited:
about 1 month ago
Edit Post #284128 Post edited:
about 1 month ago
Edit Post #279696 Post edited:
about 1 month ago
Edit Post #284157 Initial revision about 1 month ago
Answer A: Tips in golfing using PHP
Set arrays without `array()` In a few occasions, setting an array using `array()` can be a bit costly. Thankfully, you can assign an array like how to assign a Python list. <?php $a=["Hello","MarkFuncs","Golfing"];printr($a); Try it online!
(more)
about 1 month ago
Edit Post #284156 Initial revision about 1 month ago
Answer A: Tips in golfing using PHP
Whitespace can be removed in between keywords and variables You can easily remove the whitespace that's in-between a keyword (`return` or a function that doesn't need parentheses) and a variable (either starting with `$` for the variable's name or `"` if the variable to deal with is a string): ...
(more)
about 1 month ago
Edit Post #284154 Initial revision about 1 month ago
Answer A: Tips in golfing using PHP
Anything that's outside the script is echoed This probably has to deal with the fact that PHP is a script commonly used on HTML, and anything that is written on the HTML document--not inside the script--is outputted. Used on "Hello, World!".
(more)
about 1 month ago
Edit Post #284153 Initial revision about 1 month ago
Answer A: Tips in golfing using PHP
Use `Used on Reverse an ASCII string.
(more)
about 1 month ago
Edit Post #284152 Initial revision about 1 month ago
Answer A: Tips in golfing using PHP
Remove `?>` You can save 2 bytes by removing the syntax that ends the PHP script when you don't need it. The program will still work. <?php echo"Hello!"; Try it online!
(more)
about 1 month ago
Edit Post #284151 Initial revision about 1 month ago
Question Tips in golfing using PHP
This is a list of golfing tips for the language known as Philippine Peso PHP. If you have a tip, add it in!
(more)
about 1 month ago
Edit Post #284150 Initial revision about 1 month ago
Answer A: Tips for golfing in Python
Use `a+=[b]` instead of `a.append(b)` The title says it all. a=[];b=10;print(a) a+=[b];print(a) Try it online!
(more)
about 1 month ago
Edit Post #284149 Initial revision about 1 month ago
Answer A: Tips for golfing in Python
` == and` If you want to check if two booleans or integers and want to check if both of them are `true` in an `if` statement, then you can leave out `and` to replace it with ``: x=2;y=3 if x and y:print("Yes") if xy:print("Yes") Try it online!
(more)
about 1 month ago
Edit Post #284147 Initial revision about 1 month ago
Answer A: Tips for golfing in Python
Combine loops Suppose you have a `for` loop in another, maybe a couple of times, and nothing else inside of the outer `for` loops (except for the first `for` loop since anything outside won't be involved at all). It's probably a `range()` problem again. If you're doing something like this: ...
(more)
about 1 month ago
Edit Post #284088 Post edited:
about 1 month ago
Comment Post #284088 @#8056 Oh noooooooooooo, I made mistek. Thanks for pointing that out.
(more)
about 1 month ago
Edit Post #284132 Post edited:
about 1 month ago
Edit Post #284132 Post edited:
about 1 month ago
Comment Post #279434 Is it OK if the program sends an error but still outputs what you want? (This might have to be a Meta question or something.)
(more)
about 1 month ago
Edit Post #284132 Initial revision about 1 month ago
Answer A: It's Hip to be Square
[PHP], 69 37 bytes <?=($y=sqrt($x=fgets(STDIN)))$y==$x; Try it online! Golfed 32 bytes thanks to @Shaggy's advice.
(more)
about 1 month ago
Comment Post #282460 Are C and C++ considered different languages?
(more)
about 1 month ago
Edit Post #284128 Initial revision about 1 month ago
Question Abbreviate everything
Challenge Make a program that takes input of a string and abbreviate it. - All letters of an abbreviation are capitalized, so keep that in mind. - Whitespace, numbers and non-English characters are ignored. - If the inputted string is a paragraph (2+ sentences), the abbreviation will be split...
(more)
about 1 month ago
Edit Post #283799 Post edited:
about 1 month ago
Edit Post #284063 Post edited:
about 1 month ago
Edit Post #284124 Initial revision about 1 month ago
Answer A: Getting perfect squares, differently
[PHP], 57 bytes <?php $x=0;$y=1;while(1){echo(string)($x+=$y)." ";$y+=2;} Try it online! PHP's a nice language, I tell ya.
(more)
about 1 month ago
Edit Post #283971 Post edited:
about 1 month ago
Edit Post #284115 Post edited:
about 1 month ago
Edit Post #284117 Post edited:
about 1 month ago
Edit Post #284091 Post edited:
about 1 month ago
Edit Post #284117 Initial revision about 1 month ago
Answer A: A number adder, not a death adder
[PHP], 58 28 bytes P1: <?=$argv[1]+10; Try it online!
(more)
about 1 month ago
Edit Post #282472 Post edited:
about 1 month ago
Edit Post #284116 Initial revision about 1 month ago
Answer A: Evens or Odds - you know this one
[PHP], 36 bytes <?php $x=(int)fgets(STDIN);echo$x%2; Try it online! Outputs `1` if odd and `0` if even.
(more)
about 1 month ago
Edit Post #284115 Initial revision about 1 month ago
Answer A: Reverse an ASCII string
[PHP], 32 24 bytes <?=strrev(fgets(STDIN)); Try it online!
(more)
about 1 month ago
Edit Post #284114 Post edited:
about 1 month ago
Edit Post #284114 Post edited:
about 1 month ago
Edit Post #284114 Initial revision about 1 month ago
Answer A: 1, 2, Fizz, 4, Buzz!
[PHP], 114 bytes Philippine Peso this language, it was tricky.
(more)
about 1 month ago
Comment Post #284104 Noice, you beat my answer. Congrats!
(more)
about 1 month ago
Edit Post #284108 Initial revision about 1 month ago
Answer A: Tips for golfing in Python
Replace `range()` if $n for i in 0,1,2,3:print(i) Try it online!
(more)
about 1 month ago
Edit Post #284100 Post edited:
about 1 month ago
Comment Post #283971 @#53837 Thanks for catching that. Unfortunately, `Scanner` is the only way to set an input. At least I got rid of the string assignment.
(more)
about 1 month ago
Edit Post #283971 Post edited:
about 1 month ago
Edit Post #284100 Initial revision about 1 month ago
Answer A: Repeat the characters
[Python 3], 53 38 bytes def f(x,y): &#9;for c in x:print(end=cy) Try it online! I'm sure someone will find a `lambda` solution to this. Golfed 15 bytes thanks to @Moshi's advice.
(more)
about 1 month ago
Edit Post #284091 Post edited:
about 2 months ago
Edit Post #284091 Initial revision about 2 months ago
Answer A: "Hello, {name}!"
[PHP], 55 27 21 bytes Hello, ! Try it online! Golfed 28 bytes thanks to my Software CD post. Golfed 6 bytes thanks to @Shaggy's advice.
(more)
about 2 months ago
Edit Post #283948 Post edited:
about 2 months ago
Edit Post #284088 Initial revision about 2 months ago
Question Define a mathematical expression in English
Background Inspired by this challenge that is also a mathematical English translator. Challenge Write a program that translates a mathematical expression using English with the following specifications: - The expression can only take in numbers, letters from the English alphabet, the equa...
(more)
about 2 months ago
Comment Post #284087 I suppose an example is the `Hello, World!` challenge, but users should be creative.
(more)
about 2 months ago
Comment Post #283946 @#8176 Yep, that's <a class="badge is-tag">popularity-contest</a>. In fact, I edited it to answer your question.
(more)
about 2 months ago
Edit Post #283946 Post edited:
about 2 months ago
Edit Post #284079 Post edited:
about 2 months ago
Edit Post #284079 Post edited:
about 2 months ago
Edit Post #284080 Initial revision about 2 months ago
Answer A: Suggestions for the new header banner/background
Binary and code plastered a lot One of the more generic ways of adding design to a code challenge site. The binary digits can be plastered around the header in a way that it looks cryptic. But binary is not enough, we can also have code of certain languages for some diversity. What's more cool ...
(more)
about 2 months ago
Edit Post #284079 Initial revision about 2 months ago
Answer A: Digit Sum Integer Sequence (working title)
[Python 3], 183 181 175 bytes def f(a,b): &#9;c=a;a=str(a) &#9;for i in range(b): &#9;&#9;y=0;z=9 &#9;&#9;for j in range(len(a)): &#9;&#9;&#9;if y&lt;int(a[j]):y=int(a[j]) &#9;&#9;&#9;if z&gt;int(a[j]):z=int(a[j]) &#9;&#9;c=int(a)+y+z;a=str(c) &#9;print(c) Try it online! I deci...
(more)
about 2 months ago
Comment Post #284068 I hope you get a title that you'd like to use.
(more)
about 2 months ago
Suggested Edit Post #279696 Suggested edit:

(more)
helpful about 2 months ago
Edit Post #284066 Initial revision about 2 months ago
Answer A: Tips for golfing in Python
Assign `float`s while leaving out zeroes Python allows such strange assignment. You can save bytes by removing the number preceding `.` if it's only `0`: i=.5 print(i) Try it online! The same goes for succeeding digits, if the decimal part of the `float` is `0`: ...
(more)
about 2 months ago
Edit Post #283858 Post edited:
about 2 months ago
Edit Post #284023 Post edited:
about 2 months ago
Edit Post #284040 Post edited:
about 2 months ago
Edit Post #284064 Initial revision about 2 months ago
Answer A: Reverse an ASCII string
[Lua], 32 bytes print(string.reverse(io.read())) Try it online! Noice built-in.
(more)
about 2 months ago
Edit Post #284063 Initial revision about 2 months ago
Answer A: Getting perfect squares, differently
[Lua], 41 40 bytes x=0 y=1while""do print(x)x=x+y y=y+2 end Try it online!
(more)
about 2 months ago
Edit Post #284062 Initial revision about 2 months ago
Answer A: A number adder, not a death adder
[Lua], 51 bytes P1: print("print(tonumber(io.read())+"..io.read()..")") Try it online! P2 (given I inputted 10, 29 bytes): print(tonumber(io.read())+10) Try it online!
(more)
about 2 months ago
Edit Post #284040 Post edited:
about 2 months ago
Edit Post #284061 Initial revision about 2 months ago
Answer A: Tips for golfing in Python
Renaming functions A funny, cool, and useful trick. If you have to write a single function multiple times (usually `range()` on `for` loops), then you can simply assign a variable by the function's name, no parentheses. An example assignment is: ``` r=range ``` Thing is, this can only appl...
(more)
about 2 months ago
Edit Post #284059 Initial revision about 2 months ago
Answer A: Tips in golfing using Lua
Convenient whitespace removal Here are instances where you can remove whitespace: Strings If you assigned or printed a string, then the next supposed line of code can lean on the right double-quote: --[[ name = "Mark" print(name) ]] name="Mark"print(name) Tr...
(more)
about 2 months ago
Comment Post #283858 @#53837 The reason it won't appear when posted in main.
(more)
about 2 months ago
Comment Post #283770 @#8176 When I say "preferably", it meant that the solution is most suited as such, not that it *has to be*. You can use macros too.
(more)
about 2 months ago
Edit Post #282153 Post edited:
about 2 months ago
Edit Post #284040 Post edited:
about 2 months ago
Comment Post #284040 @#53579 What do you mean? The count or the order?
(more)
about 2 months ago
Edit Post #284045 Initial revision about 2 months ago
Answer A: Diagonalized alphabet
[C (clang)], 206 bytes main(i){chars="YWUSQOMKIGECABDFHJLNPRTVXZ";for(i=13;i>0;printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n",s[-1+i],s[0+i],s[1+i],s[2+i],s[3+i],s[4+i],s[5+i],s[6+i],s[7+i],s[8+i],s[9+i],s[10+i],s[11+i],s[12+i]),i--);} Try it online! yez ai m gud progamer!11!
(more)
about 2 months ago
Suggested Edit Post #282153 Suggested edit:

(more)
helpful about 2 months ago
Edit Post #284044 Initial revision about 2 months ago
Question Suggestions for the new header banner/background
I'm bored. Let's do something. lmao While I was Somewhere Else, I went to make suggestions for designs on their sites, and no impact really occured. However, since I'm now a Codidactian (not a Codidactyl, sorry), I want to start doing the same here. And let's start off with the upcoming site desig...
(more)
about 2 months ago
Edit Post #282302 Post edited:
about 2 months ago
Edit Post #283770 Post edited:
about 2 months ago
Comment Post #284040 @#53196 Man, the mobile link on a computer is sick.
(more)
about 2 months ago
Edit Post #284040 Post edited:
about 2 months ago
Edit Post #284040 Post edited:
about 2 months ago
Comment Post #284035 @#53588 Eh, there'll be triangles soon.
(more)
about 2 months ago
Edit Post #284040 Initial revision about 2 months ago
Article Collatz conjecture; Count the tries to reach $1$ [released]
Background Check out this video on the Collatz conjecture, also known as A006577[^1]. If you don't know what this is, we're given an equation of $3x + 1$, and it is applied this way: - If $x$ is odd, then $3x + 1$. - If $x$ is even, then $\frac{x}{2}$. This will send us in a loop of `4 →...
(more)
about 2 months ago
Edit Post #284036 Initial revision about 2 months ago
Answer A: Tips for golfing in Python
Use `lambda`s instead of functions At most times, `lambda`s tend to make smaller code, which is helpful in golfing. Assigning a `lambda` is easy, just do: ``` lambda f:whatever ``` There are many answers that uses this strategy (I don't use it). Here are some examples: - Make $2 + 2 = 5$ ...
(more)
about 2 months ago
Edit Post #284035 Initial revision about 2 months ago
Article Draw shapes: E1 - Square/Rectangle
Challenge Take input of a non-whitespace character and a positive integer $n$, and print out a square (or rectangle) of size $n$ using the inputted character. Shortest program wins! Test Cases ```none n = 1, c = $ $$$ $ $ $$$ n = 3, c = ^ ^^^^^ ^ ^ ^ ^ ^ ^ ^^^^^ n = 10, ...
(more)
about 2 months ago
Edit Post #284034 Initial revision about 2 months ago
Answer A: Tips for golfing in Python
`import` You can import some libraries and if you find yourself using: ``` from lib import ``` Remove the space between `import` and ``, because it works for whatever reason.
(more)
about 2 months ago
Edit Post #284028 Post edited:
about 2 months ago
Edit Post #284028 Initial revision about 2 months ago
Answer A: Tips for golfing in Python
Combine conditionals Python has its fair share of comparison operators and can actually be used in a single conditional. For example: ``` x == 2 and y == 2 ``` can be: ``` x==y==2 ``` Used on Make $2 + 2 = 5$. @celtschk also mentions that different operators can also enter a single ...
(more)
about 2 months ago
Edit Post #283982 Post edited:
More golfing.
about 2 months ago
Suggested Edit Post #283982 Suggested edit:
More golfing.
(more)
helpful about 2 months ago
Edit Post #284026 Initial revision about 2 months ago
Answer A: Tips for golfing in Python
Replace `for` loops with string multiplication Let's say we have: for i in range(6):print(end="#") Try it online! This basically outputs `#` 6 times, which is self-explanatory in the code itself. Perhaps we can shorten it with string multiplication: print(end="#"6) Tr...
(more)
about 2 months ago
Edit Post #284024 Initial revision about 2 months ago
Answer A: "Hello, World!"
[jq] `--null-input` `--raw-output`, 15 bytes "Hello, World!" Try it online! They kept saying that [jq] is the language of September 2021. Still surprised no one even made a `Hello, World!` on it.
(more)
about 2 months ago
Edit Post #284023 Post edited:
about 2 months ago
Edit Post #283858 Post edited:
about 2 months ago
Edit Post #283858 Post edited:
about 2 months ago
Edit Post #284023 Initial revision about 2 months ago
Question Stairs? Stairs! Stairs.
Challenge - Make a program that takes input of an integer that's $n > 1$ and print out a staircase using a specific character for stair basing (hashes (`#`) for demonstration; you can use spaces, but not tabs or other whitespace characters), slashes (`/`), and underscores (``). - The basis of the...
(more)
about 2 months ago
Comment Post #283858 @#53837 They're the names of my stuffed toys, both are male. I don't know what flavortext is supposed to be, but I can tell you that the Mark is my username.
(more)
about 2 months ago
Edit Post #284013 Initial revision about 2 months ago
Answer A: "Hello, World!"
[SQLite], 21 bytes select'Hello, World!' Try it online!
(more)
about 2 months ago
Edit Post #284012 Initial revision about 2 months ago
Answer A: "Hello, World!"
[Emoji], 24 bytes 💬Hello, World!💬➡ Try it online!
(more)
about 2 months ago
Edit Post #284002 Post edited:
about 2 months ago
Comment Post #283751 @#53310 As long as the output is similar to the output of the test cases, you're good.
(more)
about 2 months ago
Comment Post #283751 @#53310 A list? What do you mean and how would it look like?
(more)
about 2 months ago
Edit Post #283858 Post edited:
about 2 months ago
Comment Post #284004 Yep, it matters. Strangely, it outputs the string format if without `--raw-output`...
(more)
about 2 months ago
Edit Post #284000 Post edited:
about 2 months ago
Edit Post #284002 Initial revision about 2 months ago
Answer A: Tips in golfing using Lua
Remove `print`'s parentheses when it's a single string `print` strangely works without parentheses, however, it only applies to single strings. In other words, it can't do the same for other variables or string concatenation inside the function. For example: ```lua print("Hello, World!") ```...
(more)
about 2 months ago
Edit Post #284001 Post edited:
about 2 months ago
Edit Post #284001 Initial revision about 2 months ago
Answer A: Coat of Many Colours
[Python 3], 349 261 160 bytes a="re y gree br sc bla oc pe rub ol v f li go ch m cre cri si ro a le rus grey pu w pi or blu".split() def f(b):return[j for i in a for j in b if j[:len(i)]==i] Try it online! Golfed 88 bytes thanks to @user's advice. Golfed 81 bytes thanks to @celt...
(more)
about 2 months ago
Edit Post #284000 Initial revision about 2 months ago
Answer A: My house is destroyed! Can you make me one?
[C (clang)], 116 102 bytes j,k;f(i){for(j=i;j--;printf("#"));for(j=i-1;j--;printf("#"))for(k=i-2,printf("\n#");k--;printf(" "));} Try it online! Sometimes, it's better to use functions when you're not restricted from using it. Golfed 14 bytes thanks to @Moshi's advice.
(more)
about 2 months ago
Edit Post #283948 Post edited:
about 2 months ago
Edit Post #283995 Post edited:
about 2 months ago
Edit Post #283983 Post edited:
about 2 months ago
Suggested Edit Post #279408 Suggested edit:

(more)
pending about 2 months ago
Edit Post #283995 Initial revision about 2 months ago
Article Output 1 to 1000 without built-in loops [cancelled]
Challenge Create a program that outputs $1$ to $1000$, but, you can't use `for`, `while` and loops of the like. Shortest program wins!
(more)
about 2 months ago
Suggested Edit Post #283983 Suggested edit:

(more)
helpful about 2 months ago
Edit Post #283982 Post edited:
about 2 months ago
Edit Post #283751 Post edited:
about 2 months ago
Edit Post #282241 Post edited:
about 2 months ago
Comment Post #283917 @#8176 Are you proposing to use the Wayback Machine for this kind of idea?
(more)
about 2 months ago
Edit Post #283978 Post edited:
about 2 months ago
Edit Post #283987 Post edited:
about 2 months ago
Edit Post #283987 Initial revision about 2 months ago
Answer A: 1, 2, Fizz, 4, Buzz!
[Lua], 126 118 bytes p=print for i=1,100 do if i%15==0 then p"FizzBuzz"elseif i%3==0 then p"Fizz"elseif i%5==0 then p"Buzz"else p(i)end end Try it online!
(more)
about 2 months ago
Edit Post #283978 Post edited:
about 2 months ago
Edit Post #283978 Post edited:
about 2 months ago
Suggested Edit Post #283982 Suggested edit:

(more)
helpful about 2 months ago
Comment Post #283982 I don't understand why a semicolon is there. It's unnecessary if you placed the next code in a newline or no code succeeds it.
(more)
about 2 months ago
Edit Post #283176 Post edited:
about 2 months ago
Comment Post #283978 @#8056 In your TIO links, you always placed a newline after the semicolon. I don't want you to keep on doing that if it will make me edit over and over, okay? :)
(more)
about 2 months ago
Edit Post #283978 Post edited:
about 2 months ago
Edit Post #283978 Post edited:
about 2 months ago
Edit Post #283978 Post edited:
about 2 months ago
Edit Post #283978 Post edited:
about 2 months ago
Edit Post #283978 Post edited:
about 2 months ago
Edit Post #283978 Post edited:
about 2 months ago
Edit Post #283978 Post undeleted about 2 months ago
Edit Post #283978 Post edited:
about 2 months ago
Edit Post #283978 Post deleted about 2 months ago
Edit Post #283978 Initial revision about 2 months ago
Answer A: Word Set Square
[Python 3], 196 195 145 102 91 89 87 79 bytes x=input();x+=x[::-1];i=-1 for c in x[:-1]:print(c(i>-1)+" "i+c);i+=1 print(x) Try it online! Golfed 50 bytes thanks to @celtschk's advice. Golfed another 43 bytes thanks to @celtschk's advice. Golfed another 11 bytes thanks to @...
(more)
about 2 months ago
Edit Post #282987 Post edited:
about 2 months ago
Edit Post #283972 Post edited:
about 2 months ago
Edit Post #283966 Post edited:
about 2 months ago
Comment Post #283966 @#53607 Pretty much.
(more)
about 2 months ago
Comment Post #283966 @#53503 Okay, sorry about that. Sure, I'll stop. Maybe self-answer only once for now.
(more)
about 2 months ago
Edit Post #283972 Post edited:
about 2 months ago
Edit Post #283972 Post edited:
about 2 months ago
Edit Post #283972 Initial revision about 2 months ago
Answer A: "Hello, {name}!"
[Ruby], 21 bytes puts"Hello, #{gets}!" Try it online! @snail's solution. I'll be giving them the credit since I don't want to change the input. [Ruby], 24 bytes puts'Hello, '+gets()+'!' Try it online!
(more)
about 2 months ago
Edit Post #283969 Post edited:
about 2 months ago
Edit Post #283971 Initial revision about 2 months ago
Answer A: "Hello, {name}!"
[Java (JDK)], 134 123 118 bytes interface M{static void main(String[]a){System.out.print("Hello, "+new java.util.Scanner(System.in).nextLine()+"!");}} Try it online! Golfed 5 bytes thanks to @user's advice.
(more)
about 2 months ago
Edit Post #283969 Initial revision about 2 months ago
Answer A: "Hello, {name}!"
[Lua], 35 32 bytes print("Hello, "..io.read().."!") Try it online! Golfed 3 bytes thanks to @Moshi's advice.
(more)
about 2 months ago
Edit Post #283968 Initial revision about 2 months ago
Answer A: "Hello, {name}!"
[Python 3], 27 bytes print(f"Hello, {input()}!") Try it online!
(more)
about 2 months ago
Edit Post #283966 Initial revision about 2 months ago
Question "Hello, {name}!"
Background While we do have a "Hello, World!" challenge, we still don't have one regarding input. So let's do one! Challenge Create a program that takes an input (not as a function argument) then outputs `Hello, `, the variable and `!` altogether. Standard I/O only applies. Shortest submissi...
(more)
about 2 months ago
Suggested Edit Post #283176 Suggested edit:

(more)
helpful about 2 months ago
Edit Post #283838 Post edited:
about 2 months ago
Edit Post #283948 Post edited:
about 2 months ago
Edit Post #283948 Initial revision about 2 months ago
Article Define a mathematical expression in English [released]
Background Inspired by this challenge that is also a mathematical English translator. Challenge Write a program that translates a mathematical expression using English with the following specifications: - The expression can only take in numbers, letters from the English alphabet, the equa...
(more)
about 2 months ago
Edit Post #282785 Post edited:
Typo. lmao
about 2 months ago
Edit Post #283946 Initial revision about 2 months ago
Question Can we have [popularity-contest]s?
Just curious, but this might help other users, so I'm placing at Meta. A popularity-contest is a non-object winning criteria challenge that is based on having the highest scored answer of the challenge. Basically, you can do the specific tasks in any way, and make the program a little something to...
(more)
about 2 months ago
Suggested Edit Post #282785 Suggested edit:
Typo. lmao
(more)
helpful about 2 months ago
Edit Post #283917 Post edited:
about 2 months ago
Edit Post #283917 Initial revision about 2 months ago
Question Separate the tags away from the Sandbox or delete the [finalized] tag
> This is a feature-request post consisting of 2 actions for a reason... There's this thing that's been bugging me for a while in Code Golf CD. If you go to the tag page of the Challenges category, you'll be greeted with, of course, tags. But there's one tag that I didn't want to see a part of in ...
(more)
about 2 months ago
Edit Post #283838 Post edited:
about 2 months ago
Edit Post #283649 Post edited:
about 2 months ago
Edit Post #283858 Post edited:
about 2 months ago
Comment Post #283858 @#53588 Yeah, that's fine, but it shouldn't be either an underscore nor slash.
(more)
about 2 months ago
Comment Post #283865 I completely agree with @#53579 here. The word `and` might not even be used at all to save bytes in most answers.
(more)
about 2 months ago
Edit Post #283858 Initial revision about 2 months ago
Article Stairs? Stairs! Stairs. [released]
Challenge - Make a program that takes input of an integer that's $n > 1$ and print out a staircase using a specific character for stair basing (hashes (`#`) for demonstration; you can use spaces, but not tabs or other whitespace characters), slashes (`/`), and underscores (``). - The basis of the...
(more)
about 2 months ago
Comment Post #283838 @#53503 After some consideration, go on. Use such answers. In the sandbox, Shaggy decided it's best to clear off the banning of the converter stuff, so I went along with it. In other words, such answers are now allowed.
(more)
about 2 months ago
Edit Post #283649 Post edited:
about 2 months ago
Edit Post #283838 Initial revision about 2 months ago
Question Make my value binary
Challenge What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value. - Take input of a non-negative decimal integer and output its binary value/form. - Any precedi...
(more)
about 2 months ago
Edit Post #283799 Post edited:
about 2 months ago
Edit Post #283799 Post edited:
about 2 months ago
Comment Post #283799 @#53196 Spaces.
(more)
about 2 months ago
Comment Post #283799 @#53196 Good question.
(more)
about 2 months ago
Edit Post #283799 Post edited:
about 2 months ago
Edit Post #283799 Initial revision about 2 months ago
Article Abbreviate everything [released]
Challenge Make a program that takes input of a string and abbreviate it. - All letters of an abbreviation are capitalized, so keep that in mind. - Whitespace, numbers and non-English characters are ignored. - If the inputted string is a paragraph (2+ sentences), the abbreviation will be split...
(more)
about 2 months ago
Edit Post #283751 Post edited:
about 2 months ago
Edit Post #283620 Post edited:
about 2 months ago
Edit Post #283754 Post edited:
Be happy I made a TIO for this.
about 2 months ago
Edit Post #283777 Initial revision about 2 months ago
Question Tips in golfing using Lua
Lua's not really used much in golfing, so it'd be pretty cool to learn some golfing tricks when making answers using it. What golfing tips are there for Lua?
(more)
about 2 months ago
Comment Post #283775 @#53506 Sadge. lmao
(more)
about 2 months ago
Edit Post #283770 Initial revision about 2 months ago
Question Make $2 + 2 = 5$
In this challenge, add 2 integers, but if both the integers are `2`, output `5`. Shortest code in each language wins! Example ungolfed program in [Python 3.x] def add(x, y): &#9;if x == 2 and y == 2: &#9;&#9;return 5 &#9;else: &#9;&#9;return x + y Try it online!
(more)
about 2 months ago
Suggested Edit Post #283754 Suggested edit:
Be happy I made a TIO for this.
(more)
helpful about 2 months ago
Comment Post #283751 @#53588 They're optional, as long as it can get you to golf some bytes.
(more)
about 2 months ago
Edit Post #283620 Post edited:
about 2 months ago
Comment Post #283754 I think it'd be helpful if you added a TIO link to the runnable source code.
(more)
about 2 months ago
Edit Post #283751 Initial revision about 2 months ago
Question My house is destroyed! Can you make me one?
Background A House of I I went on an adventure Grabbed resources and making deeds Like start to work on the materials To build the shelter I need It was a marvelous one At least in the eyes of mine And when the sun sets I go inside I went to sleep in comfort Hoping to...
(more)
about 2 months ago
Comment Post #283701 You're just making us produce chocolate for us, aren't you? :D
(more)
about 2 months ago
Edit Post #283715 Post edited:
about 2 months ago
Comment Post #283736 You know very good golfing ideas. I don't want to steal ideas on golfing, but I'll think of something to shorten mine, at least not to really beat you since I'm very beginner-level.
(more)
about 2 months ago
Comment Post #283716 @#8176 I'd like to have a <a class="badge is-tag">fastest-code</a> challenge in the site, though as someone who's poopy on making challenges, someone else can think of something. Speaking of those execution time displays, which do you think is the number that manners? We'll need to define that in fut...
(more)
about 2 months ago
Edit Post #283715 Post edited:
about 2 months ago
Edit Post #283649 Post edited:
about 2 months ago
Edit Post #283716 Post edited:
about 2 months ago
Suggested Edit Post #280004 Suggested edit:

(more)
declined 2 months ago
Comment Post #283649 @#53588 You want me to get rid of it? I'll do it if enough users support it.
(more)
2 months ago
Edit Post #283716 Initial revision 2 months ago
Article Speedrunning "Big Iron" [cancelled]
Background The inspiration of this challenge came from this video. The premise was to speedrun the song while still keeping the story intact. In the video, the lyrics go: ```none To the town Rode a ranger Had a big iron on his hip He came to kill an outlaw by the name of Texas Red Swift rang...
(more)
2 months ago
Edit Post #283555 Post edited:
2 months ago
Edit Post #283555 Post edited:
2 months ago
Edit Post #283715 Initial revision 2 months ago
Answer A: In The Jailhouse Now
[C (clang)], 210 198 183 bytes i,j,k,l;s(v,w,x,y,z){printf("%s",v);for(;w<x;w++){printf("%s",y);}puts(z);}main(){scanf("%i",&i);l=i-3;s("╔",j,l,"╦","╗");for(j=0;j<i-2;j++){s("╠",k,l,"╬","╣");}s("╚",j=0,l,"╩","╝");} Try it online! Still wondering if these characters could even count a...
(more)
2 months ago
Edit Post #283649 Post edited:
2 months ago
Edit Post #283649 Post edited:
2 months ago
Edit Post #283649 Post edited:
2 months ago
Edit Post #283620 Post edited:
2 months ago
Comment Post #283649 @#53503 That's considered one of the banned converters.
(more)
2 months ago
Edit Post #283649 Post edited:
2 months ago
Comment Post #283649 @#8056 Use whatever output since I have no idea how to manage negative values as binary digits. I'd prefer using `0`, but that's all on you. You can enter an empty output too if you want.
(more)
2 months ago
Edit Post #283620 Post edited:
2 months ago
Edit Post #283649 Post edited:
2 months ago
Edit Post #283649 Post edited:
2 months ago
Comment Post #283649 @#8056 Sure, thanks.
(more)
2 months ago
Edit Post #283649 Post edited:
2 months ago
Edit Post #283649 Post edited:
2 months ago
Comment Post #283649 @#8056 Name it whatever. I just used $n$ for demonstration. Thanks for pointing that out.
(more)
2 months ago
Edit Post #283649 Post edited:
2 months ago
Edit Post #283649 Initial revision 2 months ago
Article Make my value binary [released]
Challenge What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an `int` then turn it into it's binary value. - Take input of a non-negative decimal integer and output its binary value/form. - Any precedi...
(more)
2 months ago
Edit Post #283620 Post edited:
2 months ago
Edit Post #283620 Post edited:
2 months ago
Comment Post #283620 @#53501 Ah, thanks for reminding me. I changed `7` into `10`.
(more)
2 months ago
Comment Post #283620 @#53837 Sorry. Mark doesn't use weed.
(more)
2 months ago
Comment Post #283620 @#53196 Okay, I changed it "a bit" to make it easier to handle.
(more)
2 months ago
Edit Post #283620 Post edited:
2 months ago
Edit Post #283620 Initial revision 2 months ago
Article My house is destroyed! Can you make me one? [released]
Background I went on an adventure Grabbed resources and making deeds Like start to work on the materials To build the shelter I need It was a marvelous one At least in the eyes of mine And when the sun sets I go inside I went to sleep in comfort Hoping to show it to comr...
(more)
2 months ago
Edit Post #283578 Initial revision 2 months ago
Answer A: Generate Lewis Caroll's Jabberwocky
[Python 3], 874 bytes a="'Twas brillig, and the slithy toves\nDid gyre and gimble in the wabe;\nAll mimsy were the borogoves,\nAnd the mome raths outgrabe.";b="he Jabberwock";c="Beware t";d="One, two!";e="nd through";f="\n\n";g="vorpal" print(a+"\n\n\""+c+b+", my son!\nThe jaws that b...
(more)
2 months ago
Edit Post #283555 Post edited:
2 months ago
Edit Post #283555 Post edited:
2 months ago
Comment Post #283562 Thanks for the reimplantation. I was sleeping when you sent that comment. Oh well, props to ya for using `lambda`s.
(more)
2 months ago
Edit Post #283555 Post edited:
2 months ago
Comment Post #283555 @#53837 True, `lambda`s aren't really my thing, but thanks for the golfing ideas!
(more)
2 months ago
Edit Post #283555 Initial revision 2 months ago
Answer A: Evaluate a single variable polynomial equation
[Python 3], 167 127 118 117 94 63 bytes def f(a,b): &#9;y=0 &#9;for z in range(len(a)):y+=a[z]bz &#9;print(y) Try it online! Close gap to @user's `lambda` answer! Golfed 40 bytes thanks to @user's advice. Golfed another 9 bytes thanks to @user's advice.
(more)
2 months ago
Edit Post #279790 Post edited:
2 months ago
Edit Post #283443 Initial revision 2 months ago
Answer A: Small integer swapping
[C (clang)], 63 bytes x,y;main(){scanf("%i%i",&x,&y);printf("%i %i\n%i %i",x,y,y,x);} Try it online!
(more)
2 months ago
Edit Post #283442 Post edited:
2 months ago
Edit Post #283442 Initial revision 2 months ago
Question Remove flags on the leaderboard
I'm still being bugged by flags being ignored when adding the language onto the leaderboard. Take for example here on an answer in Vyxal: ... In case you don't know, when we write an answer, using flags will add them as `code` beside the language name, and I don't think it's necessary to have f...
(more)
2 months ago
Edit Post #283413 Post edited:
2 months ago
Comment Post #283417 You can do more golfing now. :P
(more)
2 months ago
Comment Post #283416 You can do more golfing now. :P
(more)
2 months ago
Comment Post #283414 You can do more golfing now. :P
(more)
2 months ago
Edit Post #283413 Post edited:
2 months ago
Edit Post #283408 Post edited:
2 months ago
Comment Post #283413 @#53837 So you don't get it? It's simple, the integers weren't swapped at all, only changed place in the output function.
(more)
2 months ago
Edit Post #280858 Post edited:
2 months ago
Edit Post #283413 Post edited:
2 months ago
Edit Post #283413 Initial revision 2 months ago
Question Small integer swapping
In this simple challenge, create a short program that takes 2 `int`s as input, output them, swap their places, then output them again. Those 2 integers can't be the same number. The program with the shortest solution wins! Loopholes are banned in this challenge. An example C program for the challe...
(more)
2 months ago
Edit Post #283408 Post edited:
2 months ago
Comment Post #283408 This is a discussion thread for the above question. I'm just wondering if this might be considered a dupe.
(more)
2 months ago
Edit Post #283408 Initial revision 2 months ago
Article Golf the MarkFuncs program [cancelled]
Introduction I wrote a Python program where it basically takes input of a string then something else if it's necessary, then it will solve a specific challenge, kinda like HQ9+. The program lies on a GitHub repo named MarkFuncs as the proglang's name if it even would exist. As of the posting of...
(more)
2 months ago
Comment Post #283404 @#53503 Thanks for that. I guess it's safe to assume that due to the impossibility, the challenge is cancelled.
(more)
2 months ago
Edit Post #283404 Post edited:
2 months ago
Edit Post #283404 Post edited:
2 months ago
Edit Post #283404 Initial revision 2 months ago
Article Get something random without functions [cancelled]
Introduction Random integer challenges aren't new. They've been here for a while now, yet none exists on Codidact. It's also noted that there are built-in functions that allows you to get random integers, which makes things all the more easier. How about upping the game? Challenge - Write a ...
(more)
2 months ago
Comment Post #283380 @#8176 But can't you declare the headers on the Header section of TIO?
(more)
2 months ago
Comment Post #283380 [467 bytes](https://tio.run/##VZFBbsMgEEWv4ngFmEi1uqnqWD1IlAUecIyKwR3AURrl7C6QVkoX6MP4Mf8zhj0YYc/bBpPASvctZwzSkpyF4@vLqb/VqGTN66syxl3S5oxK2aQDuktWDwKNCrliBHwmdTChSrooAVNSjMM1l41ec3nV7sGPojQwOt3LjZ3JRjA5cEaEjM4iliuASsxF9exdcdVmVZibO58J8R2Lp1Fz@Y7R@2KS4mbzJeJiMnCZdGm9aFuyYnq9KuGjqu/dSMBZH6rVackEfzoM9Aa...
(more)
2 months ago
Edit Post #282334 Post edited:
2 months ago
Comment Post #282238 @#8176 I love the creativity you got there for a C program, and how it really references the company well. Yeah, Somewhere Else is a bit crappy. I don't know if I actually will continue this series anymore. Copy-pasting? Yeah, sure, maybe I'll stop with that. If this series WILL continue (which I'm s...
(more)
2 months ago
Edit Post #283337 Post edited:
2 months ago
Edit Post #282238 Post edited:
2 months ago
Edit Post #280829 Post edited:
2 months ago
Edit Post #283231 Post edited:
2 months ago
Edit Post #283337 Post edited:
2 months ago
Edit Post #279233 Post edited:
2 months ago
Edit Post #282280 Post edited:
2 months ago
Edit Post #279601 Post edited:
2 months ago
Edit Post #279199 Post edited:
2 months ago
Edit Post #280740 Post edited:
2 months ago
Edit Post #280761 Post edited:
2 months ago
Edit Post #279852 Post edited:
2 months ago
Edit Post #280092 Post edited:
2 months ago
Edit Post #279778 Post edited:
2 months ago
Comment Post #283341 @#53837 Don't worry. It's only THIS challenge (hopefully) of mine that'll ban specific built-ins. The only reason it was excluded to be used was to make the challenge harder. Getting those perfect squares with those 2 helpful operations is kinda boring, so I "flavored" it.
(more)
2 months ago
Edit Post #283342 Post edited:
2 months ago
Comment Post #283341 @#53837 I don't know how to make one at all. Might learn from Lyxal, but meh.
(more)
2 months ago
Edit Post #282497 Post edited:
2 months ago
Edit Post #282511 Post edited:
2 months ago
Edit Post #281599 Post edited:
2 months ago
Edit Post #283347 Post edited:
2 months ago
Edit Post #283347 Initial revision 2 months ago
Answer A: Getting perfect squares, differently
[Python 3], 34 bytes x=0;y=1 while 1:x+=y;print(x);y+=2 Try it online! `1` is the `int` equivalent to `True`, which helps save bytes.
(more)
2 months ago
Edit Post #283342 Post edited:
2 months ago
Edit Post #283342 Post edited:
2 months ago
Edit Post #283128 Post edited:
2 months ago
Suggested Edit Post #279790 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #279778 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #279820 Suggested edit:

(more)
declined 2 months ago
Suggested Edit Post #280092 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #279852 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #279322 Suggested edit:

(more)
declined 2 months ago
Suggested Edit Post #280858 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #280829 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #281457 Suggested edit:

(more)
declined 2 months ago
Suggested Edit Post #280761 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #281599 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #280740 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #279199 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #279601 Suggested edit:

(more)
helpful 2 months ago
Edit Post #280828 Post edited:
2 months ago
Edit Post #280882 Post edited:
2 months ago
Suggested Edit Post #282280 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #280882 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #282511 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #282497 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #280828 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #279414 Suggested edit:

(more)
declined 2 months ago
Suggested Edit Post #279233 Suggested edit:

(more)
helpful 2 months ago
Suggested Edit Post #283128 Suggested edit:

(more)
helpful 2 months ago
Edit Post #283341 Post edited:
2 months ago
Edit Post #283341 Post edited:
2 months ago
Comment Post #283341 @#53584 All outputs starting from `0` until it stops outputting.
(more)
2 months ago
Edit Post #283342 Initial revision 2 months ago
Answer A: Getting perfect squares, differently
[C (clang)], 47 45 43 bytes i,j;main(){for(;printf("%i ",i-=j);j+=2);} Try it online! Golfed 2 bytes from inspiration of @Shaggy's answer. Golfed 2 bytes by @m90.
(more)
2 months ago
Edit Post #283341 Post edited:
2 months ago
Edit Post #283341 Initial revision 2 months ago
Question Getting perfect squares, differently
Create a program that gets all perfect squares starting from `0` or `1` without using any methods of multiplication (repetitive addition) and exponentiation (repetitive multiplication). Output them for validation. Things such as built-ins/functions related to these unusable methods can't be used e...
(more)
2 months ago
Edit Post #283231 Post edited:
2 months ago
Edit Post #283231 Post edited:
2 months ago
Edit Post #283337 Post edited:
2 months ago
Edit Post #283231 Post edited:
2 months ago
Edit Post #283337 Post edited:
2 months ago
Comment Post #283337 @#53579 `()` has no numbers, returning `0`. `+/(+-)` is `1 / 1(1-1)` which means it's a divisibility by zero error. Thanks for that one. `(+-)/(+-)` is `0/0`, which in my form of understanding math, should be undefined, but for this challenge, let it return `0`.
(more)
2 months ago
Edit Post #282881 Post edited:
2 months ago
Edit Post #282804 Post edited:
2 months ago
Edit Post #282650 Post edited:
2 months ago
Edit Post #282239 Post edited:
2 months ago
Edit Post #283337 Initial revision 2 months ago
Question A chunk of symbols is a calculation
Challenge Create a program that takes input of a string and outputs an integer using the following calculation system: - The string can only contain `+`, `-`, ``, `/`, `^`, `!` (or a different character; `!` is used here for demonstration), `(`, and `)`. - In this system, a character shows the...
(more)
2 months ago
Edit Post #283231 Post edited:
2 months ago
Comment Post #283231 @#53196 Yep. It also makes some cool calculations since GEMDAS is applied to it, meaning having a second character to present `+n` is a good idea to start with.
(more)
2 months ago
Edit Post #283288 Post edited:
2 months ago
Comment Post #283175 @#53837 Nevermind, I figured it out. It's in my answer already.
(more)
2 months ago
Edit Post #282290 Post edited:
2 months ago
Edit Post #279253 Post edited:
2 months ago
Edit Post #283288 Post edited:
2 months ago
Edit Post #283294 Initial revision 2 months ago
Answer A: Add detailed wikis and usage info on these tags
graphical-output - Usage info: Graphical output challenges involve outputting images or illustrations using graphics. - Detailed wiki: (uses text from CGCC's) > Graphical output challenges involve images as output or drawing graphics on a screen. For pure ASCII art contests, use ascii-art instea...
(more)
2 months ago
Suggested Edit Post #279253 Suggested edit:

(more)
helpful 2 months ago
Edit Post #282290 Post edited:
2 months ago
Edit Post #283288 Post edited:
2 months ago
Edit Post #283288 Post edited:
2 months ago
Edit Post #283288 Initial revision 2 months ago
Answer A: Reduce over the range [1..n]
[C (clang)], 59 bytes c;f(int a,(b)(int,int)){for(c=a;a>1;)c=b(--a,c);return c;} Try it online! This program written by @Hakerh400 in the comments is basically how the other answers before this post existed actually did it, by a reduction sort of method. I'd like to thank them for ma...
(more)
2 months ago
Edit Post #283285 Initial revision 2 months ago
Article Code bowling "Code bowling"
In this code-bowling challenge, make an absurdly long program that prints out "Code bowling". - Obfuscate it as much as you could. - Comments and custom functions aren't allowed to make the program longer. - If any character in the code is missing, it won't run or it sends an error. - The progr...
(more)
2 months ago
Comment Post #283175 I have no idea how you got those XOR values. It's kinda confusing what values are going in.
(more)
2 months ago
Comment Post #283231 @#53196 Yes, you can use whatever character to replace `!`, but that also means you can't use `!` anymore if you used a different character. Meaning `aaaa+++` is a valid input, which returns `7`, whilst `aaaa!!!+++` isn't. It'd be written `aaaa+++aaa` or `++++aaa+++` instead, which returns `10`.
(more)
2 months ago
Edit Post #283264 Initial revision 3 months ago
Question Add detailed wikis and usage info on these tags
In this request (not really a feature-request but still tagged so anyway), I'd like to have detailed wikis on tags and maybe usage information on them too. Currently, these tags have usage info in them: - code-bowling - code-golf - cops-and-robbers - fastest-code - king-of-the-hill I'd lik...
(more)
3 months ago
Edit Post #283231 Post edited:
3 months ago
Edit Post #283231 Post edited:
3 months ago
Comment Post #283231 @#53196 Yes. It can be used for addition too, now that I have edited it.
(more)
3 months ago
Edit Post #283231 Post edited:
3 months ago
Comment Post #283231 @#53196 I remember Kevin M. Mansour doing the same thing for "Caesar shift cipher", where they used a function to solve the challenge, so sure, that works too.
(more)
3 months ago
Comment Post #283231 @#53588 Since we're focusing on integers, it's most likely integer division we'll be using.
(more)
3 months ago
Comment Post #283231 @#53837 No, actually. It's basically the implementation of the operation from the preceding number. For example, `//` is basically `x / 2`. And I mentioned you CAN'T use symbols other than `+`, `-`, `!` and `(` at the very beginning of the input because it will return something to show it's invalid.
(more)
3 months ago
Edit Post #283231 Post edited:
3 months ago
Edit Post #283231 Initial revision 3 months ago
Article A chunk of symbols is a calculation [released]
Challenge Create a program that takes input of a string and outputs an integer using the following calculation system: - The string can only contain `+`, `-`, ``, `/`, `^`, `!` (or a different character; `!` is used here for demonstration), `(`, and `)`. - In this system, a character shows the...
(more)
3 months ago
Edit Post #283211 Initial revision 3 months ago
Answer A: Tips for golfing using C
Abuse (as few) libraries (as possible) We don't want to use too much libraries when playing challenges. Sometimes, libraries aren't used at all in some answers in C. What if we want to shorten some code? Functions do the trick, specifically built-ins. It's specified you don't have to apply the ...
(more)
3 months ago
Comment Post #283175 @#53837 Simple, use `<a class="badge is-tag">something</a>`. This will give <a class="badge is-tag">something</a>.
(more)
3 months ago
Edit Post #283180 Post edited:
3 months ago
Suggested Edit Post #283180 Suggested edit:

(more)
helpful 3 months ago
Edit Post #283151 Post edited:
3 months ago
Comment Post #283175 I don't know what the <a class="badge is-tag">blackbox-function</a> is supposed to be, but yeah, this may seem like a cool repetitive calculation challenge.
(more)
3 months ago
Suggested Edit Post #283176 Suggested edit:

(more)
declined 3 months ago
Comment Post #283176 However, I'm thinking not just having <a class="badge is-tag">code-golf</a> + <a class="badge is-tag">tips</a>, but also burninate the <a class="badge is-tag">code-golf-tips</a> tag as well, to give more room to store tags. In other words, for some reason, the tag list has a max scroll so you won't b...
(more)
3 months ago
Edit Post #283163 Initial revision 3 months ago
Answer A: "Hello, World!"
[Java (JDK)], 80 bytes class A{public static void main(String[] A){System.out.print("Hello, World!");}} Try it online! This answer, except it's actually runnable.
(more)
3 months ago
Comment Post #283141 @#53588 As long as you separate each verse, then trailing newlines can be viable.
(more)
3 months ago
Edit Post #283141 Post edited:
3 months ago
Edit Post #283151 Initial revision 3 months ago
Article Cops and Robbers: Luhn algorithm [cancelled]
This is now a cancelled sandbox post. This challenge won't be posted on the main for reasons, but thanks for coming to check this out. Introduction The Luhn algorithm is used to verify card numbers. The algorithm in a summary acts like this: ```lang-none Reverse the digits, make an array: ...
(more)
3 months ago
Edit Post #283141 Post edited:
3 months ago
Comment Post #283141 @#53196 I'm certain you can use snippets. I can't really make up what you're trying to make though, so do what suits ya.
(more)
3 months ago
Edit Post #283141 Post edited:
3 months ago
Edit Post #283141 Initial revision 3 months ago
Question 99 Shortened Bottles of Beer
Disclaimer This challenge also exists in CGCC, but if you want to compete here (too), then hop in! Challenge Recreate "99 Bottles of Beer on the Wall", using the least bytes possible. Lyrics: ```lang-none 99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it a...
(more)
3 months ago
Edit Post #283129 Post edited:
3 months ago
Comment Post #283134 And I love it. Vyxal is cool! :)
(more)
3 months ago
Edit Post #283129 Post edited:
3 months ago
Edit Post #283129 Post edited:
3 months ago
Edit Post #283129 Post edited:
3 months ago
Edit Post #283129 Post edited:
3 months ago
Edit Post #283129 Post edited:
3 months ago
Comment Post #283129 @#53588 So no `int` changing? Okay, let's see...
(more)
3 months ago
Edit Post #283129 Post edited:
3 months ago
Comment Post #283129 @#53588 Okay, I'll see what I can do but I won't delete this answer.
(more)
3 months ago
Edit Post #283129 Post edited:
3 months ago
Edit Post #283129 Post edited:
3 months ago
Edit Post #283129 Post edited:
3 months ago
Edit Post #283129 Post edited:
3 months ago
Edit Post #283126 Post edited:
3 months ago
Comment Post #283126 @#53588 Congrats.
(more)
3 months ago
Edit Post #283129 Initial revision 3 months ago
Answer A: It's Hip to be Square
[C (clang)], 189 181 176 173 bytes i,n,x,y;main(){scanf("%i",&x);y=1,n=10001;int z[n];for(i=0;i226 218 213 210.
(more)
3 months ago
Edit Post #283126 Initial revision 3 months ago
Answer A: Guess the language! (Cops' Thread)
[PicoLisp], cracked by Shaggy, 31 bytes (prinl "Cops and Robbers")(bye) Try it online! Strange language, I know.
(more)
3 months ago
Edit Post #282881 Post edited:
3 months ago
Edit Post #282881 Post edited:
3 months ago
Edit Post #282881 Post edited:
3 months ago
Edit Post #282881 Post edited:
3 months ago
Edit Post #283089 Post edited:
3 months ago
Edit Post #283090 Post edited:
3 months ago
Edit Post #283090 Post edited:
3 months ago
Edit Post #283090 Initial revision 3 months ago
Answer A: Guess the language! (Cops' Thread)
[F# (.NET Core)], cracked by Shaggy, 25 bytes printfn"Cops and Robbers" Try it online!
(more)
3 months ago
Edit Post #283089 Initial revision 3 months ago
Answer A: Guess the language! (Cops' Thread)
[Rust], cracked by Shaggy, 37 bytes fn main(){print!("Cops and Robbers")} Try it online! Hold on, lemme translate it for fun: `For now, my print not say "Cons and Rubbers".` Ahem, sorry, don't take it seriously.
(more)
3 months ago
Edit Post #282997 Post edited:
3 months ago
Comment Post #283035 @#53837 Uh, you're the one who cracked it?
(more)
3 months ago
Comment Post #282798 @#53837 I re-included it if someone wants to look around. Maybe here, maybe there, at least somewhere, but a spot here might help.
(more)
3 months ago
Edit Post #283044 Initial revision 3 months ago
Question Getting started with making (and/or solving) KOTH challenges
I have seen KOTH (King of the Hill) challenges before but it's still unclear to me how to properly make, or even play, such challenge. To get started, how do I make (or solve) KOTHs? An answer could have a simplified introduction/explanation to the game, and examples of challenges that applies the...
(more)
3 months ago
Comment Post #283035 Ya beat me to it, lad. I ain't British but still.
(more)
3 months ago
Edit Post #282997 Post edited:
3 months ago
Edit Post #282999 Post edited:
3 months ago
Edit Post #282999 Initial revision 3 months ago
Answer A: Guess the language! (Cops' Thread)
[D], cracked by Kevin M. Mansour, 39 bytes void main(){write("Cops and Robbers");} Try it online! This doesn't look like C. Not even BMPL. Now we know why.
(more)
3 months ago
Edit Post #282997 Initial revision 3 months ago
Answer A: Guess the language! (Cops' Thread)
[Forth (gforth)], cracked by user, 20 bytes .( Cops and Robbers) Try it online!
(more)
3 months ago
Edit Post #282996 Initial revision 3 months ago
Answer A: "Hello, World!"
[C# (.NET Core)], 67 bytes class a{static void Main(){System.Console.Write("Hello, World!");}} Try it online!
(more)
3 months ago
Edit Post #282979 Post edited:
3 months ago
Comment Post #282979 @#53503 Yep, it's Pyth, but sure, I'll edit it.
(more)
3 months ago
Comment Post #282970 @#54151 Maybe, that's what everyone's been doing.
(more)
3 months ago
Edit Post #282990 Initial revision 3 months ago
Answer A: What's a code bowling challenge?
What's a code bowling challenge? Code bowling is a challenge/competition to solve a particular (usually simple) problem in the most bytes or complexity. From CGCC Are there any additional criteria that can be added in a code bowling challenge? Code golfing is the exact opposite of code bowli...
(more)
3 months ago
Edit Post #282988 Initial revision 3 months ago
Question What's a code bowling challenge?
There's another type of challenge named code bowling, and I've never heard of it, or even if I did, still don't know how it works. I'm willing to write challenges on code bowling and I want to know how the challenge works. In a summary, what's a code bowling challenge and what's the criteria?
(more)
3 months ago
Edit Post #282987 Initial revision 3 months ago
Answer A: "Hello, World!"
[Chef], 558 485 bytes H. Ingredients. 72 l H 101 l e 108 l l 111 l o 44 l comma 32 l space 87 l w 114 l r 100 l d 33 l bang Method. Put bang into mixing bowl.Put d into mixing bowl.Put l into mixing bowl.Put r into mi...
(more)
3 months ago
Comment Post #282970 @#53588 Can you fix that comment, please? The link is supposed to be encased in parentheses, and the text is encased by brackets. :)
(more)
3 months ago
Comment Post #282979 @#53588 Never knew that Japt had this, because I don't know Japt at all. Sorry, but that isn't the language I used here.
(more)
3 months ago
Edit Post #282980 Initial revision 3 months ago
Answer A: "Hello, World!"
[Forget], 319 bytes push 72;cleanse;pop;out;push 101;cleanse;pop;out;push 108;cleanse;pop;out;push 108;cleanse;pop;out;push 111;cleanse;pop;out;push 44;cleanse;pop;out;push 32;cleanse;pop;out;push 87;cleanse;pop;out;push 111;cleanse;pop;out;push 114;cleanse;pop;out;push 108;cleanse;pop;out;pus...
(more)
3 months ago
Edit Post #282979 Initial revision 3 months ago
Answer A: Guess the language! (Cops' Thread)
[Japt], cracked by Shaggy, 17 bytes "Cops and Robbers Try it online! Don't think much recognize this language at all. This is supposed to be from Pyth, but Japt has this too, so it's certainly valid.
(more)
3 months ago
Edit Post #282902 Post edited:
3 months ago
Edit Post #282952 Post edited:
3 months ago
Edit Post #282952 Initial revision 3 months ago
Answer A: Tips for golfing using C
Assign `int`s before `main(){}` This is a combination of 2 golfing tricks. It's possible to write a program as just `main(){}`, though it will send a warning, not an error though, so it's still safe to run. A cool trick with using this is assigning values meant to be `int`s which you can assign...
(more)
3 months ago
Edit Post #282951 Initial revision 3 months ago
Question Tips for golfing using C
C is a language I use most apart from Python and as someone who likes code golf challenges, what tips are there to golf in C?
(more)
3 months ago
Comment Post #282903 I think you forgot to mention about changing the number too if you want to use a different ROT$n$.
(more)
3 months ago
Comment Post #282903 [191 bytes](https://tio.run/##PY67DoJAEAB/Bal2Iw/BxCiKhtjY22ksLseBmPOWrAcSid@OFko9M8ncRCsekqva@u1yGIrGSFuRcTogj7FnZRs2DgWsai2kgvAs/Ffmny5h6f1loFE8Wq5MGRRM9/1V8J5yBUCb1D25u9UsieIYtylQSoH84czCDKeMO0rIjxf4xjeMF02dC6sAe0nmQVoFmkrowD0orclznsQ6n7heNMdvB7gehg8)
(more)
3 months ago
Comment Post #282903 I'd suggest closing "V8" with parentheses like what was given to you when you copied that stuff from TIO. Also, forgot to mention, you still need to find the input function for this to be completely valid, or show others how it works so they'd know how to replace the text.
(more)
3 months ago
Edit Post #282902 Post edited:
3 months ago
Edit Post #282902 Initial revision 3 months ago
Answer A: Caesar shift cipher
[C (clang)], 161 bytes i,j,k;main(){char s;scanf("%i%[^\n]%c",&i,s);for(j=0;j<strlen(s);j++){if(isalpha(s[j])){for(k=0;k<i;k++){if(s[j]==90||s[j]==122){s[j]-=26;}s[j]+=1;}}}puts(s);} Try it online!
(more)
3 months ago
Edit Post #282901 Initial revision 3 months ago
Question Caesar shift cipher
Introduction What is the Caesar shift cipher (ROT$n$)? It's basically a cipher sequence that changes a letter's value from the number chosen. If we use ROT1 on "games", we get "hbnft". The basic interpretation of the cipher is iterating the value of a letter by 1 $n$ times. If you still don't unde...
(more)
3 months ago
Edit Post #282804 Post edited:
3 months ago
Comment Post #282881 @#53503 Oh. Can we have one here though?
(more)
3 months ago
Edit Post #282804 Post edited:
3 months ago
Edit Post #282881 Initial revision 3 months ago
Article 99 Shortened Bottles of Beer [released]
Disclaimer This challenge also exists in CGCC, but if you want to compete here (too), then hop in! Challenge Recreate "99 Bottles of Beer on the Wall", using the least bytes possible. Lyrics: ```lang-none 99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it a...
(more)
3 months ago
Edit Post #282238 Post edited:
3 months ago
Edit Post #282238 Post edited:
3 months ago
Edit Post #282879 Initial revision 3 months ago
Answer A: "Hello, World!"
[!@#$%^&()+], 17 bytes ^dlroW ,olleH(@) Try it online! Might learn this sometime but I found this.
(more)
3 months ago
Edit Post #282878 Initial revision 3 months ago
Answer A: "Hello, World!"
[Pyth], 14 bytes "Hello, World! Try it online!
(more)
3 months ago
Comment Post #282874 I'd suggest adding the exclamation point and comma, as included in the question.
(more)
3 months ago
Edit Post #282876 Initial revision 3 months ago
Answer A: "Hello, World!"
[Charcoal], 13 bytes Hello, World! Try it online! I'm surprised no one even used Charcoal in the challenge. Guess I'll take it.
(more)
3 months ago
Edit Post #282805 Initial revision 3 months ago
Answer A: "Hello, World!"
[Lua], 20 bytes print"Hello, World!" Try it online!
(more)
3 months ago
Edit Post #282804 Initial revision 3 months ago
Article Caesar shift cipher [released]
Introduction What is ROT13? It's basically a cipher sequence that changes a letter's value from the number chosen. If we use ROT1 on "games", we get "hbnft". The basic interpretation of ROT13 is iterating the value of a letter by 1 $n$ times. If you still don't understand, try using the ROT13 webs...
(more)
3 months ago
Comment Post #282802 I won't make an answer for this because it doesn't seem proper to be one. I might say that library imports can be split into 2 different scores on a single answer. One where the import is missing and the other includes it, including the macro or function added (considering you're talking about **my**...
(more)
3 months ago
Edit Post #282798 Initial revision 3 months ago
Answer A: Default Rules: Loopholes
Sneakily using macros In a code golf challenge, you are tasked to use as small bytes as possible. However, it's considered unacceptable in a language like C to use macros to hide code or shorten it without including the macro itself. An example: > # [C (clang)], 5 bytes > > > > hell...
(more)
3 months ago
Edit Post #282650 Initial revision 4 months ago
Article Set in sets in sets [cancelled]
Make a program that outputs either parentheses, brackets, or braces to represent sets, and the premise is a positive integer input. Output sets in sets, and the higher the number, the more sets encased in each other. - `1` outputs `{}`. - `2` outputs `{{}}`. - `5` outputs `{{{{{}}}}}` - `16` ou...
(more)
4 months ago
Edit Post #282534 Post edited:
4 months ago
Edit Post #282534 Post edited:
4 months ago
Edit Post #282534 Initial revision 4 months ago
Answer A: A number adder, not a death adder
[Python 3], 58 39 bytes P1: print(f"print(int(input())+{input()})") Try it online! P2 (given I inputted `10`, 30 22 bytes): print(int(input())+10) Try it online!
(more)
4 months ago
Comment Post #282511 Props to them then, I guess. That's a cool way of making such answer. I also wanna do the same as @#53310.
(more)
4 months ago
Comment Post #282477 @#8176 I don't see the problem with it being in `.h`, but okay. Which problems should I address though, since that would help when I post the question?
(more)
4 months ago
Comment Post #282477 @#53922 It was originally a link to download the `.zip` file. I fixed it for you.
(more)
4 months ago
Comment Post #282491 So you're saying I should add the function's bytes as well, or the entire library? Like I said, it's not for golfing, so it's pretty much allowed.
(more)
4 months ago
Edit Post #282477 Post edited:
4 months ago
Edit Post #282477 Post edited:
4 months ago
Edit Post #282477 Post edited:
4 months ago
Edit Post #282477 Initial revision 4 months ago
Question Is my extension-like library allowed to be used in answers?
I'm not a golfer, I know, but I do have wanted to make a programming language back then. The name is BMPL (Builder's Multi-Purpose Language) and is currently a library I made in C (clang). It's not essentially for golfing or even an esoteric language, but a simple to understand and basic syntax langu...
(more)
4 months ago
Question Recreate the Server Fault logo
Make the Server Fault logo using the following criteria: ![Server Fault Logo][2] The boxes' measurements: - There are 3 columns of 5 boxes, with long ones at the left where the rest are regular. - The following measurements of each row's height: Rows - The following measurements of each co...
(more)
4 months ago
Answer A: Evens or Odds - you know this one
[Python 3], 51 25 bytes n=int(input());print(n%2) Try it online! Golfed 26 bytes using the technique from my PHP answer.
(more)
4 months ago
Comment Post #282239 @#8062 for these challenges, simply set the portions where the whitespace of the left and top of the image is removed, then we can start adding the dimensions of each image. each user can create the images with whitespace or not, as long as it looks similar to the picture. the total size of the image...
(more)
4 months ago
Comment Post #282334 @#53514 so this challenge will be abandoned.
(more)
4 months ago
Comment Post #282334 @#53310 I don't know what trivial means here, but I won't post this challenge until it's favorable enough.
(more)
4 months ago
Comment Post #282334 @#53514 in Python, it seems to work this way: [Try it online!](https://tio.run/##K6gsycjPM/7/P9NW19A6y1bXyLqgKDOvRCNTNUvz/38A "Python 3 – Try It Online")
(more)
4 months ago
Article Recreate modulo [cancelled]
Recreate the modulo operation via function or program. Mechanics: - The modulo operator involves division and returns the remainder. - For a function, use 2 variables as `foo(a,b)` such that $x \mod y$. - For a program, take 2 variables as input where `a b` is $x \mod y$. - Use standard divisi...
(more)
4 months ago
Question Tips for [fastest-code] in Python
What tips are there in fastest code, or what I like to call code speeding, challenges in Python?
(more)
4 months ago
Comment Post #282239 @manassehkatz say we have https://cdn.sstatic.net/Sites/serverfault/Img/apple-touch-icon.png for this challenge, then https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png for the Stack Overflow challenge. there's the format, the portion between Sites and apple-touch-icon.png changes f...
(more)
4 months ago
Answer A: Are they abundant, deficient or perfect?
[Python 3], 235 185 141 118 bytes a=[[],[],[]] n=1;exec("d=sum(i for i in range(1,n)if n%i0]]+=n,;n+=1;"int(input())) print(a) Try it online! Golfed 50 bytes by @caird coinheringaahing. Golfed 44 bytes by @bastolki. Golfed another 23 bytes by @bastolki.
(more)
4 months ago
Comment Post #282239 I only found these logos because of the source code of each site, and I found these icons which I decided to use. this is what I prefer and is also used in my Stack Overflow challenge, like I already said. it came from the format https://cdn.sstatic.net/Sites/<sitename>/Img/apple-touch-icon.png, so l...
(more)
4 months ago
Comment Post #282239 @manassehkatz okay, nevermind! I might not end up posting this after all.
(more)
4 months ago
Comment Post #282239 @manassehkatz here's what I mean. now simply right-click the logo and go to the link so you know what I mean. this is also used on the Stack Overflow challenge.
(more)
4 months ago
Comment Post #282244 I might be taking the output literally, but is it okay/required to add the bracket at the beginning and end of the output?
(more)
4 months ago
Comment Post #279743 can I use HTML for this challenge? or is hardcoding the values in different tags a loophole?
(more)
4 months ago
Edit Post #282239 Post edited:
4 months ago
Suggested Edit Post #282254 Suggested edit:

(more)
helpful 4 months ago
Suggested Edit Post #282239 Suggested edit:

(more)
helpful 4 months ago
Comment Post #282236 @MonicaCellio I'm sure it will be very hard. heck, I'd do all logos from Codidact if I want like what I'm doing in Stack Exchange.
(more)
4 months ago
Answer A: "Hello, World!"
HTML, 26 13 bytes ``` Hello, World! ``` Golfed 13 bytes thanks to @Razetime's advice.
(more)
4 months ago
Article Recreate the Server Fault logo [released]
Make the Server Fault logo using the following criteria: Server Fault Logo >The source for the logos in challenges I post are the apple-touch-icons. Therefore, don't blame me. This note will be removed once posted in the main section, but keep this in mind. Also, once this is posted in the main...
(more)
4 months ago
Question Recreate the Stack Overflow logo
>Originally from Somewhere Else. I thought I'd continue making more drawing challenges here now that I discovered it. Make the Stack Overflow logo using the following criteria: ![Stack Overflow logo][2] The tray: - Make a gray tray shaped like a bracket facing upwards using the following RG...
(more)
4 months ago
Comment Post #282237 thanks. I hope all of you enjoy my stay. [here it is.](https://codegolf.codidact.com/posts/282238)
(more)
4 months ago
Question Can I post this challenge to Codidact?
I have this challenge in Code Golf and I wonder if I can repost it here for more users to come, and also continue making these since I actually like them. Can I post this challenge to Codidact?
(more)
4 months ago