Linked Questions

22 votes
50 answers
3k views

Count repetitions of an array

You will receive an array and must return the number of integers that occur more than once. [234, 2, 12, 234, 5, 10, 1000, 2, 99, 234] This will return 2, since ...
jayko03's user avatar
  • 509
26 votes
42 answers
3k views

Sum of a range of a sum of a range of a sum of a range of a sum of a range of a sum of

Inspired by the fact that a few related challenges to this could be answered by Vyxal in 0 Bytes using a special flag combination. Given only one input integer \$n\$, calculate \$f(n,n)\$ where $$ f(x,...
The Empty String Photographer's user avatar
31 votes
28 answers
8k views

Output a Super Mario Image

This is a problem on Luogu OJ. I decided to post it here because on Luogu OJ, many people, including me and my friend, are interested about how to solve this problem within the fewest characters. ...
TwilightSparkle's user avatar
32 votes
31 answers
4k views

Implement the divisibility-by-7 rule

To check whether a decimal number is divisible by 7: Erase the last digit. Multiply it by 2 and subtract from what is left. If the result is divisible by 7, the original number is divisible by 7. (...
anatolyg's user avatar
  • 13.9k
20 votes
37 answers
4k views

Talk interpreter

"Talk" is a baroquified accumulator-based language that is created in response to Dennis's quote on talk.tryitonline.net. ...
user avatar
16 votes
53 answers
6k views

Find the minimum and maximum integers in an array, without using builtins

Challenge Given an array of integers, received from stdin, function arguments, program arguments, or some other method: Output only the minimum and maximum numbers in the array, through a return value,...
anna328p's user avatar
  • 6,414
36 votes
26 answers
5k views

Help me sell day-old bagels

You work at a bakery and every day you make exactly 100 bagels. However your customers are not as reliable and every day a random number of bagels will be ordered. So sometimes you will run out of ...
Wheat Wizard's user avatar
  • 100k
24 votes
36 answers
3k views

Sum of two squares

Given a nonnegative integer \$n\$, determine whether \$n\$ can be expressed as the sum of two square numbers, that is \$\exists a,b\in\mathbb Z\$ such that \$n=a^2+b^2\$. ...
hakr14's user avatar
  • 5,014
32 votes
29 answers
2k views

The Lucky House

There's a minigame in Super Mario 3D World known as the Lucky House. It consists of a slot machine with 4 blocks. Each block may be one of 5 different icons (Flower, Leaf, Bell, Cherry or Boomerang) ...
Arnauld's user avatar
  • 198k
24 votes
33 answers
4k views

ASCII art uncompression from a base-n number

This is inspired by an 05AB1E answer by Magic Octupus Urn. Given two arguments, a positive integer and a string/list of characters: Translate the number to base-n, where n is the length of the ...
Jo King's user avatar
  • 47.5k
28 votes
19 answers
5k views

Leap for Leap Seconds!

Since today marks the occasion of the 26th leap second ever to occur, your challenge will be to output the date and time of every leap second in GMT or UTC that has occurred so far, as well as the one ...
mbomb007's user avatar
  • 23.5k
24 votes
25 answers
11k views

`lol` is an ambigram, `dad` isn't

Given a word, decide if it is an ambigram. When rotated: b > q d > p l > l n > u o > o p > d q > b s > s u > n x > x z > z Assume ...
Number Basher's user avatar
12 votes
48 answers
3k views

Repeat Hello World according to another string's length

This was related to a program I am writing. Although the title is simple, the challenge is a lot more complicated. Your challenge You must write a program that takes an input, and your answer must ...
SectorCorruptor's user avatar
17 votes
33 answers
10k views

Increment every number in a string

Given a string containing decimal numbers: teststring134this 123test string54 100 increment every number in this string by one to give the new string ...
the6p4c's user avatar
  • 289
52 votes
11 answers
17k views

Write an interpreter for the untyped lambda calculus

The challenge is to write an interpreter for the untyped lambda calculus in as few characters as possible. We define the untyped lambda calculus as follows: Syntax There are the following three ...
sepp2k's user avatar
  • 1,879

15 30 50 per page
1 2 3
4
5
8