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 H_H‭

Type On... Excerpt Status Date
Edit Post #290667 Post edited:
11 months ago
Edit Post #290667 Post edited:
11 months ago
Comment Post #290667 @trichoplax Thank you. Changed the »Explanation« section title and removed some parts of it (i don't think it needs subheadings now, do you?). Yes there are probably a lot of language errors. I even do them in high German and even in my dialect, so no chance getting the English correct. You c...
(more)
11 months ago
Edit Post #290667 Post edited:
11 months ago
Edit Post #290667 Post edited:
11 months ago
Edit Post #290667 Post edited:
11 months ago
Edit Post #290667 Post edited:
11 months ago
Comment Post #290667 Updated the challenge. Do you think it is better now? Any comment how it can be improved?
(more)
11 months ago
Edit Post #290667 Post edited:
11 months ago
Edit Post #290667 Post edited:
11 months ago
Comment Post #290667 To 3: A P-adic-number is one that has an infinite amount of digits to the left of the "decimal"-comma/point (instead of the right). Normally you would choose a prime number as base, such as base 2 or base 3 and not 10, this is why there is a P in P-adic. But lets make an example with base 10, a 10-a...
(more)
11 months ago
Comment Post #290667 To 1.: In this example, with `a==3`, you would have to call `f()` with the value `43691` or `0xAAAB`. Because `3 * 0xAAAB` results in `0x20001`. And since we only return a 16 bit variable, the `0x2` at the beginning is droped. That means `f(0xAAAB)` will return 1. Now think about which argument we ...
(more)
11 months ago
Comment Post #290667 The term virtual fraction is one that i created. But fractions with only a single number do exist in Mathematics. Now there are multiple ways you can look at this challenge. I know at least 3: 1. Consider a C-function: `int a=3; uint16_t f(uint16_t x) { return a*x; }` With what value do you nee...
(more)
11 months ago
Comment Post #290667 Thank you for your feedback. Ok, i should have used a `≡` instead of a `=`. For the rest, i probably explained it a bit too complicated. Maybe you didn't learn about that branch of mathematics and that is where the confusion comes from (which i also had in some challenges from other people) or i d...
(more)
11 months ago
Edit Post #290667 Post edited:
11 months ago
Edit Post #290667 Post edited:
11 months ago
Edit Post #290667 Initial revision 11 months ago
Question Print the modular multiplicative inverse / virtual fractions
Goal Print the modular multiplicative inverse with a modulus of 65536 (or a higher exponent of 2) for odd numbers 1-97. Example output Print these values (or an extension of them): ``` 1 43691 52429 28087 36409 35747 20165 61167 61681 51739 53053 14247 23593 55827 49717 3...
(more)
11 months ago
Edit Post #290612 Post edited:
11 months ago
Edit Post #290612 Post edited:
11 months ago
Comment Post #290626 `<body bgcolor=0>`
(more)
11 months ago
Edit Post #290612 Post edited:
11 months ago
Edit Post #290612 Initial revision 11 months ago
Article Print virtual fractions / 2-adic fractions / Modular multiplicative inverse [FINALIZED]
Now posted: Print virtual fractions / 2-adic fractions / Modular multiplicative inverse TL;DR Print this values (or an extension of them): ``` 1 43691 52429 28087 36409 35747 20165 61167 61681 51739 53053 14247 23593 55827 49717 31711 33761 44939 7085 28567 39961 4877...
(more)
11 months ago
Comment Post #290328 Is it valid to output a bool by saying output `N` means 1 and all other outputs means 0? (or vice versa).
(more)
about 1 year ago
Edit Post #289926 Post edited:
about 1 year ago
Comment Post #290206 @#65963d Yes, absolutely. But then it isn't a (vanilla) python solution anymore and should be mention in the title. For example you can say N Byte Python+itertoolz You just count the bytes in your source code as normal. When you have: ``` import itertoolz as z z.DoSomeStuff() ``` Then you ha...
(more)
about 1 year ago
Edit Post #289926 Post edited:
about 1 year ago
Edit Post #290109 Post edited:
about 1 year ago
Edit Post #290109 Post edited:
about 1 year ago
Comment Post #290104 `(4*(i%2==1)+1)` can be shorten to `(i%2*4+1)`
(more)
about 1 year ago
Comment Post #290104 `i%2` can only be 0 or 1, so the `==1` is not needed. (There is more to improve, but before that the solution has to work in the first place.)
(more)
about 1 year ago
Edit Post #290109 Post edited:
about 1 year ago
Edit Post #290109 Post edited:
about 1 year ago
Edit Post #290109 Post edited:
about 1 year ago
Edit Post #290109 Initial revision about 1 year ago
Answer A: Single digit Roman numeral
C, 59 byte ```c h(n){return n&4?n&2?5:n&1?1e3:n&8?50:500:n&2?100:n&1?1:10;} ``` Old version, 60 byte: ```c h(n){return n&4?n&2?5:n&1?1000:n&8?50:500:n&2?100:n&1?1:10;} ``` Not very creative, there is probably a smaller version. Takes a ASCII character as argument and returns the value...
(more)
about 1 year ago
Comment Post #289996 Is `,.` as a solution allowed, then? (i would consider this a loophole for this particular challenge). Even when you explicit forbid this form of output, it could still be made possible by using a special form of character encoding for the input. A encoding where `I` has the number 1, `V` the numb...
(more)
about 1 year ago
Comment Post #289996 Do you have any restrictions on the output format?
(more)
about 1 year ago
Edit Post #289926 Post edited:
about 1 year ago
Edit Post #289926 Post edited:
about 1 year ago
Edit Post #289926 Post edited:
about 1 year ago
Comment Post #289926 Yes, you are correct, thank you. And `1or 2` is even shorter, but it requires to invert the logic.
(more)
about 1 year ago
Edit Post #289926 Post edited:
about 1 year ago
Comment Post #289926 Wouldn't that need more bytes? I use `&` to save 2 byte over `and`.
(more)
about 1 year ago
Edit Post #289926 Post edited:
about 1 year ago
Edit Post #289926 Post edited:
about 1 year ago
Edit Post #289926 Post edited:
about 1 year ago
Edit Post #289926 Initial revision about 1 year ago
Answer A: Borromean coprimes
SageMath, 68 66 64 Byte. 62 if you don't count the `m=` ``` g=gcd;m=lambda a,b,c:min(g(a,b),g(a,c),g(b,c))1 ``` Returns `False` for borromean coprimes and `True` for all other natural numbers >1. Use it like this `m(6,10,15)`. Using `min` to get the lowest `gcd` of all pairs. It is short...
(more)
about 1 year ago