Gray codegolf
The gray code is a binary numeral system such that two successive values differ in only one bit.
Decimal Binary Gray
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 01...
No, we shouldn't, but...
I agree with the idea that we should not change a challenge unless the original OP wants to, especially when changing these rules might make older answers non-competitive.
However, I am fully in support of the idea of a "canonical" challenge. Here on CGSE many of us, myse...
On the Subject of Wire Sequence
This challenge is from a game, Keep Talking And Nobody Explodes.
It's hard to say how this mechanism works. The engineering is pretty impressive, but there must have been an easier way to manage nine wires. — from the manual
Input
Exactly 9 "wires", each which is l...
Introduction
Recently I was trying out one of the more obscure use-cases of a modern smartphone: Calling someone by number. While typing it in, I noticed that some of my phonebook entries were displayed, even though the number I was trying to call was different! After some experiments, I figured...
@petStorm No, I think the first attempt at answering it was posted to the Sandbox in 2015, and the answer to Tetris GoL was Sep 2017. Either way, it's still one of the most impressive answers on the site
If you dislike an answer, downvote and move on. Don't advocate for others to mass-downvote, and don't be disparaging about anyone's answer, low or high effort.
SE works on a Be Nice policy, try to stick by that
@HighlyRadioactive If you bought this keyboard, you definitely read the user manual (which teaches you how to type efficiently in this keyboard), didn't you?
@HighlyRadioactive The fact your message got removed, is more likely what triggered the spam or a fake version.
Lyxal, I don't have your name on my e-mail, but it's really funny seeing how they do this, and how they do this all day long. And they know what they are doing.
Given an array of n items: (specified in first line of input)
iterate over the array and remove an element at each iteration, then, for the remaining array, calculate the number of pairs formed.
Sample input:
5
1 1 2 1 2
Sample Output:
2
2
3
2
3
Explanation :
Consider the case when k = 1
for...
There are N jobs available. For i-th job you will earn Pi dollars after Di days. You can take and complete at most one of these jobs in a day and you cannot retake a job that you have already done. Find the maximum total amount that you can earn no later than K days from today.
Input Format
First...
we call a fraction x/y a happy fraction if there is one more fraction z/m = x/y (1<=z<=m<=9) and z atleast appears once in decimal representation of x and m atleast appears once in decimal representation of y. given an integer number a. Please calculate the number of happy fractions x/y such that...
@NewMainPosts @Razetime When commenting on a new user's first question, it's usually best to give them as much information, and be as helpful, as possible. For example, you can reword something like this to make the user's introduction to the site much less confusing
Explain what the Sandbox is for example, and tell them how that can search for similar questions. Let them know that all challenges have to have a winning criteria, that sort of thing is much better than a single sentence telling them to visit another page and do what they're told
Write the shortest program or function that takes some text as input, and outputs either it or an empty line in a repeating pattern:
some text
some text
some text
some text
some text
some text
...
This must continue indefinitely, or until some unpreventable limitation occurs (stack size, memo...