Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Posts tagged number

This tag doesn't have any usage information yet.

This tag doesn't have a detailed wiki yet.

50%
+0 −0
Sandbox Round trip stones [FINALIZED]

posted 9d ago by trichoplax‭  ·  edited 7d ago by trichoplax‭

60%
+1 −0
Challenges Round trip stones

$N$ vessels initially contain $3$ stones each. What is the probability of having at least $3$ stones in the first vessel after moving a uniformly random selection from the first vessel to the secon...

0 answers  ·  posted 7d ago by trichoplax‭

71%
+3 −0
Challenges The 50 substrings that validate any string of Roman numerals

Given a string of Roman numerals, decide whether it forms a valid Roman number. If not, output the substring that proves this, from the list of 50 strings described below. Relevant fact This chal...

1 answer  ·  posted 1mo ago by trichoplax‭  ·  edited 1mo ago by trichoplax‭

57%
+2 −1
Challenges Fibonacci without consecutive digits

Output the Nth number in the list of Fibonacci numbers that have no consecutive digits. Input A non-negative integer. Output The Nth number in the list of Fibonacci numbers whose base 10 ...

2 answers  ·  posted 2mo ago by trichoplax‭  ·  last activity 2mo ago by ok12d‭

61%
+6 −3
Challenges Make $2 + 2 = 5$

In this challenge, add 2 integers, but if both the integers are 2, output 5. Shortest code in each language wins! Example ungolfed program in Python 3.x def add(x, y): if x == 2 and y == 2: ...

20 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2mo ago by isaacg‭

Question code-golf math number
50%
+0 −0
60%
+1 −0
Challenges Shortest representation in generalised Roman numerals

Find the shortest representation of an integer in generalised Roman numerals. Since there is more than one way to generalise, only the following definition applies to this challenge. Definition T...

1 answer  ·  posted 6mo ago by trichoplax‭  ·  last activity 5mo ago by NikNakk‭

Question code-golf number
50%
+0 −0
86%
+11 −0
Challenges Can you give me half?

Challenge idea taken from: Eliseo D'Annunzio Task Provide code that evaluates to 0.5 numerically, i.e. the output must be recognized by your chosen language as a numeric value (Number, float, dou...

23 answers  ·  posted 2y ago by Razetime‭  ·  last activity 9mo ago by RubenVerg‭

60%
+1 −0
Sandbox Make my value binary [released]

posted 2y ago by General Sebast1an‭  ·  edited 10mo ago by trichoplax‭

71%
+3 −0
75%
+4 −0
Sandbox Decode periodic decimal fractions [FINALIZED]

posted 2y ago by celtschk‭  ·  edited 10mo ago by trichoplax‭

66%
+2 −0
Sandbox Convert integer to English [FINALIZED]

posted 2y ago by celtschk‭  ·  edited 10mo ago by trichoplax‭

71%
+3 −0
66%
+2 −0
Challenges Digit antitranspose

Convert a matrix or grid of digits to its antitranspose. For a square matrix , this is its reflection in its antidiagonal. More generally, for a rectangular matrix, this is its reflection in its sk...

4 answers  ·  posted 1y ago by trichoplax‭  ·  last activity 1y ago by torres‭

Question code-golf number
60%
+1 −0
Sandbox Digit antitranspose [FINALIZED]

posted 1y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

71%
+3 −0
Challenges Presumptuous base conversion

Take an input string representing a number and convert it to decimal (base 10). However, the base of the input is not specified. Assume the input is in the smallest base for which its digits are va...

5 answers  ·  posted 1y ago by trichoplax‭  ·  last activity 1y ago by Shaggy‭

66%
+2 −0
75%
+4 −0
Challenges The Pell Numbers

Introduction The Pell(no, not Bell) Numbers are a simple, Fibonacci-like sequence, defined by the following relation: $P_n=\begin{cases}0&\mbox{if }n=0;\\1&\mbox{if }n=1;\\2P_{n-1}+P_{n-2...

9 answers  ·  posted 3y ago by Razetime‭  ·  last activity 2y ago by torres‭

81%
+7 −0
Challenges Collatz conjecture; Count the tries to reach $1$

Background Check out this video on the Collatz conjecture, also known as A006577. If you don't know what this is, we're given an equation of $3x + 1$, and it is applied this way: If $x$ is odd...

15 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by torres‭

Question code-golf math number
85%
+10 −0
Challenges It's Hip to be Square

Challenge A catalogue type challenge that simply asks: Given an integer n (where n>=0) as input return a truthy value if n is a perfect square or a falsey value if not. Rules You may take...

20 answers  ·  posted 2y ago by Shaggy‭  ·  last activity 2y ago by Zakk‭

33%
+1 −4
Challenges Small integer swapping

In this simple challenge, create a short program that takes 2 ints as input, output them, swap their places, then output them again. Those 2 integers can't be the same number. The program with the ...

7 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by south‭

Question code-golf number
66%
+2 −0
Challenges Make my value binary

Challenge What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an int then turn it into it's binary value...

14 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by Olin Lathrop‭

Question code-golf number
81%
+7 −0
Challenges Operation "Find The Operator"

Challenge Make a program that takes input of 3 non-negative integers: a result and 2 other values that once calculated results to the 3rd value. The program must figure out how to get the 2 fir...

5 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by radarek‭

Question code-golf math number
81%
+7 −0
Challenges Make my number a set

Natural to set (set meaning an unordered collection with no duplicates, though answers may use and output lists instead) Recently I was brainstorming what a language with only (arbitrarily nested...

10 answers  ·  posted 3y ago by Wezl‭  ·  last activity 2y ago by radarek‭

Question code-golf number
71%
+3 −0
Challenges Convert integer to English

Given a non-negative integer up to $999\,999\,999$, write it in English. The input number can be in any form other than English (though you'll typically want to use the native integer type of your...

3 answers  ·  posted 2y ago by celtschk‭  ·  last activity 2y ago by Moshi‭

71%
+3 −0
Challenges Encode and decode floating point integers

Imagine you have only one byte (8 bits) to store a value, but need to store values from $0$ to $4032$. Impossible, until you are also told that an error of 1/64 of the exact value does not matter. ...

2 answers  ·  posted 2y ago by celtschk‭  ·  last activity 2y ago by General Sebast1an‭

Question code-golf number
77%
+5 −0
Challenges Decode periodic decimal fractions

Rational numbers in decimal representation can have an infinite periodic part. One common way to write this down is to repeat the periodic digits and then add three dots. Numbers without those thre...

2 answers  ·  posted 2y ago by celtschk‭  ·  edited 2y ago by General Sebast1an‭

60%
+1 −0
Challenges Getting perfect squares, differently

Create a program that gets all perfect squares starting from 0 or 1 without using any methods of multiplication (repetitive addition) and exponentiation (repetitive multiplication). Output them for...

7 answers  ·  posted 2y ago by General Sebast1an‭  ·  last activity 2y ago by General Sebast1an‭

75%
+4 −0
Challenges When The Ternary Is Balance

Inspired by this Rosetta Code article. Introduction Balanced Ternary is a method of representing integers using -1, 0 and 1 in base 3. Decimal 11 = (1 * 32) + (1 * 31) + (−1 * 30) = [1,1,-1] or ...

3 answers  ·  posted 2y ago by Razetime‭  ·  last activity 2y ago by Moshi‭

Question code-golf number base
71%
+3 −0
Sandbox Balance my ternary[FINALIZED]

posted 2y ago by Razetime‭  ·  edited 2y ago by Razetime‭

80%
+6 −0
Challenges Juggler sequences

A Juggler sequence is a sequence that begins with a positive integer $a_0$ and each subsequent term is calculated as: $$a_{k+1} = \begin{cases} \left \lfloor a_k ^ \frac 1 2 \right \rfloor, &...

9 answers  ·  posted 3y ago by caird coinheringaahing‭  ·  last activity 2y ago by Shaggy‭

80%
+6 −0
Challenges Versatile self-printer

Using your languages of choice, golf a quine - a non-empty program taking no input and only outputting its source. Here, the win condition is your quine working in the most languages. It should be...

1 answer  ·  posted 3y ago by AndrewTheCodegolfer‭  ·  last activity 2y ago by General Sebast1an‭

71%
+3 −0
Challenges Three Number Monte

The Rules In this game, each round, every player faces off against every other player in a round robin format. In each match, players pick 3 positive integers that sum to 360. Let's say player 1 p...

2 answers  ·  posted 2y ago by Quintec‭  ·  last activity 2y ago by Moshi‭

60%
+1 −0
60%
+1 −0