Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Posts by Arpad Horvath‭

8 posts
75%
+4 −0
Challenges Single digit Roman numeral

Python 3.8+, 51 byte lambda n:((i:="IVXLCDM".index(n))%2*4+1)*10**(i//2) Testing the code: f=lambda n:((i:="IVXLCDM".index(n))%2*4+1)*10**(i//2) for s in "IVXLCDM": print(s, f(s)) T...

posted 1y ago by Arpad Horvath‭  ·  edited 1y ago by Arpad Horvath‭

Answer
71%
+3 −0
Challenges Is it part of the mandelbrot set?

Haskell, 66 bytes -7 bytes thanks to Razetime‭ import Data.Complex (\c->(<2).magnitude$(iterate(\z->z*z+c)c)!!16) I use the fact, that if the result is bigger than 2, it will be fore...

posted 1y ago by Arpad Horvath‭  ·  edited 1y ago by Arpad Horvath‭

Answer
66%
+2 −0
Challenges How many umbrellas to cover the beach?

Python 3.8+, 219 bytes Short version: from itertools import combinations as c def m(w): for k in range(n:=len(w)): for y in c(range(n),k+1): s=[0]*n for x in y: for r in range(...

posted 1y ago by Arpad Horvath‭  ·  edited 1y ago by Arpad Horvath‭

Answer
66%
+2 −0
Challenges Construct the Irish possessive

Python 3.8+, 577 bytes (was 634 than 591 bytes before) V="eéiíaáoóuúEÉIÍAÁOÓUÚ" r={"mé":("mo",0),"tú":("do",0),"sí":("a",1),"sé":("a",0),"muid":("ár",2),"sibh":("bhur",2),"siad":("a",2)} s=la...

posted 7mo ago by Arpad Horvath‭  ·  edited 7mo ago by Arpad Horvath‭

Answer
66%
+2 −0
Challenges The 50 substrings that validate any string of Roman numerals

Python, 220 bytes Works with Python 3.8 or newer. n=" IVXLCDM" x=("".join([n[(d:=ord(c)-32)//8]+n[d-8*(d//8)]for c in'&PW!H.!@/$HF$@G"H6"@7"03#P?%N%O%U%]%^%_&N&O!*!+!1!=!9!<!:!;...

posted 7mo ago by Arpad Horvath‭  ·  edited 5mo ago by trichoplax‭

Answer
66%
+2 −0
Challenges Round trip stones

Python, 104 bytes f=lambda n:"1.0000000.7272730.7285710.7368420.7437890.7491640.7533440.7566570.7593360.761542"[8*n-8:8*n] Try it online! Not too clever. I am curious whether it can be beaten ...

posted 7mo ago by Arpad Horvath‭

Answer
60%
+1 −0
Challenges Single digit Roman numeral

Haskell, 62 bytes (\n->(scanl(*)1$cycle[5,2])!!(length$takeWhile(/=n)"IVXLCDM")) No import needed. It just uses standard Prelude functions. scanl(*)1$cycle[5,2] will give you the infinit...

posted 1y ago by Arpad Horvath‭  ·  edited 1y ago by Arpad Horvath‭

Answer
60%
+1 −0
Challenges The 50 substrings that validate any string of Roman numerals

Haskell, 271 bytes import Data.Char import Data.List n=" IVXLCDM" r x=maximum[if(s`isInfixOf`x)then s else"A"|s<-words$concat$map(\x->(n!!div x 8):[(n!!(x-8*(div x 8)))])$map(\x->ord...

posted 7mo ago by Arpad Horvath‭

Answer