Search
Ruby, 24 bytes gets=~/ /;puts$`,$'*2+$` Try this online!
Ruby, 70 67 66 bytes ->c{a=0;c.bytes{|b|a,=[b<106?a+b/3-34:b<112?p(a):a*a,0]-[-1,256]}} Test this online!
Ruby, 14 bytes ->{_1|[]in[_]} Alternative solution: ->a{!(a|a)[1]} Try this online! Couple of other solutions I developed: ->a{!a.uniq[1]} # 15 bytes ->{!(_1|[])[1]} # 15...
Ruby, 48 45 bytes ->w{([p].*w*''=~/$/).zip(*w.map(&:chars))*''} Try this online! It could be improved to 32 bytes, if every string is represented as an array of characters: ->w{([p]...
J, 2 bytes */ Try it online! For complex numbers with 0 as the second part, J will represent them as ints, but they are treated the same.
J, 4 bytes -:|. Try it online! Checks if the input array matches itself reversed. This is a tacit form and is executed monadically as x f (g x).
J, 15 bytes 'Hello, World!' Or if you prefer to beat around the bush...76 bytes. {:a.{~-:^:_1@:|.~&2 S:0<@:<\50 16.5 36 50.5 54 54 55.5 22 16 43.5 55.5 57 54 Try it online!
J, 11 9 bytes /@(>:@i.) Attempt it online!
J, 5 bytes -/ .* Try it online! For the determinant conjunction, the space before u is necessary, so there is no shaving a byte here. If you want to read more about this conjunction, check out...
Ruby, 19 bytes ->a,b{a|b==2?5:a+b} Try it online!
J, 7 9 bytes ++2&=@+.~ Try it online! Dyadic fork that executes with the form (x + y) + (2 = x +. y). Thanks to torres for pointing out the obvious flaw.
J, 10 7 bytes +/>:?#/ Try it online! +/>:?#/ #/ : Inserts dyadic # into an array n m Creates n copies of m ? : Roll from 0..y >: : Increment +/ : S...
J, 2 bytes |. Try it online!
Ruby, 57 bytes ->a,b,c{%w[+ - * / % **].select{c==a.send(_1,b)rescue p}} Attempt This Online!
J, 23 bytes >:@]^:(>1#.1%1+i.)^:_&1 Try it online! >:@]^:(...)^:_&1 Increments from 1 while >1#.1%1+i. the harmonic sum up to that is less than the input
J, 2 bytes #: Try it online! Antibase two
dc, 4 bytes 2o?p Try it online!
Embed ESCR, 16 characters [int n "base 2"] The INT function produces the text representation of an integer with lots of formatting options. The only non-default option needed was to set the numb...
J, 17 bytes {{*./y|~*:2+i.y}} Try it online! A direct definition closest to Razetime's infuriatingly good train solution. Outputs a non-zero number for true and 0 for false.
J, 3 bytes ,|. Try it online! This hook y f (g y) appends y with its reverse.
BQN, 107 bytes A↩C←A⇐¯π{_𝕣_:@;/⊏𝕩.y?𝕗‿∊𝕊⟨𝕤,⍷⟩𝕏𝕎𝔽𝕨𝔾𝕘}∞˙⌜˘¨´˝`(•Js⎉⊔⎊⌽⌾⍉⚇«∘»·∧○∨⍋⍒↑↓≍∾˜⥊⋈↕⊢⍟⊣¬!|≡≢/≥⟜≠=⊸≥⊐⊘⊒◶⊑><⌊⌈√⁼⋆+-×÷)⋄# BQN doesn't have keywords but primitive symbols are reserved. It's ...
MATL, 3 distinct, 3 total lH/ Try it online! Computes 1/2. Reserved labels for constants can be found here
MATL, 6 bytes YftuX= Try it online! Same method as Moshi. YftuX= Yf - factor with implicit input t - duplicate u - unique X= - isequal
Python 3, 28 bytes _="" while 1:_+="*";print(_) Try it online!