CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 20:44:07 GMT
content-type: text/html; charset=utf-8
cf-ray: 965ef9128d14c1ba-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=d8089c0e-1d80-4a7a-9e83-4b377ade1dbc; expires=Mon, 27 Jul 2026 20:44:07 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: b9adc9bf-9dba-41ff-912b-9d19f2d40f66
x-worker-origin-response-time: 368000000
x-dns-prefetch-control: off
set-cookie: prov=d8089c0e-1d80-4a7a-9e83-4b377ade1dbc; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=eKKDNLB2IZvH.J4J3IZEHpq4srb.L_LkbUi7MvpfR.Y-1753649047-1.0.1.1-i43rFr0yYBKSvaiVYiraByhhWw8X18GOPy7Jwsh_gRR4BvL2FEF1IT2xUua9aefuDIjoeSNrZJT99kYqPjRlmD_3J4yUr1CZxHPxFFl8bk0; path=/; expires=Sun, 27-Jul-25 21:14:07 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=N7zivd9esK7SOT7Hb0D919iDq7IN4xbcE62OJ75FZKU-1753649047820-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'open-ended-function' Questions - Code Golf Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 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 ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [open-ended-function]
For challenges where an exact output is not required but some property must still be fulfilled.
120 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
23
votes
6
answers
2k
views
Computing Pi with iF*ck
Objective
Compute \$\pi\$ using nothing but \$i\$ (\$\sqrt{-1}\$).
Guidelines
ONLY exponentiation and multiplication may be used (i.e. \$i^i\$ or \$ii\$)
No additional symbols may be used (so no ...
8
votes
18
answers
1k
views
Output five hundred different valid Roman numerals [closed]
Output any 500 different valid Roman numerals in the range 1 to 3999, in uppercase. Code golf.
11
votes
5
answers
760
views
Show order equivalence between the rationals and the binary fractions
Write a function \$f\$ which takes rational numbers and gives binary fractions (rational numbers whose denominator is a power of two) which is bijective and preserves order.
That means:
Different ...
-5
votes
7
answers
382
views
Produce 2025 in any human language, without those characters in your code
It's 2025! Write a function/program that outputs this number in words.
There are two twists:
You can write it out in (almost) any human language (including English).
None of the characters in your ...
10
votes
2
answers
241
views
Make a pretty cryptic crossword grid
Write a function/program that generates an aesthetically pleasing square cryptic crossword grid for a given size N. You do not need to include numbers.
The rules for aesthetically pleasing are:
The ...
6
votes
3
answers
622
views
Implement any rotation-invariant function on colored dodecahedrons
Each of a regular dodecahedron's 12 faces can be painted either red or blue. Your task is to implement a function \$f\$ that takes a painted dodecahedron (as 12 booleans, in whatever order and format ...
4
votes
3
answers
460
views
Operators modify in place, fix my expressions [closed]
I'm using a language "MutFk" where the basic operators like "+" and "*" actually modify the left hand side of the expression, and also return the modified version. For ...
14
votes
7
answers
896
views
Implement any 10-ary truth function with cyclic symmetry
Implement a function \$f\$ that takes 10 boolean inputs and returns a boolean.
The only requirement on \$f\$ is that it satisfies the identity
$$
f(x_1,x_2,x_3,x_4,x_5,x_6,x_7,x_8,x_9,x_{10})=f(x_2,...
33
votes
26
answers
9k
views
Print 4 billion if statements
Recently (okay, December 2023, I'm a little late) there's been a meme going around about a program checking if a 32-bit unsigned integer is even or odd using four billion if statements:
...
9
votes
10
answers
2k
views
Figure out which of your friends reveals confidential information to the media!
Exposition
You send secret information to 100 of your friends, and the next day you discover that the information has been published! Who could have revealed it?
To determine that, you number your ...
8
votes
12
answers
2k
views
Tic-tac-toe encode them all
I decided to create a complete guide to the great game of tic-tac-toe.
I expected it to be extremely popular, so to save on paper while printing it I decided to encode all possible game positions.
I ...
0
votes
4
answers
299
views
Implement a Monad
A monad is a type that wraps another type, that represents the available operations on the wrapped type. Monads have the following associated operations, where M is ...
9
votes
3
answers
269
views
Convert to Chomsky normal form
Let a context-free language be specified by its production rules and start symbol, e.g.
S -> AbB | C
C -> b | c
B -> AA | AC
A -> a | ε
Here and in the ...
5
votes
1
answer
387
views
Counterexample to Shapiro inequality
Input: A positive integer n such that n is even and greater than 12 or n is odd and greater than 23.
Output: A list of non-negative integers that violates Shapiro inequality.
Winner is shortest code. ...
11
votes
4
answers
2k
views
Output a 1-2-3-5-7... sequence
Follow-up of my previous challenge, inspired by @emanresu A's question, and proven possible by @att (Mathematica solution linked)
For the purposes of this challenge, a 1-2-3-5-7... sequence is an ...
Welcome to Code Golf and Coding Challenges Stack Exchange! This is a site for recreational programming competitions, not general programming questions. Challenges must have an objective scoring criterion, and it is highly recommended to first post proposed challenges in the Sandbox.
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
code-golf × 112
math × 38
number × 16
sequence × 16
string × 7
code-challenge × 7
number-theory × 6
array × 6
integer × 6
busy-beaver × 5
random × 5
rational-numbers × 5
permutations × 4
set-theory × 4
combinatorics × 4
binary × 4
abstract-algebra × 3
self-referential × 3
ragged-list × 3
ascii-art × 2
arithmetic × 2
graphical-output × 2
more related tags
Hot Network Questions
- Extensions of diagonalizable, respectively multiplicative-type, groups
- What Isp can be gotten from a napthalene (mothball) hot gas thruster? Did it work in space?
- A national poll of 1000 French returns 25% of "Yes". Is it enough to say that it's quite impossible locally to be 0%, if we don't know the variance?
- Partitioning heaps - Why?
- What is the parity of a neutrino?
- Film or TV series about powerful man who is banished, fishes beings he creates from ponds
- Rec Letter from Professor (who I haven't done research with) or from Work Supervisor
- How many simple groups are there of a given infinite cardinality?
- Are classified documents subject to a subpoena in discovery?
- Can you identify this aircraft landing at Llanbedr Airfield?
- Shared-Memory Queue Implementation in C
- Class for validating code in different Conda environments with PyTorch
- Anonymizing a submission for double-blind review
- Meaning of 芭蕉 in Tang age
- How should one pronounce plural French-derived German words?
- Measuring position on a system of identical particles
- Why is 0.0 printed as 0.00001 when rounding upward?
- How to change opamp variable resistor to fixed resistor?
- In Jurassic Park, is the lysine dependency intentionally fake (in-universe)?
- Why legacy paying method for ZKSync?
- What does "enter the hold at arden" mean
- Time Machine backup disk not writeable any longer
- Not being introduced to the team – should I ask for it?
- Balancing a Holy Water Bomb