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 hyper-neutrino‭

11 posts
80%
+6 −0
Challenges Evens or Odds - you know this one

Python 3, 10 bytes 1 .__and__ Try it online! Returns 1 for odd numbers and 0 for even numbers. Two bytes shorter than the trivial lambda x:x%2 and one byte shorter than the equivalent magic...

posted 3y ago by hyper-neutrino‭

Answer
75%
+4 −0
Challenges Make my number a set

Python 3, 34 bytes f=lambda x:[f(y)for y in range(x)] Try it online! -9 bytes thanks to Moshi Unfortunately, I cannot use Python sets, because sets are unhashable and thus cannot be put int...

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer
75%
+4 −0
Challenges Multiply complex numbers.

Python 3, 98 bytes print(str(eval("("+input().replace(" ",")*(").replace("i","j")+")")).strip("()").replace("j","i")) Try it online! Since the input format is restrictive, I may as well just...

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer
71%
+3 −0
Challenges Cumulative Counts

APL (Dyalog Unicode), 11 bytes (SBCS) 1 1∘⍉+\∘.=⍨ Try it online! This was a fun APL exercise. Working on figuring out how to get it down to 7 bytes.

posted 3y ago by hyper-neutrino‭

Answer
71%
+3 −0
Challenges Evaluation order of an APL n-train

Jelly, 8 bytes ṖUs2UṭµF Try it online! -1 byte thanks to caird coinheringaahing (Also posted on Stack Exchange by myself) ṖUs2UṭµF Main Link Ṗ pop (remove last element; for numbe...

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer
71%
+3 −0
Challenges Are they abundant, deficient or perfect?

Jelly, 6 bytes _ÆṣṠ)Ġ Try it online! In order of abundant, perfect, deficient. _ÆṣṠ)Ġ Main Link ) For each from 1 to N _ Subtract Æṣ The proper divisor sum Ṡ Sign ...

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer
66%
+2 −0
Challenges Reduce over the range [1..n]

Python 2, 33 bytes lambda a,b:reduce(a,range(1,1+b)) Try it online! Or, without using the reduce built-in: Python 2, 37 bytes f=lambda a,b:b-1and a(f(a,b-1),b)or 1 Try it online!

posted 3y ago by hyper-neutrino‭

Answer
66%
+2 −0
Challenges Repeat the characters

Jelly, 1 byte x Try It Online! x is Jelly's replicate atom. Since Jelly is inspired by languages like J, APL, etc, it is no surprise that is has an atom for a fairly important function.

posted 3y ago by hyper-neutrino‭

Answer
66%
+2 −0
Challenges Efficient censorship

Python 3, 102 bytes def f(x,y): a=[x] for x in a: if y not in x:return x for i in range(len(x)+1):a+=[x[:i]+x[i+1:]] Try it online! Not exactly the most efficient, but it works. Ju...

posted 1y ago by hyper-neutrino‭

Answer
60%
+1 −0
Challenges Cumulative Counts

Jelly, 7 bytes =þ`ÄŒDḢ Try it online!

posted 3y ago by hyper-neutrino‭

Answer
60%
+1 −0
Challenges Backspace an array

Python 3.8 (pre-release), 62 bytes f=lambda x,a=[]:f(x[1:],a+[x[0]]if x[0]else a[:-1])if x else a Try it online! -11 bytes thanks to user

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer