New answers tagged

0

C# .NET 135 bytes public class P{public static void Main(string[]a){System.Console.Write(a[0]!=""&&a[0].Split('a').Length-1==a[0].Split('b').Length-1);}} Try online


0

brainfuck and bfasm, 995 and 119 bytes Quite easy to outgolf. Generated using following assembly code: mov r4,.a lbl 1 in_ r1 jz_ r1,3 eq_ r1,r4 jnz r1,2 inc r3 dec r2 lbl 2 inc r2 jmp 1 lbl 3 eq_ r2,r3 out r2 And then optimized by hand. +>+[<[>>+>+<<<-]>>[<<+>>-]>[[-]>>>>--[----->+<]>----...


2

Python 2, 252 236 bytes def g(n,s): if str(s)==s:return s.replace("'","+1") o,l,r=map(g,[n]*3,s);return['all((%s)for %s in range(%d))'%(r,l,n),'not((%s)*(%s))'%(l,r),'(%s)%%%d==(%s)%%%d'%(l,n,r,n),'(%s)%s(%s)'%(l,o,r)]['fn=+'.find(o)] print eval(g(*input())) Try it online! Takes input as the nested prefix-syntax, with f instead of forall and n instead ...


2

Stax, 111 bytes ¼ΘUßU'ïMo^ø¬├▓> I¬i⌠·╥.↕¥½ßqS,=frT`d_`&&↓⌠ÉûÆiü=┌-< │∟Φ☼⌐¢3²Bu╜lJ╛§≥╪║ε┐╓ù♫╨Z░╖!¥É:╬Çß═╤às8Q←φ,ºï◘≥Ä£}èΦ╡FÉçø¶É Run and debug it


2

PHP, 301 288 bytes for($b=unpack('A8f/A3e/Cl/n/Nc/N/Nm/n/Ns',$argn);$i<8;$f.=1<<$i++&$b[l]?[RO,H,S,VL,SD,A][$i-1]:'');echo trim($b[f].'.'.$b[e],' .')," $f ",($e=function($a){echo date('H:i:s Y/m/d ',mktime($a>>27&31,$a>>21&63,$a>>15&62,$a>>5&15,$a&31,1980+($a>>9&127)));})($b[c]),$e($b[m]),$b[...


0

05AB1E, 21 bytes ε'/¡}ζʒ'+å≠}˜'#¡н2ôøË Input as a list in the order [criteria, topic]. Try it online or verify all test cases. Explanation: ε # Map both strings in the implicit input-list to: '/¡ '# Split the string on "/" # i.e. ["+/+/A/B/#","z/y/A/B/x/w/v/u"] # →...


Top 50 recent answers are included