# Questions tagged [number]

A competition to solve a particular problem through the usage and manipulation of numbers.

1,300 questions
Filter by
Sorted by
Tagged with
3k views

### Create a bingo card generator

Bingo Bingo is a numbers game where players match randomly drawn numbers to the numbers on their cards. Each bingo card is a square grid with 25 spaces, and the columns of the grid are labeled with ...
• 46.2k
2k views

### Shortest digid-app GetPercentageRounds function

Context So the Dutch "Ministerie van Binnenlandse Zaken en Koninkrijksrelaties" (NL) - "Ministry of the Interior and Kingdom Relations" (EN) recently released the source code of ...
• 361
1k views

### Toggle some bits and get an actual square

Inspired by the title of the Toggle some bits and get a square challenge. In that challenge you output how many bits should be toggled, in order for the base-10 representation of the binary to become ...
• 123k
731 views

### Form a subset that is a continuous range

Given a list of lists of positive integers, output a subset of them so their union forms a continuous non-empty range with no numbers missing. For example, consider this input: ...
• 11.8k
2k views

### Find the first run of numbers summing to n

Given as input a positive nonzero integer n >= 10 and a sequence of digits 0-9 (which may be taken as a string or a list), ...
• 5,420
1k views

### Division between two strings

Inverse function of this challenge To (properly) multiply an string by an integer, you split the string into characters, repeat each character a number of times equal to the integer, and then stick ...
• 20.6k
2k views

### Round to nicer numbers

The standard way to round numbers is to choose the nearest whole value, if the initial value is exactly halfway between two values, i.e. there is a tie, then you choose the larger one. However where I ...
• 96.5k
1k views

### Calculate my income tax

Background Here in the UK1, these are the income tax rules: You get a personal allowance (untaxed) of up to £12,570: If you earn less than £100,000, you get the full £12,570 as personal allowance ...
• 17.8k
736 views

### Create $n$ sublists with the powers of two (1, 2, 4, 8, 16...)

Challenge: Given the input number n. It should give me nested sublists of n layers with the power of two numbers for each level. ...
• 2,001
5k views

### Sum every second digit in a number

I have a number like this: n = 548915381 The output should be the sum of every second digit of that number. In this case 26: ...
• 459
2k views

• 12.7k
2k views

### Number to letters

Your task Given a numerical string or integer $\ge 0$ (which may have leading zeros), convert it to letters using the below rules. Rules Loop through the digits: If the digit is ...
• 17.8k
506 views

### Iterate through addition of number sequence until a single digit [closed]

Challenge: With any given number that has multiple digits, every digit in the number needs to repeatedly be summed together until the sum is a single digit number. To make things interesting, if there'...
• 87
1k views

### Increment, decrement, undo, peek

Write a program or function (hereafter "function") that returns or prints the source code of four new functions: Increment, decrement, undo, and peek. The initial function contains an ...
• 9,726
435 views

### Conversions Galore!

Imagine that there are $n$ different types of objects $O_1,O_2,O_3,\ldots,O_n$ and they each have a conversion factor $k_1,k_2,k_3,\ldots,k_n$. You can, for any $1\le i\le n$, convert $k_i$ ...
• 12.7k
861 views

### Fastest Gematria calculator

Gematria is an ancient Jewish method to determine a numeric value of a letter sequence, using a fixed value for each letter. Gematria is originally applied to Hebrew letters, but for the context of ...
• 183
2k views

### Numbers vs. Strings: Language fitness challenge

inspired by thejonymyster's idea Rules This challenge is about finding languages that are very suitable for one task but quite the opposite in the other. The two tasks share a theme, but Task 1 is ...
• 73.8k
2k views

Your task is to write a program that calculates the amount of different ways to display any given whole positive number using the following rules: Meet the 'advanced binary system': Any whole positive ...
• 145
1k views

### Number of ways to make an amount with coins

This is not a duplicate of Sum of combinations with repetition. This question considers 1+2 to be the same as 2+1. The other ...
• 17.8k
754 views

### Solving an easy Sudoku in increasing digit order

Introduction: I'm old-fashioned and still read a physical newspaper in the morning while eating my breakfast. Although I don't like Sudoku that much, I do solve the Light-complexity ones, which are ...
• 123k
2k views

### Carry-less sum given a base b

Given a list of positive integers $\mathcal I=I_1,I_2,I_3,...,I_n$ and a base $b>1$ return their "carry-less sum", i.e. represent $\mathcal I$ in base $b$ and sum digit-by-digit ...
• 16k
277 views

### Rotatable numbers (Upside down) [duplicate]

Searching for rotatable numbers, like: 68089 If you consider numbers upside-down, 6 looks like ...
1k views

### Cartesian - polar conversion couple

We don't have a challenge for conversion between Cartesian and polar coordinates, so ... The challenge Write two programs (or functions) in the same language: one that converts from polar to ...
• 104k
353 views

### Decompose number N into the sum of three triangular numbers [closed]

It is known that any natural number can be decomposed into the sum of three triangular numbers (assuming 0 is triangular), according to Fermat's Polygonal Number Theorem. Your task is to come up with ...
• 45
333 views

• 123k
692 views

### Rounding a range

You have a line with two endpoints a and b (0 ≤ a < b) on a 1D space. When ...
• 2,325
991 views

### Sequence of integers not the sum of powers of earlier terms

Starting with 1, output the sequence of integers which cannot be represented as the sum of powers of earlier terms. Each previous term can be used at most once, and the exponents must be non-negative ...
• 420
1k views

### Words with Easy Letters in a Word Search

Introduction: Apparently I keep coming up with word search related challenges lately. :) When I do the word search in the Dutch news paper, some words are very easy to find because they contain ...
• 123k
1k views

### Average-ignorant sets of integers

Recently a friend of mine posed the following: What subset of the integers satisfies the condition if distinct a and b are in the subset, their average is not in the subset? I know the set of non-0 ...
• 523
3k views

### Find the weight of five apples

Problem John bought 5 apples. You are given the weights of every group of four apples, and must then find the weights of the apples themselves. For example, if all apples without the first one weigh ...
• 209
3k views

### Numbers in 2050

It's 2050, and people have decided to write numbers in a new way. They want less to memorize, and number to be able to be written quicker. For every place value(ones, tens, hundreds, etc.) the number ...
• 303
545 views

### Batt to the Basics

One of your acquaintances has a hobby of making make-shift electrical gadgets using various types of batteries. However, since they're thrifty, they want to use as few batteries as possible for their ...
1k views

### The interstice of two binary numbers

Given two integers, compute the two numbers that come from the blending the bits of the binary numbers of equal length(same number of digits, a number with less digits has zeros added), one after the ...
• 420