Search
C (gcc), 57 64 bytes x,s;main(){scanf("%d",&x);s=sqrt(x);printf("%d",s*s==x);} Try it online!
Scala, 242 bytes _=>99 to(1,-1)map{b=>s"${w(b)} on the wall, ${w(b)}. \n${if(b>1)"Take one down and pass it around"else "Go to the store and buy some more"}, ${w((b+97)%99+1)} on the w...
Haskell, 221 215 bytes f=a 99 (#)=(++) a n=d n#", "#c".\n"n#b(n-1) b 0="Go to the store and buy some more, "#d 99#"." b n="Take one down and pass it around, "#d n#".\n\n"#a n c m n=show n#"...
Cracks Shaggy's answer: Japt ((Cops)&(Robbers))`¬ps d bÞ`¸ËhDÎmEgviuø Test it
Cracks Lundin's answer: C++ (gcc) %: %: define cops(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) if(not false and k%:%:f%:%:d%:%:l(& (not true) <:%:i%:j%:k%:l" "%:m" "%:n%:o%:p%:q%:r%:s%:t:&...
Cracks Shaggy's answer, brainfuck, 245 bytes void main(x,y)->{ printf=io.write(z=x-y); printf("+++++[++++>---<]>.+[--->+<]>+++.+.+++.+[---->+<]>+++.[->+++<]&g...
C (gcc), 232 bytes f(n,w,p){printf("%i bottle%s of beer%s%s",n,"s"+(n<2)," on the wall"+w,p);}main(i){for(i=99;i;){f(i,0,", ");f(i,12,".\n");printf(i>1?"Take one down and pass it around, "...
C (gcc), 244 bytes main(){for(char*w=" bottles of beer on the wall",i=100;--i;)printf("%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 ar...
Japt -m, 5 bytes Takes input in reverse order. Sadly, Japt has no minimum built-in for strings. VcmUc Try it VcmUc :Implicit map of each U in the first input string V :Second inp...
JavaScript, 37 bytes I/O as character arrays. a=>b=>b.flatMap(x=>a.map(y=>x<y?x:y)) Try it online!
Scala, 90 89 88 bytes Saved 2 bytes thanks to Shaggy n=>1 to n map{x=>val s=if(x<2)"╔╦╗"else if(x<n)"╠╬╣"else"╚╩╝";s(0)+(""+s(1))*(n-3)+s(2)} Try it in Scastie! I feel like there'...
Python 3, 74 bytes lambda n:"╔"+"╦"*(n-3)+"╗\n"+("╠"+"╬"*(n-3)+"╣\n")*(n-2)+"╚"+"╩"*(n-3)+"╝" Try it online!
C (gcc), 119 118 116 115 bytes #define p(x,y,z) printf(i^1?i^c?#z:#y:#x) i,j;f(c){for(i=1;i<=c;p(╗\n,╝\n,╣\n),i++)for(j=p(╔,╚,╠);j++<c;)p(╦,╩,╬);} Try it online! Function solution. I...
Ruby, 33 bytes ->n{?#*n+(' #'+' '*(n-2)+?#)*~-n} Try it online! Basically the same as moshi's python (developed parallelly).
Vyxal D, 26 bytes 0Ȯ(n«ƛ√J«`›‹²…`ĿĖD₈=$0<∨[0 Try it Online! 0 # Push 0 Ȯ(n # Iterating over the input «ƛ√J«`›‹²…`Ŀ # Translit...
Vyxal C, 6 bytes ƛ\/*øṀ Try it Online! ƛ # 1...n map \/* # That many / øṀ # Ascii art mirror # (C flag) Join by newlines and center
Canvas, 9 7 bytes #*⌐⤢n↔n -2 bytes thanks to @Razetime Uh I don't really know how to use Canvas - what I think this does is create the vertical wall, then half the horizontal one, then concatn...
If you have any tips for golfing in Ruby, share them as answers to this post.
Scala, 130 125 bytes Saved 5 bytes by returning 1 like Hakerh400's great answer def f(m:Seq[Seq[Double]]):Double=if(m.size<1)1 else(m.indices:\.0){(i,a)=>m(0)(i)*f(m.tail.map(r=>r.take(i...
C, 147 bytes float d(float**m,int r){if(r<2)return**m;int i=r,j;float s=0,*n[--r];for(;i--;s+=(i%2?-1:1)**m[i]*d(n,r))for(j=r;j--;)n[j]=m[j+(j>=i)]+1;return s;} Try it online! Basically ...
Unlambda, 1 solution Since Unlambda code that does something always contains the backtick character, there cannot be more than one solution. ```.2.5.6i
Ruby, 7 solutions 256 4**4 -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-...
Haskell, 75 73 bytes -2 bytes thanks to @user f[]=1 f(x:y)=foldr(-)0$zipWith(\i->(*f[take i r++drop(i+1)r|r<-y]))[0..]x Try it online!
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...