Questions tagged [number]

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

1,189 questions
Filter by
Sorted by
Tagged with
657 views

Move to Right and left

Task Your task is to take an array of numbers as input, and produce a new one where each number has been shifted both right and left, leaving 0s if no number fills ...
146 views

Represent any integer with an expression that uses no digit besides '4' [closed]

Fourward (Introduction) I have an unhealthy obsession with the number 4. I love it so much, in fact, that seeing any other digit is frustrating to me. I therefour wish to create a 'Fourier ...
115 views

Indices of square numbers that are also pentagonal [closed]

First 15 numbers of the A046173: ...
2k views

Next Greater Number

The task: Given an integer n, find the next number that follows the following requirements The next greater number is a number where each digit, from left to right,...
916 views

Number of complete rhyme schemes

A rhyme scheme is the pattern of rhymes at the end of the lines in a poem. They are typically represented using letters, like ABAB. We consider two rhyme schemes ...
516 views

Largest SKI output in less than 200 combinators

The Challenge Create an terminating expression in SKI Combinator Calculus in less than 200 combinators (S, K, I) that reduces to the expression with the most combinators. There will be no limit on how ...
741 views

Minimum difference between cartesian product of 3 elements that add up to a certain number

Let's say I've got a list (or array) of: l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] I want to get the third Cartesian power of the above list, where we take every ...
674 views

Kolmogorov-simple numbers

If you visit Code Golf often, you may have heard of Kolmogorov complexity. It's usually defined as the amount of bytes required to express some string in a programming language. Here the Kolmogorov-...
975 views

Nth FizzBuzz Number

Introduction Everyone knows the FizzBuzz sequence. It goes something like this: 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz . . . In case you don't ...
2k views

553 views

Programming Less-Than, Greater-Than and Equal-To functions using Restricted Source [closed]

I'm currently working with a branchless language which does not have native Less-Than, Greater-Than or Equal-To functions. I do however have min, ...
596 views

Calculate $\lfloor n \log_2(n) \rfloor$, exactly

Given an integer $n \ge 2$, you need to calculate $\lfloor n \log_2(n) \rfloor$, assuming all integers in your language are unbounded. However, you may not ignore floating-point errors - for ...
1k views

Dimensional Chess positions

Task Any one of these two: Determine if a given position (an ordered non-empty collection of integers in the range ‒8 to 8, or ‒7 to 7 if you want) is a valid Dimensional Chess position. List all the ...
1k views

Convert version string to pack_format

When making a Minecraft data/resource pack, you need to include a pack.mcmeta file, which specifies information about it. ...
434 views

Set the sum and product

Given two positive reals $a$ and $b$, output some positive reals $r_i$, such that $\sum r_i=a$ and $\prod\left(r_i+1\right)=b$. You can assume that it's possible. You can also assume that ...
580 views

Compute the uncomputable ... sort of

Implement a function $f$ (as a function or complete program), such that $\displaystyle\lim_{n\rightarrow \infty} f(n)$ converges to a number which is not a computable number. Answers will be ...
914 views

Base-ically Guard

Base: part 1 This is part 2, Strongly suggest you go try out the first one if you haven't tried it. Story As one of the solvers, You've managed to get to the door of the base heaven. In front of the ...
2k views

Apply at indices

Given: a blackbox function $f : \mathbb N \to \mathbb N$, a list of positive integers $L$, and a list of indices $I$, apply $f(x)$ to the elements of $L$ at the indices specified in $I$. ...
2k views

What's my lucky factor?

Lucky numbers (A000959) are numbers generated by applying the following sieve: Begin with the list of natural numbers: ...
3k views

Exciting Mario Kart Grand Prix - Minimize the point difference!

Introduction When playing Mario Kart the other day, an interesting question popped up when a Grand Prix with my 2 roommates, 9 AI drivers and myself seemed to be fairly close and therefore exciting ...
1k views

Base-ically god

Story The god of base is opening heaven’s gate for mortals to join the base party. You, as one of the believers, want to follow their steps to ascend to heaven. But not everyone can get in. The god ...
2k views

Do I need a win streak?

You have played $N$ matches in some game where each match can only result in one of the two outcomes: win or loss. Currently, you have $W$ wins. You want to have a win percentage of $P$ or more, ...
1k views

You are kinda Replacable to Me

You are provided with a non-empty array $A$ of integers, all greater than 0. But what good is an array if the elements do not sum up to the number $N$ (also provided as input)... So to change that,...
210 views

A problem of rarity [closed]

Given a positive input $n > 0$, output the amout of two types based on their rarity. The two types are called $A$ and $B$, we know the followings: $n$ is a limited input and the maximum is ...
Challenge This challenge is pretty simple: Output the total number of possible Tweets. Given the fact that $1114112$ Unicode characters exist, and Tweets can be up to $280$ characters long, we ...