Simple challenge: Read a byte, swap bit 7 with 0, 6 with 1, 5 with 2 and 4 with 3 and then output the byte. For example the byte 0b1001'1100 would turn into 0b0011'1001.
Rules:
Shortest code wi...
6 answers
·
posted 2y ago
by H_H
· last activity
2y ago
by lovebuny
Input is a number, you have to decide if it is part of the mandelbrot set or not, after at least 16 iterations.
This is done by applying this formula: $z_n = z_{n-1}^2 + c$ repeatedly. $c$ is the ...
2 answers
·
posted 2y ago
by H_H
· last activity
6mo ago
by Arpad Horvath
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))<2or g(g(b,c),a)>1
Returns False for borromean coprimes and True for all other natural ...
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
52...
3 answers
·
posted 2y ago
by H_H
· edited
9mo ago
by deleted user
C, 30 + 1-4 byte
f(m){f(printf("%0*i\n",m,0));}
Has this limitations:
counter stops working at INT_MAX or at stack overflow.
Needs a input value to indicate on which line we start. 0 starts...
Now posted
Input is a number, you have to decide if it is part of the mandelbrot set or not, after at least 16 iterations.
This is done by applying this formula: $z_n = z_{n-1}^2 + c$ repeatedl...
For challenges that require a input, what is the maximum a solution has to support, if not further specified by the challenge author?
Lets say the input is a string, how long a string has to be ac...
0 answers
·
posted 2y ago
by H_H
· edited
1y ago
by trichoplax
Brainfuck, 10 Bytes
,[>,]<[.<]
Requires EOF to be 0.
Try it online!
,[>,]<[.<]
, # Read character
[ ] # loop as long as current cell is not 0 (EOF)
>, ...
A program may use IOs for input and output.
A input can be read via IO, which can be a port with (multiple) IOs each IO reads a symbol (a bit or more when you have a ADC). Or it can come from fram...
A program may output a boolean value by using different amount of time or instructions till it returns.
If a program needs to determine a boolean value, it may return in less than N second (or ins...