Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [number]

This challenge is intended to be solved by using, manipulating, accepting as input, or outputting numeric values.

-1
votes
2answers
195 views

Equal Pair sum of 10? [duplicate]

Challenge : Check : if there are exactly n exclamation marks ! between every pair and ...
-5
votes
9answers
204 views

Math Operations with Strings [duplicate]

Challenge : Inspired by Alphabet Position Finder Given an string and one of two possible mathematical operator (+ or -) as ...
20
votes
53answers
2k views

count ones in range

Challenge : Count the number of ones 1 in the binary representation of all number between a range. Input : Two non-decimal positive integers Output : The sum ...
9
votes
22answers
965 views

Reduce using the lowest value

The challenge Create a function which takes an array of numbers and subtract from each element the lowest element in the array that has not yet been subtracted from another. After using the lowest ...
10
votes
38answers
2k views

Alphabet Position Finder

Inspired by the Codewars Kata. Your goal is to take an input string such as this one: "'Twas a dark and stormy night..." and return a string containing the ...
21
votes
39answers
3k views

X Steps Forward, 1 Step Back

Here the first 100 numbers of an easy sequence: ...
3
votes
0answers
182 views

Mathematical parser [duplicate]

Challenge : Given a string representing a mathematical expression return the result Input : A string representing a mathematical expression : ...
20
votes
15answers
2k views

Function clipboard: paste

This challenge is related to some of the MATL language's features, as part of the May 2018 Language of the Month event. Associated challenge: Function clipboard: copy. Introduction MATL's function ...
11
votes
4answers
724 views

Determine Season

Introduction: In the northern hemisphere (i.e. Europe, North America, etc.), the seasons are divided like this: - Spring: March, April, May - Summer: June, July, August - Autumn: September, October, ...
17
votes
12answers
1k views

Function clipboard: copy

This challenge is related to some of the MATL language's features, as part of the May 2018 Language of the Month event. Associated challenge: Function clipboard: paste. Introduction MATL has several ...
51
votes
11answers
3k views

Bringing a pair of integers to equality

This was inspired by a math problem I saw somewhere on the internet but do not remember where (UPDATE: The original problem was found on the math riddles subreddit with a proof provided that it is ...
24
votes
15answers
1k views

Modular broadcasting

This challenge is related to some of the MATL language's features, as part of the May 2018 Language of the Month event. Introduction In MATL, many two-input functions work element-wise with ...
16
votes
21answers
2k views

Is this a staircase number?

Challenge : Check if the given number forms a number staircase or not Input : A integer (greater than 0 and not decimal). NOTE : You can take input as string , ...
-4
votes
53answers
797 views

Return the highest possible placement value based on the input

Introduction The challenge itself was something I came across and had to try and figure out for a personal of project of mine. I ended up branching out and asking family members if they could provide ...
8
votes
24answers
1k views

Golf me the Schlosberg Numbers

Schlosberg Numbers In issue 5 of Mathematical Reflections, Dorin Andrica proposed the problem of characterising the positive integers n such that is an even integer. Eight people submitted ...
11
votes
2answers
288 views

Find out my number neighbors

The input consists of i rows with neighbors information. Each ith row contains 4 values, representing the neighbor of i to the North, East, South and West directions, respectively. So each value ...
5
votes
27answers
1k views

Simple Factorial Challenge [duplicate]

In light of today's date... A factorial of a number n, is the product of all the numbers from 1 to n inclusive. The Challenge Given an integer n where 0 <= n <= 420, find the sum of the ...
8
votes
4answers
488 views

Bots playing a counting game

Introduction A childhood game designed to help children learn to count in french in Canadian schools is played as follows: Students go around the room counting up to 11 A number greater than 11 ...
12
votes
50answers
3k views

Integer logarithms

Given integers N , P > 1 , find the largest integer M such that P ^ M ≤ N. I/O: Input ...
38
votes
45answers
4k views

Scrabble scorer

Challenge: Take a string of upper or lower case letters as input (optional), and calculate the score that string would get in a game of Scrabble in English. Rules: The score of each letter is as ...
21
votes
11answers
1k 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 ...
17
votes
19answers
789 views

Ordinal string check

Description : Given a string as input, check if it is a valid ordinal number in English or not. If it is valid return truthy value otherwise return falsy value. (Suggested by @Arnauld. Thanks . Also ...
13
votes
13answers
1k views

Arithmetic Cycle

Input: Integer n which is >=0 or >=1 (f(0) is ...
12
votes
8answers
759 views

Digit Occurrences

Input: A list of integers (which will never contain a zero) Output: A list of the same size with counts based on the following: If the current item is negative: Look at all items before this item, ...
26
votes
43answers
3k views

Up go the bits!

Given an integer N perform the following steps: (using 9 as an example). Receive input N. (9) Convert N from base10 to base2. (...
22
votes
29answers
2k views

Output a binary path from a number

For an integer n that satisfies n > 0, write its value as a right-descending path based on its binary representation. Rules ...
42
votes
68answers
7k views

Make an Emergency Corridor

In some nations there are recommendations or laws on how to form emergency corridors on streets that have multiple lanes per direction. (In the following we only consider the lanes going in the ...
21
votes
16answers
1k views

Interval Notations

Challenge: Input: Two integer parameters a and b (where a<b and the difference is at ...
12
votes
2answers
408 views

Egg hunting in Collatz style

Inspired by The Great API Easter Egg Hunt! Summary Your task is to search for a predetermined integer in the "Collatz space" (to be explained later) using the fewest step possible. Introduction ...
32
votes
33answers
2k views

Digits in their lanes

Input: A list of integers Output: Put each digit (and the minus sign) in its own lane, in the order -0123456789, ignoring any duplicated digits. Example: Input:...
22
votes
24answers
2k views

Ten-pin bowling score - World Bowling edition

World Bowling scoring Many people have gone to their local bowling center to play a few games of bowling, and many people continue to struggle to calculate their scores. World Bowling has introduced ...
26
votes
3answers
1k views

Golf A Free Lunch

Find a maximally profitable sequence of exchanges given an exchange rate table. As an example consider the currencies Ariary (your home currency), Baht, Cedi, and Denar where the rate from one to ...
3
votes
0answers
86 views

Print a number that number of times [duplicate]

Example Input -> 5 Output -> 55555 Input -> 12 Output -> 121212121212121212121212 Criteria Least number of bytes wins!
14
votes
30answers
1k views

Add Rainbow Pairs [duplicate]

The rules are as follows: Take in a string of integers separated by spaces. Add the first and last numbers, the second and second-last numbers, and so on. The program must output the numbers ...
14
votes
15answers
2k views

What is my exponential potential?

We'll define the N-exponential potential of a positive integer M as the count of prefixes of MN that are perfect N-powers. The prefixes of an integer are all the contiguous subsequences of digits ...
12
votes
2answers
269 views

Decompose Polynomials

Given an integral polynomial of degree strictly greater than one, completely decompose it into a composition of integral polynomials of degree strictly greater than one. Details An integral ...
40
votes
21answers
5k views

EASY to memorize numbers

Numbers that are easy to remember yet theoretically not easily made Your challenge is to make a program/function in any language that generates uniformly random numbers that fit these criteria: ...
1
vote
3answers
222 views

Finding Factorials with Gamma [duplicate]

Introduction We know that the factorial notation is valid for all natural numbers. However, Euler had extended it for all positive real numbers, as well as for complex numbers by defining a function, ...
53
votes
39answers
6k views

Compute the Kolakoski sequence

This is a repost of an old challenge, in order to adjust the I/O requirements to our recent standards. This is done in an effort to allow more languages to participate in a challenge about this ...
14
votes
18answers
915 views

Find relevant digit groupings

Recently, my reputation was 25,121. I noticed that each digit grouping (i.e. the numbers separated by commas) was a perfect square. Your challenge is, given a non-...
7
votes
5answers
372 views

Visit and exit an array

Challenge: Input: An integer n (> 0) An integer-array a of size ...
18
votes
20answers
2k views

How to print the below format in the fewest bytes?

This challenge is inspired by this, now deleted question. Take a positive integer N as input, and output a matrix with the numbers 1 .. N2 that follows the pattern below: Fill in the first row with ...
19
votes
26answers
1k views

Given a number, print out its “collective sum”

Given a number as input, print out its collective sum What is a collective sum? Consider the number 13214, the input Looping through each of the digits starting ...
-4
votes
3answers
249 views

Print the numbers -1, 0, 1 [duplicate]

This is a very simple challenge, and it is to print the numbers -1, 0, and 1. The following ...
-6
votes
45answers
873 views

Quartic Summation

Guidelines Task Given two non-negative integers, find the sum of both numbers... to the power of 4. Examples 2, 3 -> 97 (2^4 + 3^4 = 97) ...
7
votes
6answers
410 views

Convert a number to Korean

Goal You will be given a positive integer number less than 10^20. You must convert it to Korean. For example, if the input is 12345, the output should be ...
39
votes
40answers
5k views

Is there a bump?

Given a list of positive integers determine if there is an element that is either greater than its two neighbors or less than its two neighbors (a "bump"). To be clear a bump can never be the first ...
22
votes
21answers
3k views

Bertrand's Primes

Bertrand's Postulate states that for every integer n ≥ 1 there is at least one prime p such that n < p ≤ 2n. In order to verify this theorem for n < 4000 ...
12
votes
1answer
584 views

Can you outgolf Bill Gates?

Pancake sorting is the colloquial term for the mathematical problem of sorting a disordered stack of pancakes in order of size when a spatula can be inserted at any point in the stack and used to ...
14
votes
9answers
683 views

Verify Cyclic Difference Sets

A cyclic difference set is a set of positive integers with a unique property: Let n be the largest integer in the set. Let r be ...