I've been using Pieter's solution for a while until I realised it doesn't work in Mono. Mono doesn't throw an exception when retrieving Console.KeyAvailable with piped input, so that approach doesn't help.
However, as of .NET 4.5, Console actually provides a new field IsInputRedirected which mak...
Introduction
The task is simple. When given a number, output the most logical rectangle. To explain what a logical rectangle is, I provided some examples:
Input: 24.
All possible rectangles have the form A x B, (A and B are both positive integers). So, all possible rectangles for 24 are:
1 x...
Maybe, say, a bishop move one square signifies "push a binary 0," a bishop move 2 squares means "push a 1," and 3 squares means "take all those digits and turn them into an integer
Yes, but that could be resolved by making symmetrical moves equivalent (ex. king moving right means the same thing as moving left for the initial move).
Oooh! It would be interesting if the program had to terminate in either checkmate or a draw (draw offers not stemming from 3fold/50 move are forbidden).
Introduction
The task is simple. When given a number, output the most logical rectangle. To explain what a logical rectangle is, I provided some examples:
Input: 24.
All possible rectangles have the form A x B, (A and B are both positive integers). So, all possible rectangles for 24 are:
1 x...
As of the 9th of March, the banner shown to askers whose questions have attracted at least one duplicate close vote has a couple of new options:
If the author clicks the first button, they're shown a confirmation that clarifies the results of this action somewhat:
If they click "Ok", the qu...
By the way, i think the theoretical minimum for a reasonable Jelly-like language for that challenge is 4 bytes: divisors, lower-median, append to N/that
With lower median being two bytes.
I just realized there's no language with an array flood fill builtin yet.
The task is very simple, when given an input, output one of the following spirals:
Input = 1 gives a spiral with the letter A beginning in the top left corner:
A B C D E F
T U V W X G
S 5 6 7 Y H
R 4 9 8 Z I
Q 3 2 1 0 J
P O N M L K
Input = 2 gives a spiral with the letter A beginning in the t...
Given a string input, write a program that prints a truthy value to STDOUT or equivalent if the input is a valid UUID, without using regexes.
A valid UUID is
32 hexadecimal digits, displayed in five groups separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 alphanu...
@AlexA. I believe once you mentioned that it bothered you that I didn't use the reply button. From that day, I have avoided the reply button at all costs.
At my sister's wedding a long time ago my friend randomly grabbed a pepper shaker and started shaking it into my water and going "dududududu" to the tune of Sandstorm.