Search
Ruby, 77 bytes ->x{(2..16).max_by{x.to_s(_1).chars.sum{|y|"".bytes[y.hex]}}} Attempt This Online!
Given a radius R, output a text representation of a circle. Input A positive integer R (strictly greater than zero) You do not need to handle values of R greater than 32 Output A square ...
If you're not required to use the standard cpython implementation of python, you can usually get a significant speed increase by running your code with PyPy.
Since the examples I've given in the question are deliberately brief, they don't demonstrate the benefit of hiding a large block of text. I'm giving an example in this answer of one of my own chall...
JavaScript, 52 51 28 bytes s=>Buffer(s).map(x=>x|32)+`` Try it online! -1 byte thanks to trichoplax.
Factor, 30 29 bytes [ readln "Hello, %s!"printf ] Try it online! Uses io and formatting.
Python, 89 bytes lambda l,g=lambda c:ord(c).bit_count():[i for i in l if min(map(g,l))<g(i)<max(map(g,l))] Attempt This Online!
JavaScript, 104 102 99 bytes I/O as a character array. a=>a.filter(x=>a<g(x)&g(x)<a[~-a.length],a=a.map(g=x=>[...Buffer(x)[0].toString(2)].sort()).sort()) Try it online!
Python 3, 183 181 175 bytes def f(a,b): c=a;a=str(a) for i in range(b): y=0;z=9 for j in range(len(a)): if y<int(a[j]):y=int(a[j]) if z>int(a[j]):z=int(a[j]) c=int(a)+...
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 bin...
PHP, 55 27 21 bytes Hello, <?=$argv[1]?>! Try it online! Golfed 28 bytes thanks to my Software CD post. Golfed 6 bytes thanks to @Shaggy's advice.
PHP, 114 bytes <?php for($i=1;$i<101;$i++){if($i%3!=0&$i%5!=0){echo$i;}if($i%3==0){echo"Fizz";}if($i%5==0){echo"Buzz";}echo"\n";} Try it online! As someone who doesn't code much in...
PHP, 36 bytes <?php $x=(int)fgets(STDIN);echo$x%2; Try it online! Outputs 1 if odd and 0 if even.