# Questions tagged [restricted-time]

For challenges with a restriction on the amount of time a submission is allowed to use.

93 questions
Filter by
Sorted by
Tagged with
5k views

### Calculate 500 digits of e

Write a program to calculate the first 500 digits of the mathematical constant e, meeting the rules below: It cannot include "e", "math.e" or similar e constants, nor may it call ...
• 2,896
1k views

### Find the longest permutations of integers from 1..k such that all neighbouring pairs sum to a square

OEIS A090461 details the ‘numbers k for which there exists a permutation of the numbers 1 to k such that the sum of adjacent numbers is a square’. This has also been the subject of Matt Parker’s ...
• 21.1k
274 views

### Implement Level-Index Addition

Level-index is a system of representing numbers which has been proposed as an alternative to floating-point formats. It claims to virtually eliminate overflow (and underflow, in its symmetric form) ...
• 20.4k
420 views

• 192k
4k views

### Encode - Shuffle - Decode

Challenge Your task is to encode an integer as a string of ASCII characters, then successfully decode it after said string has been randomly shuffled. You will write two programs/functions, which ...
• 6,266
468 views

### The N Queens Problem, but with Fairy Chess Pieces

Fairy Chess is a sort of generalized chess that allows unconventional pieces. The eight queens puzzle is a classic problem where you have to put 8 queens on a chess board such that no two queens ...
• 9,931
2k views

### Fruit bagging factory

Your mission is to build an algorithm (program or function) that can optimize packing fruit from a conveyor belt into bags to be sent off to retailers, optimizing for a largest number of bags. Each ...
• 4,987
504 views

### Cutpoints in a maze

A maze is given as a matrix of 0s (walls) and 1s (walkable space) in any convenient format. Each cell is considered connected to its 4 (or fewer) orthogonal neighbours. A connected component is a set ...
• 15.3k
2k views

### Solve a Rubik's Cube

Your challenge is to write a program to solve a 3x3x3 Rubik's Cube. This challenge is based on this one from 2013, rewritten to adhere to current community standards, and reposted with the original ...
• 13.9k
842 views

### Output all distinct permutations of a vector

Challenge: Output all distinct permutations of a, potentially long, list of positive integers. You may assume that the vector has less than 1,000 numbers when testing, but the process should in ...
• 46.3k
2k views

### Number of distinct non-empty subsequences of binary expansion

A subsequence is any sequence that you can get from another by deleting any amount of characters. The distinct non-empty subsequences of 100 are ...
• 39.1k
3k views

### Finding Snakes in a Matrix

Challenge Given a binary matrix and a binary string, determine if that binary string can be found starting at any point in the matrix and moving in any direction at any subsequent point to form the ...
• 42.4k
2k views

### Count forth and back then double up

Let's count... Count up to 2 and back to 1 Count up to 4 and back to 1 Count up to 6 and back to 1 ... ok you got it... put all these together and you'll get the following sequence ...
9k views

### Extreme Fibonacci

There have been a billion iterations of Fibonacci challenges on this website, so lets spice things up with a Fibonacci challenge of a billion iterations! Your challenge is to output the first 1000 ...
• 3,829
1k views

### Fastest tweetable integer factorizer

The task is to find a non-trivial factor of a composite number. Write code that finds a non-trivial factor of a composite number as quickly as possible subject to your code being no more than 140 ...
1k views

### Square root a number

The task is as follows: Given a positive integer x and a prime n > x, output the smallest positive integer ...
4k views

### Compute the inverse of an integer modulo 100000000003

The task is the following. Given an integer x (such that x modulo 100000000003 is not equal ...
641 views

### Find a number which generates all the integers mod q

Consider the integers modulo q where q is prime, a generator is any integer 1 < x < q ...
382 views

### Output a primitive element for each field size

A primitive element of a finite field is a generator of the multiplicative group of the field. In other words, alpha in F(q) is ...
900 views

### Finding the smallest sets

Consider three sets A, B and C each containing n ...
7k views

### 11 = (1+2+3+4+5) - (1+2+3) + (6) - (4)

Given a positive integer N, your task is to return the number of steps required by the following algorithm to reach N: Find the smallest triangular number Ti such that Ti ≥ N. Build the ...
• 192k
966 views

### Optimize sorting, using "Sub-vector reversals"

This is a fewest-operations challenge where the objective is to sort a vector into ascending order using the fewest reversals. Your algorithm can only sort the vector using "sub-vector reversals"1, ...
• 46.3k
2k views

### Find the sortable years

The year 2013 had an interesting property: the digits are consecutive when sorted (0123). Let's call this type of number a sortable number: a non-negative integer whose base-10 digits are consecutive ...
2k views

### Piet (Mondrian)'s Puzzle

For more information, watch this video, and go to A276523 for a related sequence. The Mondrian Puzzle (for an integer n) is the following: Fit non-congruent ...
• 6,980
1k views

### Fraction to exact decimal

Write a program or function that given two integers a, b outputs a string containing a decimal number representing the fraction a/b exactly. If a/b is integer, simply output the value, without a ...
• 39.1k