0
votes
1answer
5 views

24 and 12 Hour Times

Write a program or function with no input that prints or returns this string of 24-hour and 12-hour times: 00:00 12:00am 01:00 1:00am 02:00 2:00am 03:00 3:00am 04:00 4:00am 05:00 5:00am 06:00 ...
-6
votes
0answers
70 views

Alpha beta beta pruning [on hold]

A MiniMax tree is an arborescence structure generated by an AI bi-player game to simulate the opponent turns giving notes/scores to each of, and so each turn taken by the player itself, in order that ...
11
votes
0answers
75 views

Stack Exchanging

Problem Say you have N stacks named S1 through SN, where each Sk (k = 1 to N) contains N copies of the number k. For example, when N = 3 the stacks looks like this: 1 2 3 <- top of stack 1 2 ...
0
votes
0answers
48 views

Create a 3d-like ASCII art [duplicate]

Your challenge is to convert a string to an ASCII art version of it. Input Your input is a single string, wich you should convert into the ASCII art version of it. Output Your output should be ...
-3
votes
0answers
131 views

The Hofstadter–Conway $10,000 sequence [on hold]

The Hofstadter-Conway $10, 000 sequence is defined as follows The first few terms of this sequence are: 1, 1, 2, 2, 3, 4, 4, 4, 5, 6, 7, 7, (sequence A004001 in OEIS) This sequence has many ...
10
votes
5answers
767 views

Let's build a Staircase

We don't have enough (semi-)easy challenges for beginners. More and more of the easy ones are already taken. So I tried to come up with something that might be achievable by beginners, but that isn't ...
3
votes
2answers
180 views

Golf me an ASCII Alphabet

Don't you find that reading simple text isn't appealing enough? Try our ##### ### ### ##### ##### ##### ##### # # ##### # # # # # # # # # # # # # ...
8
votes
2answers
110 views

Minimum cost block diagonalisation

Consider binary block diagonal matrices which have square blocks of 1s on the main diagonal, and are 0 everywhere else. Let's call such matrices "valid" matrices. For example, here are some valid 4x4 ...
-1
votes
0answers
41 views

Make the smallest constant check program [on hold]

First Disclaimer I am very new, and this is my first challenge and might be downvoted, or not the best. Please bear with me Task Make the smallest constant check program, with python programming ...
5
votes
1answer
100 views

Visualize Church numerals

Background Visualizing λ-calculus terms Famous lambda-juggler (and code golfer) John Tromp devised an interesting visualization of terms in the λ-calculus. In his words: abstractions (lambdas) ...
4
votes
1answer
77 views

Compute the RFC 2550 timestamp

RFC 2550 is a satirical proposal (published on April 1, 1999) for a space-efficient ASCII representation of timestamps that can support any date (even those prior to the beginning of the universe and ...
11
votes
3answers
213 views

My “keybore” is key-boring me! Help me find a minimal keystrokes

Credits to @Agawa001 for coming up with this question. Explanation My new "keybore" only has 2 buttons, namely + and -. The number in the memory starts at 0. Each consecutive press of + or - will ...
10
votes
6answers
398 views

Longest arithmetic subsequence

Given a non empty finite sequence of integers, return an arithmetic subsequence of maximal length. If there are multiple of the same maximal length, any of them can be returned. Definitions: An ...
10
votes
25answers
684 views

Alternating Sign Sequence

Introduction The sign of a number is either a +, or a - for every non-zero integer. Zero itself is signless (+0 is the same as -0). In the following sequence, we are going to alternate between the ...
4
votes
1answer
117 views

Approximate the Fransén-Robinson constant

Given an input n, output the value of the Fransén-Robinson constant with n digits after the decimal place, with rounding. Rules You may assume that all inputs are integers between 1 and 60. You may ...
23
votes
13answers
2k views

Falsify brief truths

Find the longest run of true in a list of booleans. Return the same list, with all other trues falsified. Input, output A list; any usual format (e.g., a delimited list as a string). Details True ...
-1
votes
0answers
60 views

Written Integers [duplicate]

Task is to write a program that takes an Integer and outputs it's spoken form as a String. Examples: 12 outputs twelve 416 outputs four hundred sixteen 72135 outputs seventy-two thousand one ...
8
votes
12answers
858 views

Maximum Maxima!

Inspired by this question and refined by Luis Mendo. Challenge Given a 2D matrix of integers, each row has a maximum value. One or more elements of each row will be equal to the maximum value of ...
2
votes
9answers
696 views

Generate an infinite group of infinite galaxies

Here is the challenge as proposed by @trichoplax thanks to him for consolidating my post and standarizing it to PPCG common-rules. A galaxy is a group of numbers where each one is mapped to ...
4
votes
17answers
1k views

Illiteral Prime numbers

Your challenge is to write a program (full program, not a function), that will take an integer and output all prime numbers up to (including) the given integer. Output is any readable list containing ...
5
votes
5answers
257 views

Make the lowest number square that equals n

A number square containing the values 1, 2, 3, 4 looks like this: 12 34 To work out what a number square is, you first make four numbers by reading across the rows and across the columns; for the ...
2
votes
0answers
106 views

What's so great about 1729? [on hold]

This is not a duplicate of this question. This is asking for the nth number that can be represented as the sum of two cubes in two different ways, while that is asking for the n-th number that can be ...
47
votes
24answers
2k views

Generate Wordenticons

Identicons are visual depictions of hash values, often made from symmetrical arrangements of geometric shapes. Your default Stack Exchange avatar is an identicon. This challenge is about creating ...
-3
votes
0answers
57 views

Syllable Counting Through Dictionary.com Data-mining [on hold]

Syllable counting is a natural language processing task which can be difficult to pull off without drawing from a database, and there aren't always great APIs out there as they require expensive ...
15
votes
4answers
528 views

Correct way to add numbers to get lots of 8's

Inspired by this question which was further inspired by this one, write a program which takes two integers and adds them in a unique way, by performing an OR operation on the segments used to display ...
2
votes
5answers
212 views

Is the gas lighter than air?

Air balloons need a gas that is lighter than air. However, hydrogen is flammable, while helium is not sustainable, so we need a replacement! You must write code that determines whether any given gas ...
-1
votes
12answers
818 views

Proving you are the best StackExchange-User [on hold]

Write two programs/functions: The shortest possible that returns a truthy value if given your Stack Exchange username. An obfuscated one (as explained below) that does the same thing. Rules for ...
3
votes
3answers
165 views

Surjective, Injective, Bijective, or Nothing?

Given a mapping from the integers from 1 to N to the integers from 1 to N, determine if the mapping is surjective, injective, bijective, or nothing. You may choose any character/digit for the four ...
13
votes
1answer
225 views

Parse a 1D language

Given a string containing only 0's 1's, 2's and brackets, output the grammar tree of the string. A 2 requires 2 arguments - one to the left and one to the right A 1 requires a single argument - to ...
12
votes
1answer
190 views

Convert ASCII box drawing into Unicode

I am shamelessly posting a request for something I would actually find useful. The task is to take an arbitrary ascii box drawing like this | +----+----+ | state A +---+ +---------+ | ...
14
votes
21answers
1k views

Separate alphabets and numbers

A paragraph of text has numbers and alphabetic letters mixed. Your task is to separate the numbers to the left side and the alphabetic letters to the right side in the same order of each line. ...
16
votes
20answers
3k views

Female and Male Sequences

This question is probably harder than all of those "generate a sequence of numbers" tasks, because this requires TWO sequences working in unison. Really looking forward to the answers! In his book ...
24
votes
34answers
2k views

Mean bits: an average challenge

Given an integer N >= 1, output the mean number of bits in an integer from 0 to N - 1 Specification The output can be calculated as the sum of the number of bits in the binary representation of ...
2
votes
5answers
291 views

Include a JavaScript script with JavaScript

To dynamically include a JavaScript file in a web page, you'd normally insert a <script> tag pointing to your script. For example: var js_file= document.createElement("script"); ...
1
vote
2answers
147 views

Nine Nines of Uptime

Uptime is a very important metric, as we all know, so we'd like to measure the uptime since our service was first launched. The SLA specifies an uptime of a certain number of nines, such as 3 nines ...
10
votes
0answers
186 views

Image Hide-and-Seek

In this challenge, you need to find a specific pixel within an photograph (taken with a real camera). You are passed an (R, G, B) tuple and an image, and you need to return a point (x,y) within the ...
11
votes
3answers
198 views

AppleSauce Fader

Back in the day, all the 1337 kids used text faders in chatrooms. I don't know about you guys, but I want to feel cool like they did. The only problem is that their old scripts and applications were ...
11
votes
7answers
378 views

Find a function with cycles of every length

A function is said to have a cycle of length n if there exists an x in its domain such that fn(x) = x and fm(x) ≠ x for 0 < m < n, where the superscript n denotes n-fold application of f. Note ...
16
votes
19answers
940 views

Greatest Number in a Range When The Sum of Squares of its Prime Factors are Subtracted

The formula Take for instance the number 300 The prime factors of 300 are [2, 3, 5] (unique numbers that are factors of 300 and prime) Squaring each of those numbers will give you [4, 9, 25] ...
29
votes
0answers
2k views

Deep learning Fizzbuzz [closed]

Inspired by the job-interview with Joel Grus, the goal of this challenge is to write a tensorflow (or other deep/machine learning) program that learns Fizzbuzz and correctly prints out the answers to ...
23
votes
6answers
2k views

Golf a golf-scorer

As a kid, I used to play the card game "golf" a lot. Your challenge, should you choose to accept it, is to calculate the score of a golf hand. Since there are over 9000 variations on this card game1, ...
8
votes
26answers
2k views

The Nine Pattern

Introduction I stumbled across this (useless) pattern the other day while I was watching TV. I named it "the 9 pattern" because the first number to use it was 9. The gist of it is, you enter a number ...
7
votes
7answers
221 views

Largest Distinctly Sum-Free Partition

related and inspired by -- Finding sum-free partitions A set A is defined here as being distinctly sum-free if 1) it consists of at least three elements, |A| ≥ 3, and 2) its distinct self-sum A + ...
21
votes
23answers
961 views

Divisor reduction

A divisor of a number n is any number that evenly divides n, including 1 and n itself. The number of divisors d(n) is how many divisors a number has. Here's d(n) for the first couple n: n divisors ...
7
votes
8answers
1k views

On the Subject of Passwords

In Keep Talking and Nobody Explodes, players are tasked with defusing bombs based on information from their "experts" (other people with a manual). Each bomb is made up of modules, one of which can be ...
-3
votes
0answers
82 views

Output the first character at least ten thousand times in Lazy K [closed]

In the fewest number of terms (application/parentheses are free), write a lazy K program that takes a single character of input and outputs it a fixed finite number of times which is at least ten ...
1
vote
10answers
412 views

Hi, can you draw some odd art? Bye!

Create a program that outputs "Hi, Hello!" in k bytes. By altering n bytes, the code should output all odd numbers in the range 5 <= x <= 25. Changing another m bytes should result in a code ...
30
votes
17answers
2k views

Print the nth prime that contains n

This question will be a twist on finding the nth prime number. Challenge You must write a program that will take one input n, and output the nth prime number whose decimal representation contains ...
7
votes
7answers
390 views

Get the most dominant color!

In this challenge, your task is to write a program that takes in an image and returns the most dominant color in it. Dominant color here means the color with which most of the image is covered (see ...
3
votes
2answers
131 views

Chaining Words Together

Given two words and a list as input, your program must (in as few characters as possible, of course) find the shortest way to "chain" the first word to the last using the ones in the list. Two words ...

15 30 50 per page