Hakerh400
Posts
See all 59 »JavaScript, 11 solutions !``<<!``<<!``<<!``<<!``<<!``<<!``<<!``<<!`` TIO 2**2**2*2**2**2 TIO 55555555555555555555555555555555555555555555555...
posted 4y ago by Hakerh400 · edited 4y ago by Hakerh400
JavaScript (Node.js), 74 70 bytes Works for any number of dimensions. f=(a,z=[])=>a.map?.((b,c)=>z.push(...f(b).map(a=>[c,...a])))?z:a?[z]:z Try it online! (TIO uses an old version ...
posted 4y ago by Hakerh400 · edited 4y ago by Hakerh400
JavaScript, 25 24 bytes -1 byte thanks to @Arnauld f=([a,...b])=>a?f(b)+a:b Try it online!
posted 4y ago by Hakerh400 · edited 3y ago by Hakerh400
Common Lisp, 26 22 bytes (princ"Hello, World!") -4 bytes thanks to @Sisyphus Try it online!
posted 4y ago by Hakerh400 · edited 4y ago by Hakerh400
JavaScript (Node.js), 137 136 117 bytes with(Math)f=n=>(m=(a,b)=>a?m(--a,b)+b(a):[])(28,y=>m(55,x=>x>26-y&x<y+28&(x^y)?min(abs(abs(27-x)-y)/2,27-y):' ')+` `) Try it...
posted 4y ago by Hakerh400 · edited 4y ago by Hakerh400
Definitions A binary tree is either a null (leaf), or an object (node). A node contains a value (non-negative integer) and two pointers (left and right) to two separate binary trees. A binary tre...
2 answers · posted 4y ago by Hakerh400 · last activity 3y ago by radarek
JavaScript (Node.js), 147 bytes f=(a,b='IVXLCDM',g=Math.log10(a)<<1,c=10**(g/2),e=a/c|0,i=b[g+1],j=a=>b[g].repeat(a))=>a?(e<4?j(e):e<6?j(5-e)+i:e<9?i+j(e-5):j(1)+b[g+2])+f(a...
posted 4y ago by Hakerh400
JavaScript (Node.js), 541 540 bytes for(_='=>)==!(+==0h,.map(M,R(=1,,e,b &&Nl=[-1,))s(n,=(a a=u,v(i=g(z,u,f=(a,w,cs=Math.max,r?[...r(--a ) (a)]:[],R>&b>&a<w&b<...
posted 4y ago by Hakerh400 · edited 4y ago by Hakerh400
Cracks Shaggy's answer Let the cops be "Cops" The conjunction is " and " The robbers are "Robbers" Say the cops with the conjunction with the robbers It can be one of: FALSE Phooe...
posted 3y ago by Hakerh400 · edited 3y ago by Hakerh400
JavaScript (Node.js), 40 bytes f=(a,b,c=1)=>a.reduce((d,e)=>d+e*(c*=b)) Try it online!
posted 4y ago by Hakerh400
JavaScript (Node.js), 64 bytes for(n=0;101>++n;)console.log([['Fizz'][n%3]]+[['Buzz'][n%5]]||n) Try it online!
posted 4y ago by Hakerh400
JavaScript (Node.js), 78 bytes (m=(a,b=26,c=a(--b))=>b?[c,...m(a,b),c]:[c])=>m(a=>m(b=>(c=25-a-b)<0?32:c+65)) Try it online!
posted 4y ago by Hakerh400
JavaScript (Node.js), 150 71 bytes f=(a,b)=>a[b.length]?f(b,a):b.filter(x=>a[y=a.indexOf(x)]=!~y).length-1 Try it online!
posted 4y ago by Hakerh400 · edited 4y ago by Hakerh400
Haskell, 24 bytes Probably the optimal solution. Credits go to nimi from PPCG. f n=elem n$map(^2)[0..n] Try it online! My original solution, 25 bytes f a=any((==a).(^2))[0..a] Try it ...
posted 3y ago by Hakerh400 · edited 3y ago by Hakerh400
Haskell, 141 bytes import Control.Monad f a=map(map fst)$filter(\c->let{g=map snd;e=sum(g a)`div`2;f=g c;d=sum f}in d>e&&all((<=e).(d-))f)$filterM(pure[1<0..])a Try it ...
posted 3y ago by Hakerh400
Reputation | 1591 | |
Number of top-level posts | 4 | |
Number of answers | 55 | |
Sum of received votes (up minus down) | 164 | |
Number of edits made | 63 |
Earned Abilities
Statistics
Posts | ||
---|---|---|
Count | 59 | |
Questions | 1 | |
Answers | 55 | |
Articles | 3 |
Votes cast | ||
---|---|---|
Count | 66 |
Flags raised | ||
---|---|---|
Count | 0 |