Julia 0.6, 45 bytes, Score: 77 Inspired by the MATL solution: f(w)=sum(UpperTriangular([z==j for z=w,j=w])) Try it online! A less pretty solution, using counts: Julia 0.6, score: 82 F(w)=sum(l-&...

Julia 0.6, 33 bytes print("duck\n"^rand(1:9),"goose") This will print duck up to 9 times before goose! Try it online!

Julia 1.0, 66 bytes using Dates;f="HH:MM";g(s)=Dates.format(DateTime(s,f)+Minute(1),f) Try it online! Using libraries because why not and it's still shorter than Python.

Julia 1.0, 30 bytes -x=x>sort(x) ? -x[1:2:end] : x Try it online! Takes every second element of the array if not sorted.

Julia 0.6, 85 bytes r(l,n=cumsum(l))=[n...,n[end]] w=reverse f(n)=n<2?:n%2<1?r(f(n-1)):w(r(w(f(n-1)))) Try it online! This is a recursive solution in Julia. Note that it has 1-based ...

Julia 0.6, Score = 7702 g(x,b=[bin(x)...])=min(sum(b.=='0'),sum(b.=='1')) f(a,b)=((r,i)=findmin(map(i->max(g(a*i),g(b*i)),1:10^5));[r,a*i,b*i]) Try it online! A naive and slow solution. Output ...

Julia 1.0, 27 bytes f(l)=l[sortperm(l.%2 .==0)] Try it online! This works too and is a lot more elegant: f(l)=sort(l,lt=(a,b)->b%2==0) But it's a few bytes longer :(

Julia 1.0, 158 bytes ¬t=(c=Dict();C=Dict();for i=eachmatch(r"\w",t);l=i.match;k=lowercase(l);c[k]=get(c,k,0)+1;C[k]=l;end;*(["$v$(C[k])" for (v,k)=sort([(v,k) for (k,v)=c])]...)) Original ungolfed ...

Julia 0.6, 68 bytes f(x,m=x%10,p=x%100-m)="$x$(["th","st","nd","rd"][m>3||p==10?1:m+1])" Try it online! Straightforward remainder rules in Julia.

Julia 0.6, 175 bytes p=println() f(l="AB",h=[10,10],a=1)=(while min(h...)>0;d=3-a;p(l[a]," a ",l[d]);r=rand(1:6);h[d]-=r;p(l[a]," r ",r);p(l[d]," h ",max(h[d],0));a=d;end;p(l[findmax(h)]," w")) ...

Julia 0.6, 29 bytes f(x)=x==""?false:x==x[end] Try it online!

Julia 0.6, 161 bytes f(n,d=cumprod([1,60,60,24,7,31/7,365/31]),r=div.(n,d),i=findlast(r.>=1),l=Int(r[i]))="$l$(split("second minute hour day week month year",' ')[i])$("s"^(l>1*1))" Try it ... View answer 1 votes Julia 0.6, 79 bytes f(s,l=length(s),n=s[])=(while !all(mod.(collect(0:l-1).+n,s).==0);n+=s[];end;n) Try it online! Inputs without valid solutiosn will cause infinite looping... :) View answer 1 votes Julia 0.6, 76 bytes f(s)=match(Regex("$s(.[a-z]*)"),"RedOrangeYellowGreenBlueIndigoViolet"^2) Try it online! This handles the Violet->Red by recycling the string with the power ^ operator. Here'...

Julia 0.6, 156 bytes f(n)=print(split(" of ,hearts,diamonds,spades,clubs,two,three,four,five,six,seven,eight,nine,ten,jack,queen,king,ace",',')[[(n-1)%13+6,1,div(n-1,13)+2]]...) Try it online! -2 ...

Julia 0.6, 141 bytes l=length g(z,i)=(n=z[i];m=z[i+1];(N,M)=l.([n,m]);z[i:i+1]=[n[1:min(N,M)],m*n[M+1:N]]) f(s,w=split(s),d=1:l(w)-1)=(g.([w],[d d]);join(w,"\n")) Try it online! Broadcasting with g....