text stringlengths 180 608k |
|---|
[Question]
[
[Jolf](https://github.com/ConorOBrien-Foxx/Jolf) is a procedural golfing language made by @CᴏɴᴏʀO'Bʀɪᴇɴ.
What tips do you have for golfing in Jolf?
Please post one tip per answer.
These tips should be at least somewhat specific to Jolf, e.g. remove comments is an answer, but not a very good one.
... |
[Question]
[
This is a code-golf question.
**Input**
A list of non-negative integers in whatever format is the most convenient.
**Output**
The same list in sorted order in whatever format is the most convenient.
**Restriction**
* Your code must run in O(n log n) time in the *worst case* where `n`is the number of in... |
[Question]
[
Welcome to my first code-golf challenge! :) Let's hop right into it.
**Challenge:**
Given two floating point vectors, **O** (origin) and **T** (target), you have to create a program to print the values **L** and **R** to STDOUT.
1. **O** is one corner of the square
2. **T** is one corner of the square ... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/23564/edit).
Closed 6 years ago.
[Improve this question](/posts/23564/edit)
... |
[Question]
[
In this [programming-puzzle](/questions/tagged/programming-puzzle "show questions tagged 'programming-puzzle'"), your goal is to write the following function in JavaScript, using (essentially) [point-free (*tacit*) programming](https://en.wikipedia.org/wiki/Tacit_programming):
```
(f) => void(f())
```
... |
[Question]
[
Given a non-empty sequence of non-negative integers, output any permutation of it in which no two adjacent elements have a sum that is divisible by 3. If it is impossible, either crash the program, return an empty sequence, or output nothing.
**The [asymptotic time complexity must be linear in the size... |
[Question]
[
# The objective
Given a Russian text, encrypt it with Caesar cipher with key 16.
# The basic Cyrillic alphabets
The basic Cyrillic alphabets are: (U+0410 – U+042F)
```
АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ
```
By the Caesar cipher, they are mapped to:
```
РСТУФХЦЧШЩЪЫЬЭЮЯАБВГДЕЖЗИЙКЛМНОП
```
The small lette... |
[Question]
[
Given the name of a cation and anion, output "S" (soluble) or "I" (insoluble). The table we will be using is from wikipedia: <https://en.wikipedia.org/wiki/Solubility_chart>. It is copied at the end of the question for future reference.
**Input**: The cation, followed by the anion, separated by a space... |
[Question]
[
## Introduction:
Although I originally had a Dutch song in my head, where the lyrics are: "*Doe 'n stapje naar voren, en 'n stapje terug*" (which translated to "*Take a little step forward, and a little step back*"), when I searched for the full lyrics, I realized they only got back and forth, and neve... |
[Question]
[
Shuffling a deck of cards is hard for kids, so they must figure out ways to get a reasonable well shuffled deck as simply as possible.
One way to do this that gives reasonably good results is:
1. Take the top card out and insert it a random place in the deck
2. Take the bottom card out and insert it in... |
[Question]
[
*Im talking about [this question](https://codegolf.stackexchange.com/questions/103670/output-integers-in-negative-order-increase-the-maximum-integer-everytime), take a look at it if you are a bit confused.*
# Main Task
Your task is to output concatenated integers, in decreasing order, but increasing th... |
[Question]
[
There is a game I like to play. It happens on a grid of finite size (but it's wrapped, like a sphere). On that grid, a random (integer-only) point is selected. Then, I, the user, am prompted for a coordinate input. If my input matches the random point exactly, I am told that I have won. Otherwise, I am... |
[Question]
[
# Average out two lists
### Challenge
Given two lists of positive integers, determine whether it is possible to rearrange the elements into two new lists such that the new lists have the same arithmetic mean (average).
### Input
The input can be taken through STDIN or as function arguments. Input can b... |
[Question]
[
Write an infinite list of triangle codes, defined as code where the i-th line has i bytes for all lines, such that the i-th code generates (i-1)th code and has 1 more line than the (i-1)th code.
The score is the number of lines in the initial code. Lowest score wins.
For example, if
```
.
..
...
....
`... |
[Question]
[
### Description
The task of this challenge is to devise a program or function that tracks a given object in an \$n×n\$ space.
### I/O
Your program will be given 3 inputs, which may be taken [in any sensible way](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-m... |
[Question]
[
*Before you leave, you do not have to understand much musical notation to do this challenge.*
**EXPLANATION**
In standard sheet music, double clefs go across the page serving as reference points to the notes, letting you know what note should be played. If you are not already familiar with the treble ... |
[Question]
[
## Challenge
Given the formula of a chemical, output the Mr of the compound.
## Equation
Each element in the compound is followed by a number that denotes the number of said atom in the compound. If there isn't a number, there is only one of that atom in the compound.
Some examples are:
* Ethanol (C2H6... |
[Question]
[
This is my friend Thomas. He is half tree, half emoticon.
```
| |
| :D |
| |
```
He is lonely. Let's make him some friends!
---
Given a text-based emoticon as input (e.g. `‡≤†_‡≤†`, `:P`, `>_>`, not `üòÄ`, `ü§ì`, or `üê¶`), output the corresponding treemote.
A treemote's length is how many cha... |
[Question]
[
Your job will be to write a function or a program, that will take an integer `n>0` as input and output a list of the edges of the `n`-dimensional [hypercube](http://mathworld.wolfram.com/HypercubeGraph.html). In graph theory an edge is defined as a 2-tuple of vertices (or corners, if you prefer), that ... |
[Question]
[
Input a datetime, format the datetime in `YYYY-MM-DD HH:mm:ss` format using 30-hour clock time.
The 30-hour clock time works as:
* After 6 a.m., it is same as 24-hour clock time
* Before 6 a.m., it use date for previous day, and plus Hours by 24.
For more examples, you may checkout the testcases.
## Ru... |
[Question]
[
Multi-level marketing related challenge.
A peer wants to get rewarded. So it attracted `N` investors (`N>=1`), each i-th investor invested `x[i]`. When a total sum exceeds threshold `x[0]+x[1]+...+x[N-1] >= T` a peer could be rewarded. But only if a following conditions are satisfied:
* Minimum amount ... |
[Question]
[
## Introduction:
In general we usually speak of four dimensions: three space dimensions for `x`, `y`, and `z`; and one time dimension. For the sake of this challenge however, we'll split the time dimension into three as well: `past`, `present`, and `future`.
## Input:
Two input-lists. One containing in... |
[Question]
[
## Introduction:
[](https://i.stack.imgur.com/SnMxA.jpg) (Source: [Wikipedia](https://en.wikipedia.org/wiki/Rainbow))
When we look at a rainbow it will always have the colors from top to bottom:
Red; orange; yellow; green; blue; in... |
[Question]
[
Given a non-empty 2D array consisting of `0` and `1`, find the number of squares whose 4 corners are all `1`. The squares do not need to be "upright". All the rows are guaranteed to have the same length.
Reasonable input/output methods are allowed.
Testcases:
```
0001000
1000000
0000000
0000100
0100000... |
[Question]
[
What general tips do you have for golfing in [Haxe](https://en.wikipedia.org/wiki/Haxe)? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Haxe (e.g. "remove comments" is not an answer).
Please post one tip per answer.
Haxe can be run onli... |
[Question]
[
# Objective
Given a nonnegative integer, calculate its **NDos-size** as defined below, and output it.
# NDos' numeral system
The concept of NDos-size comes from the numeral system I made. It represents every nonnegative integer by a nested list, as follows:
* With the binary expansion of given nonnegat... |
[Question]
[
(Inspired by [this challenge](https://codegolf.stackexchange.com/questions/258870/generate-number-from-given-range).)
Given six real values in three pairs: \$(x\_1, x\_2), (y\_1, y\_2),\$ and \$(x\_0, y\_0)\$, where \$x\_1 < x\_0 < x\_2\$ and \$y\_1 < y\_0 < y\_2\$, create a function which maps between... |
[Question]
[
Given the signal level `L` in the range `0-4`. Your program should draw the following ASCII art.
When `L=0`:
```
....
....
.... ....
.... ....
.... .... ....
.... .... ....
.... .... .... ....
.... .... .... ....
.... .... .... ....
```
When `... |
[Question]
[
Given a variable a (non array) or (any[]) convert to (any[])
```
function example(s: string | string[]) {
const e = Array.isArray(s) ? s: [s]
return e
}
```
Is `Array.isArray(s) ? s: [s]` the shortest way?
[Answer]
## 10 bytes
```
[s].flat()
```
This works by doing a shallow flat on `[s]`. S... |
[Question]
[
# Background
In X11 (a windowing system used by a lot of Unix-like OS), what you would call the clipboard behave a bit differently than on other OSes like MacOS or Windows. While the "traditional" clipboard using ctrl+v/ctrl+c works, there is also another clipboard, called PRIMARY selection, that behav... |
[Question]
[
## using Prefixed Length Code
We are going to implement a compression of text (string, array/list of characters/bytes) by simple substitution of each character by a binary code, based on the frequency of that character in the text. The characters that occur more frequently will be replaced by shorter c... |
[Question]
[
This is an answer-chaining challenge relating to the OEIS.
Oh, the justification for this is because a company needs one program to print out their OEIS sequences real bad and they have every language.
The answer-chaining format works in the following way:
Someone posts the first answer, from which all... |
[Question]
[
[Naismith's rule](https://en.wikipedia.org/wiki/Naismith%27s_rule) helps to work out the length of time needed for a walk or hike, given the distance and ascent.
Given a non-empty list of the altitude at points evenly spaced along a path and the total distance of that path in metres, you should calcula... |
[Question]
[
Here is the code which I want to shorten.
```
n=input()
while n:
s=raw_input()
x,r,g,b=(int(x) for x in s.split())
a=x/r%2
c=x/g%2
d=x/b%2
r=((a*10+c)*10)+d
if r==0:e="black"
elif r==100:e="red"
elif r==1:e="blue"
elif r==10:e="green"
elif r==101:e="magenta"
elif r==11:e="cyan"
elif r==110... |
[Question]
[
# How to spot them
Take a positive integer k. Find its **divisors**. Find the **distinct prime factors of each divisor**. Sum all these factors together. If this number (sum) is a divisor of k (**if the sum divides k**) then, this number k, is a **BIU number**
# Examples
Let's take the number `54`
Fi... |
[Question]
[
[Taxicab Numbers](https://en.wikipedia.org/wiki/Taxicab_number) or [OEIS A011541](https://oeis.org/A011541) are the least numbers that are able to be represented as \$n\$ different sums of two positive cubed integers, for successive \$n\$.
You'll need to print out the \$n\$th taxicab number. This shoul... |
[Question]
[
Inspired by <https://puzzling.stackexchange.com/q/626>
---
In your adventures you arrive at a series of 7 bridges you have to cross. Underneath each bridge lives a troll. In order to cross the bridge, you must first give the troll a number of cakes as a percentage of the number of cakes you are carryin... |
[Question]
[
# Task
A theatre has 10 rows, labelled `A` to `J` from front to back, and 15 seats in each row,
numbered 1 to 15 from left to right.
The program uses the following rules to choose the best seats.
* Rule 1: All seats in one booking must be in the same row, next to each other.
* Rule 2: The seats must b... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Update the question so it focuses on one problem only by [editing this post](/posts/24072/edit).
Closed 6 years ago.
[Improve this question](/p... |
[Question]
[
Write a program to solve a series of linear equations as short as possible. It must solve arbitrary number of equations problems. They can inputted however you like, coefficients of augmented matrix is probably the easiest. The program doesn't have to handle non-integer coefficients or solutions. No de... |
[Question]
[
Similar to [generating minesweeper grids](https://codegolf.stackexchange.com/questions/6474/generating-minesweeper-grids), although the challenge is to make a working minesweeper grid. **This will be longer code than normal (I think)**.
[more information on minesweeper](http://en.wikipedia.org/wiki/Min... |
[Question]
[
A [knight's tour](https://en.wikipedia.org/wiki/Knight%27s_tour) is a sequence of moves of a knight on a chessboard such that the knight visits every square only once. For those who are not aware of how knights in chess work, knights are capable of moving in an L shape (see *fig. 1*). (Or a ߆ shape, o... |
[Question]
[
You work at a bakery, and every day you make pastries. You make 100 of each of several different types. However customers are less predictable. Some days they order all of one kind of pastry and you run out, some days they order hardly any and you have some left over. So your boss has made up a chart w... |
[Question]
[
Your input is the height map of a tower. The tower is made out of layers, each one being one unit shorter than the one below it. Every layer is completely on top of the previous layer. For example `[1,5,4,3,2]` is a valid input. Here is a visualization:
```
#
##
###
####
#####
15432
```
Your task i... |
[Question]
[
As a couple of people may have noticed lately, I've largely abandoned development of [Braingolf](https://github.com/gunnerwolf/braingolf) because it's boring and uninspired, and moved on to [2Col](https://github.com/gunnerwolf/2col) which is a little more interesting, and not designed to be a golfing l... |
[Question]
[
The specification of the "estimated" sign used by the European Union Directive (U+212e in Unicode, which you may not simply print for this challenge) is quite precise.
[](https://i.stack.imgur.com/8IcDt.png)
To copy some rest... |
[Question]
[
It is well known, in the field of Mathematics studying infinity, that [the Cartesian product of any finite amount of countable sets is also countable](https://proofwiki.org/wiki/Cartesian_Product_of_Countable_Sets_is_Countable/Corollary).
Your task is to write two programs to implement this, one to map... |
[Question]
[
## Introduction
Consider two strings **A** and **B** of the same length **L**, and an integer **K ≥ 0**.
For the purposes of this challenge, we say that the strings are **K**-compatible, if there exists a string **C** of length **K** such that **A** is a contiguous substring of the concatenation **BCB*... |
[Question]
[
**Warning:** This challenge contains some mild spoilers for The Secret of Monkey Island.
Towards the end of the game, you're being led through the catacombs by a magically preserved head of a navigator:

You need its eyeball necklace, ... |
[Question]
[
Write a simple program that copies itself when executed.
Your program should be some kind of executable file on Windows, Linux, etc.., should generate new executable file, which is identical to your original executable file, with random name, and quits.
Your program **shouldn't** involve any kind of fi... |
[Question]
[
## The basics:
You'll need to provide a nine-level word guessing game in the fewest characters possible (in your language of choice).
## The metrics:
* Provide a word-list
(one word per line, seperated by a
newline) (e.g.
`/usr/share/dict/words` or similar could do). It's fine to
pipe a filename or the... |
[Question]
[
The lack of a social life drove a poor nerd into inventing another superfluous esolang called `!+~%`. For no good reason it initializes the accumulator with `6` and knows the following commands:
* `!` (`out(Accu); Accu = 6`) prints the accumulator value as decimal string to stdout (without newline) and... |
[Question]
[
Lambda calculus is a system of computation based on single-argument functions; everything in it is such a function. Due to this functional nature, juxtaposition is commonly used to denote function application, grouped from left to right. For example, \$(f g) h=f g h\$ denotes what would conventionally ... |
[Question]
[
[What does "jelly" mean in the title?](https://www.cyberdefinitions.com/definitions/JELLY.html). [Robber's thread](https://codegolf.stackexchange.com/q/222478/66833)
Jelly has an "Evaluate the argument as Python 3" atom, `ŒV` which takes a string as an argument as evaluates that string as Python 3 code... |
[Question]
[
# Objective
Simulate an edge-triggered [D Flip-Flop](https://en.wikipedia.org/wiki/Flip-flop_(electronics)#D_flip-flop).
# What is D Flip-Flop?
A D flip-flop is an electronic digital device that outputs an inputted **data** (abbr. D) with synchronization to a **clock** (abbr. CLK). Usually CLK is a uni... |
[Question]
[
## Introduction
Putting all positive numbers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all positive numbers.
The first challenge in this series is to output a(n) for a given n as input, where a(n) is [A064413]... |
[Question]
[
# Introduction
A [recursive acronym](https://en.wikipedia.org/wiki/Recursive_acronym) is an acronym that contains or refers to itself, for example:
`Fish` could be a recursive acronym for `Fish is shiny hero`, notice how that also contains the acronym itself. Another example is `Hi` -> `Hi igloo`. Or e... |
[Question]
[
Consider two sorted arrays of integers \$X\$ and \$Y\$ of size \$m\$ and \$n\$ respectively with \$m < n\$. For example \$ X = (1,4)\$, \$Y = (2,10,11)\$.
We say that a matching is some way of pairing each element of \$X\$ with an element of \$Y\$ in such a way that no two elements of \$X\$ are paired ... |
[Question]
[
Given multiple sets, e.g. `s1={2,3,7}`, `s2={1,2,4,7,8}` and `s3={4,7}`, a [Venn diagram](https://en.wikipedia.org/wiki/Venn_diagram) visualizes each set by a closed curve and set elements which are either inside or outside the curve's perimeter, depending on whether they are element of the set or not.... |
[Question]
[
# Definition
A number is positive if it is greater than zero.
A number (`A`) is the divisor of another number (`B`) if `A` can divide `B` with no remainder.
For example, `2` is a divisor of `6` because `2` can divide `6` with no remainder.
# Goal
Your task is to write a program/function that takes a po... |
[Question]
[
Inspired by [this](https://codegolf.stackexchange.com/q/59299/43319) excellent challenge (from which the bulk of this text is blatantly duct-taped) – and my highschool philosophy [project](https://en.wikipedia.org/wiki/Fuzzy_logic#Define_with_multiply)...
I define the following operators:
**Fuzzy Conju... |
[Question]
[
The [Pauli matrices](http://en.wikipedia.org/wiki/Pauli_matrices) are a set of 2x2 matrices which appear very commonly in quantum physics (no, you don't need to know any quantum physics for this challenge). If we include the identity in the set, the four matrices are:
```
σ0 = σ1 = σ2 = ... |
[Question]
[
### Challenge: implement calculation of a Delacorte Number in any language. Shortest code wins.
For a given square matrix of distinct integers *1..n²* (possible side length *n* at least between 3 and 27), its Delacorte Number is the sum of the products *gcd(a, b) × distance²(a, b)* for each distinct pa... |
[Question]
[
I challenge you to write a code to make an (extended) ASCII-art logic gate diagram for the sum of products form of an equation.
Use the following notation to represent gates:
AND
```
INPUT───|&&
|&&───OUTPUT
INPUT───|&&
```
OR
```
INPUT───|OR
|OR───OUTPUT
INPUT──... |
[Question]
[
This site had a lot of problems involving implementing various languages in [interpreter](/questions/tagged/interpreter "show questions tagged 'interpreter'") tag. However, practically all of them were esoteric languages that nobody uses. Time to make an interpreter for a practical language that most o... |
[Question]
[
Your goal is to write a **flag semaphore encoder**, which will convert a given sentence into the corresponding flag semaphore characters, according to the semaphore system described on [Wikipedia](http://en.wikipedia.org/wiki/Flag_semaphore).
Assume that the input is a single sentence provided through ... |
[Question]
[
Write a program which can compress/decompress [randomly generated](http://www.lipsum.com/feed/html) [Lorem Ipsum text](http://www.lorem-ipsum.info/generator3).
Devise **your own** lossless algorithm. You may compress your data further using an existing algorithm afterwards, but you must cite the algori... |
[Question]
[
Given a year and a month, find out the percentage of work days in said
month. Work days are Monday through Friday with no regard to holidays or
other special things. The Gregorian calendar is used.
**Input**
A year and month in ISO 8601 format (YYYY-MM). The year always has four
digits, the month al... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win.
Closed 3 years ago.
[Improve this quest... |
[Question]
[
This is the cops' thread. See the robbers' thread [here](https://codegolf.stackexchange.com/questions/264048/magic-oeis-formulae-robbers-thread).
In this cops and robbers challenge, the cops will be tasked with writing an algorithm that computes some function of their choice, while the robbers will try... |
[Question]
[
## Introduction:
Every workday I read the newspaper in the morning while eating breakfast, and also do some of the puzzles at the back. When I do the word-search puzzles, I (almost) always go over the words in order, and strike them through one by one. The word-searches in the newspaper have two column... |
[Question]
[
[Euler's totient function](https://en.wikipedia.org/wiki/Euler%27s_totient_function), \$\varphi(n)\$, counts the number of integers \$1 \le k \le n\$ such that \$\gcd(k, n) = 1\$. For example, \$\varphi(9) = 6\$ as \$1,2,4,5,7,8\$ are all coprime to \$9\$. However, \$\varphi(n)\$ is not [injective](htt... |
[Question]
[
Part of [**Advent of Code Golf 2021**](https://codegolf.meta.stackexchange.com/q/24068/78410) event. See the linked meta post for details.
The story continues from [AoC2017 Day 14](https://adventofcode.com/2017/day/14).
---
To recap: The disk is a rectangular grid with \$r\$ rows and \$c\$ columns. Eac... |
[Question]
[
Everyone knows, that you can leave out the multiplication symbol (\$\times\$, or `*`) in
* `a*b`
* `23*a`
* `(2+3)*a`
* `a^(b*c)`
* `(a+b)*(c+d)`
but not in
* `2*3` => you don't want it to be 23
* `a*23` => most mathematicians just don't do it
* `a^2*b` => now it's `(a^2)*b`, if you remove the `*`, it'... |
[Question]
[
In North America, most electrical outlets/receptacles follow standards set by [NEMA](https://en.wikipedia.org/wiki/NEMA_connector). For this challenge, you'll be given a few properties of a device you need to plug in, and your program (or function) should return all of the outlets that would be compati... |
[Question]
[
\$\newcommand{T}[1]{\text{Ta}(#1)} \newcommand{Ta}[3]{\text{Ta}\_{#2}^{#3}(#1)} \T n\$ is a function which returns the smallest positive integer which can be expressed as the sum of 2 positive integer cubes in \$n\$ different ways. For example, \$\T 1 = 2 = 1^3 + 1^3\$ and \$\T 2 = 1729 = 1^3 + 12^3 = ... |
[Question]
[
Write the shortest possible program to remove all partial matched duplicates from a list and only retain the longest lines. Sort order does not matter.
For following inputs, the intent is to search for the string `reminder` followed by a number and retain the longest unique `reminder + number` lines.
#... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/188948/edit).
Closed 4 years ago.
[Improve this question](/posts/188948/edit)... |
[Question]
[
What is the best BrainFuck code (in terms of code size) to print 'A' 1000 times ?
My approach is:
* set 'A' to p[0]
* set 255 to p[1] to display 255 'A', 3 times
* set 235 to p[1] to display 235 'A'
This is not effective but I cannot find a way to use tow counters simultaneously like a multiplication
I... |
[Question]
[
Given an infix expression, determine whether all constants are of the same type.
Operators will consist only of these **dyadic** operators: `+-/*`
Your program or function should take a valid expression string as input, and output a truthy value if the constants in the expression are of the same time, ... |
[Question]
[
## 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, and count how many times the digits occurred in those other numbers
* If the current item is posit... |
[Question]
[
Now that other users have helped [Trump build the wall](https://codegolf.stackexchange.com/questions/67452/help-trump-build-the-wall), its time for you to climb it.
This is an ascii art challenge where you need to output a climbing wall with randomly placed holds.
A climbing wall is made up of panels e... |
[Question]
[
## Introduction
In this game, players use their armies to fight other players' armies, capture territories, and become the last man standing. Each turn, players receive a base number of armies to use at their disposal. By capturing territories in certain regions, however, players can increase this numb... |
[Question]
[
Write a program or function that "reacts" to a given integer *n* (input via function parameter/args/stdin)
The program doesn't care about negative numbers, likes even, dislikes odd numbers and fears the number 13.
It should output the following:
**if n<0:**
```
--------------------------
| ... |
[Question]
[
**The Problem**: Count the number of holes in a connected polygon. Connectivity of the polygon is guaranteed by the condition that every triangle in the input triangulation shares at least 1 side with another triangle and that there is only one such connected set of triangles.
Input is a list `L` of `n... |
[Question]
[
well, it's something similar to [this question](https://codegolf.stackexchange.com/questions/1570/) but with a little differences. you have to write a program to ask for width of progress bar and how much work is done. and then draw a progress bar with following features:
* width indicates how many cha... |
[Question]
[
Given a square of positive, natural numbers write a program find a horizontal and a vertical path with the sum of numbers along them being maximal. A *horizontal* path goes from the first column to the last and has to increase its column position by one in each step. A *vertical* path goes from the fir... |
[Question]
[
You want to send an ASCII letter to someone, but you need an envelope to put it in. Your task is to output an envelope given a size as input.
Rules:
* Given positive integer input `i`, your envelope will be `i` characters tall (not counting the top row), and `i*2` characters wide (not counting the side... |
[Question]
[
Given a undirected graph \$G\$ and a integer \$k\$, how many \$k\$-coloring does the graph have?
Here by a **\$k\$-coloring**, we mean assigning one of the \$k\$ colors to each vertex of the graph, such that no two vertices connected by an edge have the same color. For example, the following graph can ... |
[Question]
[
[Add++](https://github.com/cairdcoinheringaahing/AddPlusPlus) is the [Language of the Month for January 2022](https://codegolf.meta.stackexchange.com/questions/24222/language-of-the-month-for-january-2022-add), and so I'm asking for tips for golfing in it. Please stick to tips specific to Add++, and av... |
[Question]
[
## Background
[SKI combinator calculus](https://en.wikipedia.org/wiki/SKI_combinator_calculus), or simply SKI calculus, is a system similar to lambda calculus, except that SKI calculus uses a small set of *combinators*, namely `S`, `K`, and `I` instead of lambda abstraction. Unlike lambda calculus, bet... |
[Question]
[
**About geohash**
Geohash is one of many encoding systems for geographic positions. Geohash positions have some advantages. It provides a short code instead of the two usual numbers for latitude and longitude.
[](https://i.stack.imgur.com/eiF8E.png)
**The c... |
[Question]
[
As we all know, most Pokemon are created by combining some English (or Japanese) words; these words are the Pokemon's "etymology." For example, "charmander" is "char" and "salamander" put together.
Your task is, given a Pokemon's etymology and number, output the original Pokemon name. A short answer wi... |
[Question]
[
# Challenge
**Input:**
An integer \$b\$ between 2 and 62 (inclusive).
**Output:**
Count from \$1\$ to the equivalent of \$5000\_{10}\$ in base \$b\$, using any reasonable representation for the digits.
However:
* If the number is divisible by \$\lfloor b√∑2+1\rfloor\$ (rounded down, e.g base 7 would be... |
[Question]
[
[Blackjack](https://en.wikipedia.org/wiki/Blackjack), also known as twenty-one, is a comparing card game between yourself and a dealer, where each player in turn competes against the dealer, but players do not play against each other.
Play goes as follows, the dealer deals you a card. The dealer then ... |
[Question]
[
Consider the integers modulo `q` where `q` is prime, a generator is any integer `1 < x < q` so that `x^1, x^2, ..., x^(q-1)` covers all `q-1` of the integers between `1` and `q-1`. For example, consider the integers modulo 7 (which we write as `Z_7`). Then `3, 3^2 mod 7 = 2, 3^3 = 27 mod 7 = 6, 3^4 = 8... |
[Question]
[
# The challenge
Write a program or function which takes a string input as a function parameter or from stdin and determines if it is a valid [FEN](http://www.chessgames.com/fenhelp.html) string.
# Input
You can assume the input will only ever include the following characters (case sensitive)
`pkqrbnP... |
[Question]
[
Break two numbers up into their factorials; if they share any, return a falsey value. Otherwise, return a truthy value. (inspired by [this recent question](https://codegolf.stackexchange.com/q/124627/56178))
In other words, write each input number as the sum of factorials (of positive integers) in the ... |
[Question]
[
For Gregorian calendars, the date format varies from a country to another. There are three main formats recognized:
1. `YY-MM-DD` (big-endian)
2. `DD-MM-YY` (little-endian)
3. `MM-DD-YY` (middle-endian)
Your task is to write a program which, given an input string representing a date, output all the pos... |
[Question]
[
(There are related questions about [infinite sandpiles](https://codegolf.stackexchange.com/q/92251/194), and [finding identity elements of sandpiles](https://codegolf.stackexchange.com/questions/106963/find-the-identity-sandpile).)
Given a matrix of non-negative integers, return a matrix of the same di... |
Subsets and Splits
Python Q&A Count
Counts the number of questions and answers related to Python in the dataset, providing insight into the prevalence of Python content.