Skip to main content

New answers tagged

1 vote

Output the HTML colors

Ruby, 75 bytes Builds a list of possible colors using a Cartesian product and filters down to the correct ones with regex. ...
Value Ink's user avatar
  • 13.6k
0 votes

Output the HTML colors

Tcl, 123 bytes lmap c {0 80 FF 8000 8080 FF00 FFFF 800000 800080 808000 808080 C0C0C0 FF0000 FF00FF FFFF00 FFFFFF} {puts [format %06s $c]} Attempt This Online!
sergiol's user avatar
  • 4,155
0 votes

Lithp Tranthlator

Tcl, 36 bytes proc T t {string map {s th S Th} $t} Try it online!
sergiol's user avatar
  • 4,155
1 vote

Number of string permutations that are palindromes

Japt, 7 bytes á â èêS Try it ...
Shaggy's user avatar
  • 45k
0 votes

Number of string permutations that are palindromes

Vyxal 3, 5 bytes ⑴/⇄⧖∑ Vyxal It Online! ...
Themoonisacheese's user avatar
-2 votes

"Hello, World!"

HalfText, 11.375 bytes This is one of small group of answers which has the code smaller than 13 bytes (length of Hello, World! with no quotations). HalfText codes ...
QOO-OOKALAN's user avatar
0 votes

Output the text "Code Bowling"

Brainfuck, -137 score ...
QOO-OOKALAN's user avatar
2 votes

Find the largest contiguous prime in a string

Nekomata, 4 bytes qĜQÅ Attempt This Online! Explanation ...
hakr14's user avatar
  • 5,522
0 votes

1, 2, Fizz, 4, Buzz

TeX, 312 bytes ...
QOO-OOKALAN's user avatar
0 votes

1, 2, Fizz, 4, Buzz

Pascal, 164 bytes ...
QOO-OOKALAN's user avatar
0 votes

1, 2, Fizz, 4, Buzz

Groovy, 60 bytes 1.upto(100){i->println"${i%3?'':'Fizz'}${i%5?'':'Buzz'}"?:i}
QOO-OOKALAN's user avatar
0 votes

Find the largest contiguous prime in a string

APL(NARS), 64 chars {×≢⍵:⍕↑m/⍨m=⌈/m←⍎¨k←⍵⋄''}∘{∼×≢⍵:''⋄0π⍎⍵:,⊂⍵⋄×≢r←∇1↓⍵:r,∇¯1↓⍵⋄''} Input one string contain only digits output one string. If not find one ...
Rosario's user avatar
  • 1,712
0 votes

Find the largest contiguous prime in a string

Pascal, 326 B This complete program requires a processor supporting features of Extended Pascal as defined by ISO standard 10206. ...
Kai Burghardt's user avatar
0 votes

Convert exponents into ASCII art

Japt v2.0a0, 9 bytes ÕqRi^)¸z3 Try it ...
Shaggy's user avatar
  • 45k
0 votes

Convert exponents into ASCII art

Tcl, 156 bytes ...
sergiol's user avatar
  • 4,155
0 votes

Find the "unwrapped size" of a list

Tcl, 28 bytes proc C c {regexp -all \{ $c} Try it online!
sergiol's user avatar
  • 4,155
1 vote

`Vo we l spa ci ng`

Haskell, 126 bytes ...
Luke Sharkey's user avatar
0 votes

True color code

Fortran (GFortran), 35 bytes print'("#"Z6.6)',(i,i=0,8**8-1) end Try it online!
roblogic's user avatar
  • 4,629
2 votes

Convert prefix to infix

Jelly, 22 bytes Uṭ@Ṫ,ṪƊjj@Ø(ʋ@>”9$¡@¥/ Try it online! ...
Unrelated String's user avatar
0 votes

Trick or Treat polyglot

Brainfuck/JavaScript, 60 bytes console["log"]("treat")//-[---[>]>+<<+<--]>+.--.>>++.>-.<++.
QOO-OOKALAN's user avatar
0 votes

24 and 12 Hour Times

Japt -R, 28 27 bytes 24Æ=ÐTTTX)s8 ùC j6,4 v i5î¢ Try it online! ...
Shaggy's user avatar
  • 45k
0 votes

This isn't rocket science

AWK, 59 bytes {gsub(/./," |&|\n")}$0=" |\n /_\\\n"$0" |_|\n/___\\\n VvV" Attempt This Online! Different AWK approach.
xrs's user avatar
  • 2,047
1 vote

Internationalisation -> I18n (numeronym)

K (ngn/k), 16 bytes {($#2_x)/*x,'|x} Try it online! Function { } that zips ,' the argument <...
algorithmshark's user avatar
0 votes

Zipper multiplication

Perl 5, 120 + 3 (-pla option) = 123 bytes ...
Denis Ibaev's user avatar
  • 1,515
0 votes

Zipper multiplication

Zsh, 108 bytes a=${1/-};b=${(l:$#a::0:)2/-};for i ({1..$#a})Q+=${(l:2::0:)$((a[i]*b[i]))} c=`bc<<<$1*$2`;bc<<<${c//[0-9]}$Q Try it online! ...
roblogic's user avatar
  • 4,629
0 votes

Zipper multiplication

Ruby, 94 characters ->m,n{(m.abs.digits.zip(n.abs.digits).map{'%02d'.%_1.to_i*_2.to_i}.reverse*'').to_i*(m*n<=>0)} Sample run: ...
manatwork's user avatar
  • 20.9k
0 votes

Zipper multiplication

Pip, 18 bytes R$* *Z R*:gTDtFD:h Attempt This Online! Explanation List-of-digits base conversion makes this fairly straightforward. ...
DLosc's user avatar
  • 40.7k
0 votes

Zipper multiplication

AWK, 111 bytes x=$1*$2<0?-1:1{for(;$1!=0||$2!=0;$2=int($2/10)){t=(($1%10*($2%10))^2)^.5;z=(t>9?t:0 t)z;$1=int($1/10)}}1,$0=z*x Attempt This Online! A note ...
xrs's user avatar
  • 2,047
2 votes

Zipper multiplication

Haskell, 79 bytes import Data.Digits;r=reverse;d=r.digits 10;f a=unDigits 100.r.zipWith(*)(d a).d Try it online! We get lists of base ten digits using ...
Luke Sharkey's user avatar
1 vote

Zipper multiplication

Tcl, 254 bytes ...
sergiol's user avatar
  • 4,155
0 votes

#OctothorpeAsciiArt

Perl 5, 66 bytes $==<>;$.=$_,print+((map+(($_|$.)&1?v35:$")x$=,@_),$/)x$=for@_=0..4 Try it online!
Denis Ibaev's user avatar
  • 1,515
0 votes

Say What You See

Tcl, 150 bytes ...
sergiol's user avatar
  • 4,155
0 votes

There are known knowns

Tcl, 57 bytes puts "[set k known] $k\s $k un$k\s un$k $k\s un$k un$k\s" Try it online!
sergiol's user avatar
  • 4,155
0 votes

Counting Letters in a String

Tcl, 106 bytes proc C s {lmap c [split $s ""] {dict inc D [string tol $c]} dict ma k\ v $D {if {$k!=" "} {puts $k:\ $v}}} Try it online!
sergiol's user avatar
  • 4,155

Top 50 recent answers are included