Newest Questions
14,357 questions
27
votes
14
answers
1k
views
Palindromic Residue
Today, as I'm writing this, is March 31st. In the US, this is 3/31. I was playing around with 331 as a number to come up with a ...
42
votes
21
answers
9k
views
Print the Periodic Table
Your challenge is to print/output/return this text:
...
-2
votes
5
answers
226
views
No Singles Allowed [closed]
This is a fairly simple challenge.
Write a program that computes the distance between two points on a 2D plane. However, you can't use any functions or operators (referred to here as symbols) that ...
1
vote
0
answers
73
views
Who won the game? [duplicate]
Task
Everyone knows the game "Tic-Tac-Toe". Your task is it, to evaluate an ascii tic-tac-toe matchfield. Your Programm/Function should output/return the winner: O, X or nobody (N).
Pattern
<...
3
votes
2
answers
260
views
running consecutive commands in bash [closed]
Usually to run multiple commands consecutively one would do:
sudo apt update && sudo apt upgrade # 35 characters
I can't help but feel there's a neat ...
12
votes
3
answers
907
views
Let's Play Hide and Seek!
The user will hide, and the computer will try to find them.
First, the program will take an input, for the size of the grid. Like 5x5, 10x10, 15x15, etc. The grid won't always be a perfect square.
...
27
votes
1
answer
1k
views
Find Diffy Games
A fun game to play if you are bored is the Diffy Game. It is a one player game that is pretty simple and can consume a good deal of your time.
The Diffy game works like as follows: You start with a ...
28
votes
98
answers
19k
views
Reciprocal of a number (1/x)
Challenge
Given a (floating-point/decimal) number, return its reciprocal, i.e. 1 divided by the number. The output must be a floating-point/decimal number, not just an integer.
Detailed ...
2
votes
18
answers
737
views
Flip a coin for me! [duplicate]
Note: There was not a vanilla challenge to actually flip a coin, even though there were mentions about flipping coins a lot of places. Even though there is a challenge to generate a random number from ...
21
votes
1
answer
439
views
Good Vibrations
The sound of the theremin has been immortalized in The Beach Boys song Good Vibrations. Many also associate its sound with the theme for the original series of Star Trek, though apparently it was a ...
12
votes
6
answers
826
views
Topple the sandpile
(There are related questions about infinite sandpiles, and finding identity elements of sandpiles.)
Given a matrix of non-negative integers, return a matrix of the same dimensions, but toppled:
If ...
24
votes
7
answers
1k
views
Find the binarray!
We define a binarray as an array satisfying the following properties:
it's non-empty
the first value is a 1
the last value is a 1...
12
votes
11
answers
2k
views
Count how many months are having a full 31 days by counting knuckles
How many of you that still use your own knuckle to determine whether a month is having a full 31 days or less?
You job is to write a program to count how many months, in a month range, are having a ...
22
votes
8
answers
1k
views
Find the polynomial
We know that f is a polynomial with non-negative integer coefficients.
Given f(1) and f(1+f(1)) return f. You may output f as a list of coefficients, an ASCII formatted polynomial, or similar.
...
7
votes
1
answer
359
views
Count # of Cookie Chocolate Chips
Note: this is my first post here.
The Challenge
The challenge is to count the number of chocolate chips in a cookie. A cookie in this case is a circle with dots (the chips) in it. Given any square ...