Questions tagged [number]
A competition to solve a particular problem through the usage and manipulation of numbers.
1,339 questions
0
votes
1
answer
109
views
Golf a number bigger than all other answers [duplicate]
You have to code in python, and the number generated by your code must be bigger than all other current submissions. You need to make your code as small as possible, it has to terminate but you can ...
17
votes
18
answers
2k
views
Order a list by the difference of its elements
Task
Given an unsorted list of integers, order it in such a way that the absolute difference of every two adjacent elements will always be equal to 1:
\$|dx| = 1\$
There will be guaranteed one or more ...
18
votes
8
answers
1k
views
English to Dutch number order conversion
Introduction:
When saying numbers out loud, the order is slightly different in Dutch than in English. For a number like \$1234\$:
in English you'd say: one thousand, two hundred and thirty-four
in ...
9
votes
3
answers
321
views
Divide 1 by a sum/difference of square roots
Divide 1 by a sum/difference of square roots
Input: An expression that is a sum/difference of square roots of positive integers. You can assme it will not equal 0.
The general form is \$\pm\sqrt{a_1}\...
10
votes
8
answers
752
views
Closest Palindromic Number with Matching Smallest Valid Base
An extension of Find the closest palindromic number mixed with Numbers Interpreted in Smallest Valid Base.
A number is a palindrome if its sequence of digits is the same when reading them from left to ...
5
votes
3
answers
980
views
Multiply the input by 2
Your goal is to write a program which will take an input and multiply it by 2. However, there are some catches.
You will get an input in one of a few forms:
A number (...
16
votes
11
answers
2k
views
A million and one constants
When code golfing, it can be useful to write numbers succinctly. This challenge involves using a source language to generate code for a target language. For the submission to be valid, it must ...
13
votes
8
answers
1k
views
Float vs Decimal
You will be given a decimal number n in the form of a string. You must determine if that number, when stored in standard number type ...
10
votes
6
answers
847
views
Optimal Assembly Jump Distance
In some forms of assembly, there are separate "short jump" and "long jump" instructions. However, these jumps can themselves have different lengths, which can affect the distance ...
-10
votes
2
answers
296
views
Fizz-Buzz-Bazz-Pazz
Fizz-Buzz-Bazz-Pazz
Problem Summary
Write a program that prints numbers from 1 to 100 with replacements based on the following ...
13
votes
12
answers
2k
views
Bespoke numbers
Introduction
Bespoke is an esoteric programming language I created in January 2025, where the commands are encoded into the lengths of words in the program. For example, ...
8
votes
8
answers
3k
views
The Oreo Problem: How to find the Excess
This problem is inspired from this childhood advertisement I remembered of while making biscuits with my checkers. Assume you got a black checker, and white checker on top of it, and another black ...
21
votes
28
answers
4k
views
Is the number sum of 3 squares?
Challenge
Write a program (function) that given a nonnegative integer input, output whether the number can be represented as the sum of 3 square numbers. That is, the program should, given nonnegative ...
22
votes
21
answers
4k
views
How much coffee is in my water?
Sometimes I'll put coffee in my usual water bottle. Even after I drink it and put water in it, I can still slightly taste coffee, since there's a few drops left. After a few refills, it fades, but I ...
7
votes
7
answers
512
views
How many free polyominos without holes
Related CodeGolf posts
How many unique one sided polyominos
Enumeration of free polyominoes
Context
From Wikipedia:
A polyomino is a plane geometric figure formed by joining one or more equal ...