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 »

Activity for isaacg‭

Type On... Excerpt Status Date
Edit Post #290977 Initial revision 2 months ago
Answer A: Make $2 + 2 = 5$
[Pyth], 6 bytes +!-Q2s Try it online! I think there might be a way to shave a byte, but I can't find it. s Sum the input + Add -Q2 Remove the twos from the input ! Negate
(more)
2 months ago
Edit Post #290976 Initial revision 2 months ago
Answer A: Is it stuck in a counting loop?
[Pyth], 8 bytes qu/Red. Try it online! A list is in a loop if and only if it is the first list seen twice as f is applied repeatedly. qu/Red. u Apply the following function, until a list is seen twice. . Take all prefixes of the list ...
(more)
2 months ago
Edit Post #290975 Initial revision 2 months ago
Answer A: Can I follow this recipe?
[Pyth], 15 bytes !f.A-VtTsM.T.p Try it online! Outputs True if no valid recipe exists, False if one does. If truthy/falsy outputs are allowed, the `!` can be removed, to just output all valid permutations. Takes input as lists, not sets. !f.A-VtTsM.T.p .p All pe...
(more)
2 months ago
Edit Post #290973 Initial revision 2 months ago
Answer A: Print the modular multiplicative inverse / virtual fractions
[Pyth], 16 bytes .^RtJ^2yTyJ%2S97 Try it online! This solution uses Euler's formula, which states that if a is coprime to m, a^(phi(m)-1) = a^-1 mod m where phi(m) is the totient function, the number of integers in the range [1, m-1] that are coprime to m. For a power of 2, thi...
(more)
2 months ago
Edit Post #290972 Post edited:
Found a shorter way to generate fibonacci numbers.
2 months ago
Edit Post #290972 Initial revision 2 months ago
Answer A: Fibonacci without consecutive digits
[Pyth], 25 23 bytes @f-1aM.:jT;2u+Gs>2GyQU2 Try it online! First, we generate the Fibonacci numbers: u+Gs>2GyQU2 U2 range(2), the list [0, 1] u Apply the following function iteratively, returning the final result. +G ...
(more)
2 months ago