« first day (3401 days earlier)      last day (1737 days later) » 

02:47
0
A: Sandbox for Proposed Challenges

dingledooperQuickly calculate \$ n! \bmod p \$ fastest-codefactorial The idea is extremely simple: Given two positive integers \$ n \$ and \$ p \$, calculate the result of \$ n! \bmod p \$, where \$ p \$ is a prime. Scoring Your score is the highest \$ p \$ you can achieve within \$ 10 \$ seconds, by runn...

 
6 hours later…
08:25
0
A: Sandbox for Proposed Challenges

Λ̸̸How long can the byte last? code-golf integer Given the initial number and the step of an arithmetically progressive infinite list, output how many steps it takes to zero the accumulator after reducing the infinite list by multiplication. How to reduce a list We set the 8-bit accumulator to th...

08:35
@Lyxal I love it when the image doesn't load.
Any feedback for my question?
0
A: Sandbox for Proposed Challenges

Λ̸̸Zero the byte (eventually) code-golf number-theory binary Given the initial number and the step of an arithmetically progressive infinite list, output how many steps it takes to zero the unsigned int8 accumulator after reducing the infinite list by multiplication. How to reduce a list We set t...

08:55
@Λ̸̸ The problem statement feels like an unnecessarily complicated version of "given an infinite arithmetic sequence, compute the minimum length of a prefix with product divisible by 2^8"...
@user202729 The "divisible by 2^8" doesn't seem right here. Although I don't know how dynamic trunctuation can potentially affect the result than simply trunctuation at the end.
It's the same. (that's basic math :/ ((a*b mod X)*c mod X) == (a*b*c mod X) )
You're right, my bad.
I don't have time to change the spec, because I'm in a hurry.
 
2 hours later…
11:00
2
Q: Check if an array (or equivalent) has the same number of odd and even numbers - Code Golf Edition!

bracco23Inspired by this code review question, I am curious to see what happens if we turn that into a code golf challenge! Description is easy, input is an array or any similar data structure with only unsigned integers, output is a boolean true if the number of odd are equal to the number of even numb...

 
2 hours later…
12:32
"Would you visit April?" "I May, in June."
12:56
under current lockdown, I May not visit June until July.
She can go say hello from a distance, but driving and transit is for essential workers only, so she'll have to March there by foot.
2
13:24
-4
Q: Produce the string "deno" from the string "node"

David CallananThe string "node" must be hard-coded in plain ascii to obtain a string with the value "node", which must be transformed into the string "deno". You cannot include "deno", any other variations, any other subsets of the word "deno", or any other representation of it in your code.

13:47
if I have a 7 by 8 rectangle, how any circles of radius 2 can you fit ?
12 is easy but can you do more?
ngn
ngn
@Anush s/radius/diameter/
you can't do 12. I meant 2 ! Can you do 3 or 4?
ngn
ngn
14:03
@Anush no
:( how can you tell we can't do 3?
ngn
ngn
i can't do 3 :)
maybe others can
let me change the question to make it more interesting.
I would like to know how many dots you can fit in a 7 x 8 metre box with no two dots closer than 2 metres from each other.
@ngn :)
oh yes, I missed a trick there, I should have said, "April May not visit June until July."
@NewMainPosts ooh, with @mypronounismonicareinstate's obligatory downvotes, I'm now on 99,779, so only 22 upvotes away from 99,999
I feel we should have a challenge on main for this
ngn
ngn
14:24
@Anush have you tried solving it yourself?
@ngn yes I can't do better than 20
a more general version would make a nice coding challenge I reckon
maybe something like this is possible? int-e.eu/~bf3/tmp/21.png
ngn
ngn
@Anush another interesting challenge is: given three circles with radii r0 r1 r2, find the smallest-area rectangle that can pack them
my brute-forcer found 21
@dzaima cool! Does that mean it is optimal?
oh, 22 too
14:36
@ngn that is a good question too
I think I just found 23!
@Anush oh, i'm not finding any 23s
the dots are the centres of the circles
@Anush about what i expected. i thought you'd have already tried the perfect packing :p
I don't even know what perfect packing means!
I thought there was no obvious optimal packing
14:42
I wonder if 24 is possible,
28 is the only obvious upper bound
@Neil 20 upvotes now. I forgot to upvote your answers.
@dzaima is your brute force code still running?
can I run it too?
@Anush it's not finding 23 with radius=0.999, it's definitely not gonna find anything better
hmm.. do you think my answer is wrong?
@Anush no, it's correct, it's just too perfect for (my) brute-force to find it or something
14:52
ah ok
15:03
I wonder how you would write code that at least theory could find the optimum
ngn
ngn
@Anush backtracking. there's a finite number of places where it makes sense to place the next circle.
15:28
That sounds good.
0
A: Sandbox for Proposed Challenges

my pronoun is monicareinstateEnforce Social Distancing! code-challenge test-battery Related to Maintain Social Distancing!. As in that challenge, there is a 2-dimensional array of 1s and 0s representing people. In it, social distancing is maintained if and only if all 1s are at least 6 squares apart, where distance metric ...

 
3 hours later…
18:11
@ngn I think a non linear equation solver is another route
19:00
I think my Steeping Through Time submission is fixable by adding and subtracting 20.
19:35
0
A: Sandbox for Proposed Challenges

NeilInspired by Draw this planar graph. Your input represents an ascending sequence, e.g. 1 2 3 4. You can require the sequence as input, or you can just input the length. The explanation assumes 1-indexing but you can use 0-indexed or even a-indexed input if you adjust the algorithm appropriately. ...

19:59
1
A: Sandbox for Proposed Challenges

Andrew GrotheShorten the numbers These numbers are taking up far too many bytes on my computer. Create a function/program to shorten any number using only Alphanumeric characters as the output. Scoring Scoring is based on optimized-output. Shortest number of characters produced for the following randomly g...

0
A: Sandbox for Proposed Challenges

NeilInspired by Wizard creating a jewelry. Given an input list of positive integers, calculate the minimum cost of creating the list from the following operations: Appending a positive integer costs the value of the integer. Incrementing the entire list costs 2. Exchanging two consecutive elements...

20:10
0
Q: Golf Me A Text-Editor

nopeGolf Me a Text Editor (similar challenges: Create a simple line editor and Line editor (more text here)) Errm... You see, I seem to have forgotten what program to use to open, read, and write text files. Something like Noteleaf or VSBro or... Hm... You see my conundrum. But never fear! I know s...

21:01
@Neil Ooh, two more downvotes! That means I just need an accept and 12 upvotes to hit 100,000!
 
2 hours later…
22:58
0
Q: Counting characters

Adam AbahotWrite a function or program that accepts one character (or a string of length 1) as input, and outputs the number of times that character occurs inside the code. Output may be to standard out, or as a return value from a function. This is code golf, so the shortest submission in bytes wins. Good ...


« first day (3401 days earlier)      last day (1737 days later) »