text stringlengths 180 608k |
|---|
[Question]
[
For a given n, count the total number of zeros in the decimal representation of the positive integers less than or equal to n. For instance, there are 11 zeros in the decimal representations of the numbers less than or equal to 100, in the numbers 10, 20, 30, 40, 50, 60, 70, 80, 90, and twice in the ... |
[Question]
[
## Challenge
>
> Consider a square matrix of order N(N
> rows and N columns). At each step you
> can move one step to the right or one
> step to the top. How many
> possibilities are to reach (N,N) from
> (0,0)?
>
>
>
## Constraints
* Assume input will be a positive integer N satisfying 1 <=... |
[Question]
[
## Background
In the game [stick ranger](https://dan-ball.jp/en/javagame/ranger/), there is an item which grants the character the ability to get critical hits.
Each time a projectile hits an enemy, it has some probability to be a critical hit (crit). For most weapons this is calculated independently... |
[Question]
[
Your program must take an alpha/numeric input string and print it sideways (rotated 90 degrees clockwise). So for example, HI, would become:
```
#####
#
#####
#####
```
**Rules:**
The shortest code wins. For the sake of objectivity [this](http://www.identifont.com/samples/core/Pixelette.gif) will b... |
[Question]
[
# Challenge :
Your job is to find the given number `N`.
---
# Input :
You will be given a string in the following form:
```
dN ± Y = X
```
Where:
```
d, N, X, Y are all numbers with d , X , Y being integers (not decimals).
```
---
# Output :
Solve the equation and output the value of `N` rounded. Ro... |
[Question]
[
I just started reading about [friendly numbers](http://en.wikipedia.org/wiki/Friendly_number) and I think they sound great.
>
> In number theory, **friendly numbers** are two or more natural numbers with a common **abundancy**, the ratio between the sum of divisors of a number and the number itself.... |
[Question]
[
United States senators are sorted into [three classes](https://en.wikipedia.org/wiki/Classes_of_United_States_senators), based on what year their six-year term starts. Since each state has two senators, each state has a senator in two of the three classes.
Given a full state name and a class number (... |
[Question]
[
Given a necklace with color stones (yellow, white, brown, etc.) of at least two different colors, we describe that necklace using letters that correspond to each color, choosing an arbitrary starting point.
We try to answer these questions:
* How many distinct colors does the necklace have?
* What's ... |
[Question]
[
You are given a certain number of cups (`n`). You are tasked with stacking these cups into a pyramid, with each row having one more cup than the row above it. The number you are given may or may not be able to be perfectly stacked. You must write a function that takes the total number of cups (`n`), ... |
[Question]
[
For this challenge, you must accept input as a comma-separated list (columns) of a run (rows) of the first letters of any of the colors `red`, `orange`, `yellow`, `green`, `blue`, or `purple`, and output (to stdout) the HTML for a table of those colors.
This is fairly hard to understand, so I'll just... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic).
Closed 8 years ag... |
[Question]
[
Convert JSON (key/value pairs) to two native arrays, one array of keys and another of values, in your language.
```
var X = '{"a":"a","b":"b","c":"c","d":"d","e":"e","f":"f9","g":"g2","h":"h1"}';
```
The value array could be an array of strings or integers.
So we need two functions **keys** & **vals... |
[Question]
[
Write a program which accepts a sentence into stdin, and writes that sentence to stdout in pig latin.
Here are some test cases which your program should handle:
```
Input:
Read your script
Output:
ead-Ray our-yay ipt-scray
```
Hyphenation is mandatory. Note that multiple consonants at the sta... |
[Question]
[
The program must print the following block of text of LED numbers exactly.
```
+-----------------------------------------------------------------+
| |
| 000 1 222 333 4 4 555 666 777 888 999 AAA B CCC D EEE FFF |
| 0 0 1 2 3 ... |
[Question]
[
Today marks the 15th anniversary of Garry Kasparov's defeat against [Deep Blue](https://secure.wikimedia.org/wikipedia/en/wiki/IBM_Deep_Blue). Speaking of chess...
Input is a string that represents an 8x8 chess board containing only empty squares (`.`) and [queens](https://secure.wikimedia.org/wikipe... |
[Question]
[
# 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 `일만이천삼백사십오`.
# Technical details (Small)
Let's starts with simple numbers.
```
// 1 - 9
1 -> 일
2 -> 이
3 -> 삼
4 -> 사
5 -> 오
6 -> 육
7 -> 칠
8 -> 팔... |
[Question]
[
Given a "T" shape on an x \* y number grid, with length W on the top bar and H on the stem of the T, with the bottom of the T on the square numbered n: calculate the total of all of the numbers in the T shape. W must be an odd number and all must be positive integers.
Here are some examples of valid ... |
[Question]
[
In [this question](https://codegolf.stackexchange.com/q/85108/53394) Tom learned that, in general, there are many motivations to choose to include case sensitivity in his programming language, because the possible combinations for a variable name are much more than what's possible with a case insensi... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic).
Closed 10 months ... |
[Question]
[
You will write a Program which writes the Second Program.
Each program has one Input; which may be a command line argument, or be read from stdin. A Input is a single word made up of upper and/or lowercase letters (a-z)
Each program has Output; which may be to a file, or to stdout.
The Program (whic... |
[Question]
[
You are given an array A of non-negative integers. You can pick any non-empty subset, S from the array A. The score of a subset S is the sum of the elements in S raised to the power of K, i.e. for a subset S={s1,s2,…,sm}, the score of S is (s1+s2+…,sm)K. Output the sum of scores over all possible non... |
[Question]
[
I honestly don't know what the point of this sort of calculation would be, but it should make fun golfing. Shortest code wins.
## Input (in no particular order)
* An array of integers, `a` (All elements will be integers less than the length of the array.)
* An index therein, `i`
* An iteration count,... |
[Question]
[
Write a [proper quine](https://codegolf.meta.stackexchange.com/questions/4877/what-counts-as-a-proper-quine?answertab=votes#tab-top) **containing at least one newline/linefeed** whose every unfurling is either itself a proper quine or outputs the original quine. Your answer can mix and match outputti... |
[Question]
[
*this challenge was based on a sandboxed post by @dmckee*
Old fashioned cell phones were and are used heavily as texting platforms, unfortunately the keyboard has only 12 + a few buttons, and is therefor ill-suited to naive text entry.
Common solutions make use of the traditional telephone coding (ge... |
[Question]
[
**Input:**
The input will be a string of any characters.
**Output:**
the output will be an emojified (discord emojis) version of the input string. The way it will work is as so:
**Letters:** a-z (case insensitive) will become ':regional\_indicator\_**lowercase letter here**:'
e.g 'A' will become ':re... |
[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/35628/edit).
Closed 6 years ago.
[Improve this question](/posts/35628/edit)... |
[Question]
[
A [subsequence](http://en.wikipedia.org/wiki/Subsequence) is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements.
Given three strings A, B and C (note the order) as input, find the length of the longest string S such that... |
[Question]
[
The Brits aren't exactly known for being good at memorizing stuff. [That's why scientists need newspaper articles to find those who are](https://www.dailymail.co.uk/health/article-12041039/Are-super-memoriser-Scientists-release-game-hunt-Brits-exceptional-memory.html), and that's why it shouldn't be ... |
[Question]
[
# Input
A binary string \$s\$ of length \$n\$ and a positive integer \$k \leq n\$.
# Output
The number of binary strings with [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) exactly \$k\$ from the string \$s\$.
# Example outputs
Each example gives the largest possible outpu... |
[Question]
[
Inspired by [this SO answer](https://stackoverflow.com/questions/22583391/peak-signal-detection-in-realtime-timeseries-data/46680769#46680769) about peak detection.
## Background
Persistent homology is a fancy term for a fancy math concept, but in this case all we care about is how it can be used for... |
[Question]
[
Spirals are cool , so are numbers, and number spirals are even cooler. But what if I want a specific number, in a specific place using xy coordinates...
**Challenge**
Using an infinite spiral moving down first, curling in a counterclockwise manner
ex:
```
6 5 4
7 0 3
8 1 2
9 10 11
```
1. Ta... |
[Question]
[
Forget BIDMAS! Write a program that takes an equation *and* an operator precedence order, and prints the result.
Example input format:
```
1.2+3.4*5.6/7.8-9.0 */+-
```
Rules & guidelines:
* The only operators that are defined are addition (+), subtraction (-), multiplication (\*), and division (/). N... |
[Question]
[
Given a text and a number `N`, output, in a human readable format, the set of the character [N-grams](http://en.wikipedia.org/wiki/N-gram) with their respective percentages.
**The smallprint**
* The text can be read from a file, stdin, passed as string parameter to a function or any other common way... |
[Question]
[
This is a successor to a [previous challenge](https://codegolf.stackexchange.com/questions/264102/iterate-over-all-non-equivalent-strings).
# Input
An integer \$1 \leq n \leq 5\$.
# Task
Your code should produce all strings that satisfy the following properties:
* Your string should contain exactly t... |
[Question]
[
To celebrate the island's next Founder's Day, colored filters (fuchsia, chartreuse, and aquamarine\*) have been installed in every lighthouse. All lighthouses begin operation with their fuchsia filter, and they are all on the same color cycle: FCA, FCA, ... Each lighthouse changes its color filter *a... |
[Question]
[
Inspired by: [Find an Unrelated Number](https://codegolf.stackexchange.com/q/122442/38183)
---
## Challenge
Given two positive integers as input, output the mathematical operations that can be used on those inputs to generate every number from `1` to `n` inclusive where `n` is the smallest prime grea... |
[Question]
[
## Challenge
Given three numbers \$a\$, \$b\$, and \$n\$, you must expand \$(a + bx)^n\$ in ascending powers of \$x\$ up to \$x^3\$.
## Binomial Expansion
***Note that this method is an approximation***
The binomial expansion works like so:
```
(a + bx)^n = a^n(1 + bx/a)^n
= a^n(1 + n(bx/a... |
[Question]
[
**This question already has answers here**:
[Stack Exchange Vote Counter](/questions/82609/stack-exchange-vote-counter)
(15 answers)
Closed 6 years ago.
I'm a narcissist. (Not Really)
I'm also very lazy... (Not Really)
So I want to know the score of this question, and how many people have vie... |
[Question]
[
In the fewest bytes, generate the dictionary of keypresses for any letter (as described in <https://code.google.com/codejam/contest/351101/dashboard#s=p2>)
In Python, the dictionary literal itself:
```
{'a':2,'c':222,'b':22,'e':33,'d':3,'g':4,'f':333,'i':444,'h':44,'k':55,'j':5,'m':6,'l':555,'o':666,... |
[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/11404/edit).
Closed 2 years ago.
[Improve this question](/posts/11404/edit)... |
[Question]
[
**This question already has answers here**:
Closed 11 years ago.
>
> **Possible Duplicate:**
>
> [Integer to string with given radix](https://codegolf.stackexchange.com/questions/536/integer-to-string-with-given-radix)
>
>
>
This question is inspired by Pythons builtin `int` function. `in... |
[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/5522/edit).
Closed 5 years ago.
[Improve this question](/posts/5522/edit)
... |
[Question]
[
I have string \$s\$ of length \$n\$ and some constant integer \$k\$ which is at most \$n\$. Give the fastest algorithm to sample a random string with [Levenshtein](https://en.m.wikipedia.org/wiki/Levenshtein_distance) distance \$k\$ from \$s\$ uniformly.
Your algorithm should output any of the string... |
[Question]
[
## Introduction
In the prisoner's dilemma, two partners in crime are being interrogated, and have the choice to either *betray* their partner or stay silent.
* If both prisoners betray each other, they both get 2 years in prison.
* If neither betrays (both stay silent), they both get 1 year in prison... |
[Question]
[
The [**least** weird fact about the US presidency](https://xkcd.com/2046/) right now is that there have been two unrelated presidents whose last names start with T-R-U-M.
That made me think, how many US presidents share other combinations of characters? There are obviously two presidents that share t... |
[Question]
[
A recent [question](https://mathematica.stackexchange.com/questions/38076/how-to-plot-a-figure-like-this) showed how Mathematica could be used to make a beautiful optical lattice clock image. The image looks like this.

This challeng... |
[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/8405/edit).
Closed 6 years ago.
[Improve this question](/posts/8405/edit)
... |
[Question]
[
## Task
>
> Given a list of integers *a1, a2, …, ak* (*k* ≥ 2) and a positive integer *m*, write a function or a complete program that calculates the next *m* numbers of the list. Assume that *ai = P(i)* where
>
>
> *P(x) = bk-1 xk-1 + bk-2 xk-2 + … + b0*
>
>
> is the unique polynomial of minimu... |
[Question]
[
When you roll a die, you have a 6:1 chance of any given option.
There's a bookmaker taking bets on die rolls. He owns £20 at the start of the game.
The bookmaker offers odds of 4:1, but gamblers take it, because there's money on offer.
There are 10 gamblers. A, B, C, D, E, F, G, H, I, and J. Each gam... |
[Question]
[
your task is to write a program that uses the Lucas-Lehmer primality test to check whether an input number is prime or not. This prime number candidate has the form `2p-1` with p being prime. (Mersenne prime number)
## The Lucas-Lehmer-test
The n-th Mersenne number is prime if it is a divisor of the ... |
[Question]
[
*I'd like to start a series of challenges for <http://box-256.com/> starting with the first challenge, “BIG SQUARE II”. After this one I'll add another for "CHECKERBOARD" and so on.*
[](https://i.stack.imgur.com/RKM5J.png)
**Rules**:... |
[Question]
[
Problem: given any input string that does not contain null bytes, determine whether or not the input string matches glob as defined below:
```
null is disallowed in both string in glob
* matches zero or more characters
** is disallowed in glob
? matches exactly 1 character
[ch] matc... |
[Question]
[
When playing the piano, I realized that to play a chord right, I usually need to remember just which tones of the chord are played on white and which on black keys. The rest is usually handled by the "autopilot".
Let's write a program that given a [7th chord](http://en.wikipedia.org/wiki/Seventh_chor... |
[Question]
[
A [Euler Brick](http://en.wikipedia.org/wiki/Euler_brick) is a cuboid where the length of all the edges are integers and all of the diagonals of the faces are integers as well. All sides must also be different.

Your program has to find as many different Euler ... |
[Question]
[
I want you to write a program that outputs a trigonometry circle like the one below. I also want you to animate this circle, having the sine line move along the circumference with the other lines move around it. **The minimum number of *unique* frames is 5. Any lower and your entry will not be counte... |
[Question]
[
# Challenge
Display Inky the ghost from Pac-Man using only [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code).
[](https://i.stack.imgur.com/IF6yj.png)
Here's a text representation of the image
```
B B B B B C C C C B B B B B
B B B C C C... |
[Question]
[
Your task here will be to write a very dumb AI capable of fetching all treasures on a map.
## Map
The map is defined as follow: (`artist-mode`™-powered)
Basic case:
```
+-+-+-+-+-+-+-+-+-+-+-+-+-+
|P| | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-... |
[Question]
[
There has not been a challenge regarding slope fields, as a far as I can tell. So, I might as well make one.
# The challenge
Given:
* A [black box function `f`](https://codegolf.meta.stackexchange.com/questions/1324/standard-definitions-of-terms-within-specifications/13706#13706) which takes two arg... |
[Question]
[
You are to write a program that takes a list of strings as input. For every string in the list you are to determine the smallest **N** such that no other string in the list begins with the same **N** characters as the string in question. Now compose a new list with all these strings. Here is an examp... |
[Question]
[
## Challenge
Given a list of keys and values, and a target `n`, return all sets of keys where the sum of their values equals or exceeds `n`.
## Input
Input will be like this:
```
[["Part 1", 20], ["Part 2", 15], ["Part 3", 14.75], ["Part 4", 3]], 30
```
Input consists of a list with keys (which can b... |
[Question]
[
This question is the inverse of [this one](https://codegolf.stackexchange.com/questions/48117/convert-a-string-to-its-r%C3%B6varspr%C3%A5ket-equivalent) by [James Williams](https://codegolf.stackexchange.com/users/25274/james-williams).
---
## Rövarspråket
[Rövarspråket](http://en.wikipedia.org/wiki/... |
[Question]
[
*This code-challenge is related to the code-golf question [Analyzing Collatz-like sequences](https://codegolf.stackexchange.com/questions/47221/analyzing-collatz-like-sequences) but the goal is quite different here.*
*If you are familiar with Collatz-like sequences you can skip to the section "The ta... |
[Question]
[
**Task**
You have a row of numbered boxes, with some filled with items and some empty. Your job is to output the number of boxes from the first to the last box, inclusive, minus the number of boxes of the largest gap between two filled boxes.
**Rules**
Your program should handle up to 1000 boxes. Sco... |
[Question]
[
This challenge has been divided into parts.
Your goal is to convert a sentence into a form of 'short-hand'
## For Part 1 these are the rules
1. Take in 1 word
2. Remove all vowels(a,e,i,o,u), except the ones at the beginning and the end
3. If a letter is repeated more than once consecutively, reduc... |
[Question]
[
I am trying to push my limits of making a python code as short as possible.
>
> I left the readability part way behind.
>
>
>
I was attempting the [**K-Goodness String** problem](https://codingcompetitions.withgoogle.com/kickstart/round/0000000000436140/000000000068cca3) from Round A of Google Ki... |
[Question]
[
This challenge was inspired by [Yeah But No But Yeah](https://codegolf.stackexchange.com/q/172036/55735).
---
[maxb](https://codegolf.stackexchange.com/users/79994/maxb)´s colleague recently sent him the following piece of JavaScript as a joke:
```
let butScript = (nrOfButs) => {
for(var i = 0; i... |
[Question]
[
Create a routine to calculate the position of each unit of a clock with an arbitrary number of units (minutes, hours, half-days, days, years, parsecs, quarter-quells, etc), where each unit can be equally sub-divided into an arbitrary number of sub-units; *after* `n` base units have elapsed.
Basicall... |
[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/16789/edit).
Closed 6 years ago.
[Improve this question](... |
[Question]
[
Your task is to output a spaceship of size `n` with shooters/guns and `n` bullets of character `-` (with spaces in between each bullet) for each gun
# Rules
* If `n` is odd, you must output the guns every even numbered row
* If `n` is even, you must output the guns every odd numbered row
* All rows w... |
[Question]
[
# Your task
Given a *simple* regular expression, you have to count how many strings of length `n` have a match of length `n` with the given *simple* regex. This will just be a subset of regexs. Like, no lookaheads or named groups or recursion or whatever weird things regexs have.
# Simple regular exp... |
[Question]
[
Influenced by [Non-discriminating Programming](https://codegolf.stackexchange.com/questions/156967/non-discriminating-programming), I made up an idea of a similar challenge.
Here, we say a string is a Lucas string if the number of appearances of each character is a Lucas number (2, 1, 3, 4, 7, ...), ... |
[Question]
[
**This question already has answers here**:
[Draw an alphabet party hat](/questions/97456/draw-an-alphabet-party-hat)
(51 answers)
Closed 3 years ago.
I know it's 1.5 weeks after Christmas but trying to print an isosceles triangle in a monospaced font makes it look weird.
# Challenge
Print the... |
[Question]
[
## Goal
Your goal is to find the *simplest* value in an open interval. In other words, given two values `a,b` with `a<b`, output the simplest `x` with `a<x<b`. This is a code golf, so fewest bytes wins.
## Simplicity
All values in this problem are [dyadic rationals](http://en.wikipedia.org/wiki/Dyadi... |
[Question]
[
**Input** 5 integers: Landmark `X` & `Y`, Starting Point `X` & `Y`, and View Distance Radius `D`
**Output** 1 double: % chance of coming within `D` of Landmark (`X`,`Y`) ("seeing") when walking straight in a random direction from Starting Point (`X`,`Y`).
Assume that "random direction" shall be a dir... |
[Question]
[
**Puzzle:** Find a deck of *c* cards, each containing *p* pictures, such that no two pictures match on a given card, and exactly 1 picture on each card matches exactly 1 picture on each of the other cards, where the number of unique pictures in the deck is minimized.
**Criteria:** Fastest code for *c... |
[Question]
[
## Overview
As most of y'all who visit chat know, I am Russian by ethnicity[citation not needed]. Recently, I switched from a keyboard that maps the letters 1-to-1 (mnemonic) to Windows' default mnemonic keyboard. Here are the letter mappings:
```
"`" -> "ъ"
"q" -> "я"
"w" -> "ш"
"e" -> "е"
"r" -> "р... |
[Question]
[
Given an input of a string, output the partial fraction in string form.
The partial fraction decomposition of a rational fraction of the form \$\frac{f(x)}{g(x)}\$, where \$f\$ and \$g\$ are polynomials, is its expression as:
$$\frac{f(x)}{g(x)}=p(x)+\sum\_j\frac{f\_j(x)}{g\_j(x)}$$
In this case \$p\... |
[Question]
[
Adapted from [Tips for restricted source in Python](https://codegolf.stackexchange.com/questions/209734/tips-for-restricted-source-in-python)
---
Just like [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), [restricted-source](/questions/tagged/restricted-source "show quest... |
[Question]
[
Let's assume we've got an imaginary assembler. The assembler supports numerical labels. An infinite loop example:
```
:1
jmp 1
```
Your task is, to write a preprocessor for this assembler supporting named labels (instead of numerical ones; with up to 8 characters in length), so the label name is ... |
[Question]
[
# Introduction
Brainstract, a newly created dialect of [Brainfuck](https://esolangs.org/wiki/Brainfuck) adds a bit more elements to the syntax. In addition to the normal Brainfuck syntax, there are macros. To define a macro:
```
{macro_name ++++}
```
Then use it:
```
{macro_name} Adds 4 to the curren... |
[Question]
[
This time, we want render the count of bytes in a human readable way to user. Let's write a program (a full one or a function or other acceptable formats) to do this.
## Input
An non-negative integer, in range \$0\leq n<2^{31}\$, which means n bytes.
## Output
A string, the human friendly representat... |
[Question]
[
The objective is to print a graph from an array of numbers, of the design below. Printing the X and Y scale exactly as in the "design", with padding, is part of the challenge. The input array of numbers can be of virtually any range of integers in X and Y, but not 0 and not negative - though I would ... |
[Question]
[
Based on a recent [question in StackOverflow](https://stackoverflow.com/q/37173914/6188402)
Write a program/function that takes in one ARRAY/list and returns the number of pair-values which sums up to a given TOTAL.
### Explaining
```
TOTAL=4, ARRAY=[1,3,7,1,-3] => RESULT=2
```
The result was 2 becau... |
[Question]
[
Imagine you have an infinite sequence of the alphabet repeated infinitely many times:
```
abcdefghijklmnopqrstuvwxyzabcd...
```
You start at index `0`, which corresponds to the letter `a`, and the `should_write` boolean flag is `False`.
The input is a list or string of single-digit numbers. For each ... |
[Question]
[
# The Challenge
Create a program that brute-force\* decodes the MD5-hashed string, given here:
`92a7c9116fa52eb83cf4c2919599c24a` which translates to `code-golf`
# The Rules
1. You may *not* use any built-in functions that decode the hash for you if
the language you choose has such.
2. You may *not* ... |
[Question]
[
**From now on considering the word "fuck" to be non-profane would be a good idea**
Make the smallest compiler or an interpreter for the Brainfuck variant, Boolfuck. It has to be executable in Windows, DOS, or a Unix operating system (so Linux, Mac, OpenBSD etc). Boolfuck is very similar to Brainfuck,... |
[Question]
[
Write a program which prints the sequence of prime numbers. The shortest solution wins!
All numbers must have a unary representation (not just in the output, but throughout the entire program). This could be a string of 1s, a list of 1s, Peano-style objects, etc.
No particular output format is requir... |
[Question]
[
In this challenge we are going to consider lists of integers such that for every member \$x\$ at index \$i\$ then the indexes \$i+x\$ and \$i-x\$ have the value \$x+1\$ or are out of bounds for the list. We will call these trampoline lists.
If we play around with these for a while we can notice that ... |
[Question]
[
*This challenge requires integration with C, so you can stop reading if you're not interested.*
Matrix multiplication is a simple operation, but the performance depends a lot on how efficiently the code is written.
Let's compute `m = x * y`. The following code is the implementation of the textbook al... |
[Question]
[
The narcissist is a program which, given its own source as input, prints a truthy value and, given anything other than that, prints a falsey value. Today, we're reversing this.
Create a program that, given the name of whatever your language's truthy value is (True, true, 1), prints its own source. Gi... |
[Question]
[
### Task
Given is a square matrix of any dimension and any integer `n`.
Output all possible matrices(without duplicates) by removing columns and rows from the input matrix such that the determinant of these new matrices is `n`.
### Rules
Output should include original if determinant of original is `n... |
[Question]
[
This is a CC-BY-SA challenge from the [CCSC Mid-South Programming Contest 2018](https://ccsc18.kattis.com/).
**Author(s):** Brent Yorgey
**Source:** Consortium for Computing Sciences in Colleges Mid-South Programming contest 2018
<https://ccsc18.kattis.com/problems/ccsc18.mountainrange>
---
>
... |
[Question]
[
I'm new to ES6 and code-golfing. Here's the original function:
```
function puzzle(n, x) {
return n * Math.pow(2, x);
}
```
And here's what I have so far:
```
let puzzle=(n,x)=>n*2<<(x-1)
```
But the solution requires lesser characters. I went through the 'Code Golfing with ES6' thread, but couldn'... |
[Question]
[
Given an integer k and a list of integers A of size n, find the product of all subsets in A of size k and sum them together.
For example,
```
k = 2
n = 4
A = 1 2 3 4
```
The subsets of size 2 and their products are
```
1 2 = 2
1 3 = 3
1 4 = 4
2 3 = 6
2 4 = 8
3 4 = 12
```
which sum together to 35.
Som... |
[Question]
[
[Related](https://codegolf.stackexchange.com/questions/265114/sums-of-sum-of-divisors-in-sublinear-time).
Given a number \$n\$, Euler's totient function, \$\varphi(n)\$ is the number of integers up to \$n\$ which are coprime to \$n\$. That is, no number bigger than \$1\$ divides both of them.
For exa... |
[Question]
[
## Task
A *pure mirror checkmate* is a checkmate position, where the mated king is surrounded by **8** empty squares which are attacked or guarded by the winning side ***exactly* once**. You will be given a valid chess position where Black is in mate. Your task is to find if that mate is a *pure mirr... |
[Question]
[
If you convert a chemical formula to lower case, it may become ambiguous: `co` can be both `CO` or `Co`.
Given an input consisting of `a-z0-9`, where `0` can only stand behind `0-9`. Check whether it's ambiguous, unambiguous, or impossible. Return 3 different values for them. Shortest code wins.
Exam... |
[Question]
[
**Introduction**
This is a web scraping Code Golf challenge that attempts to take stock Name and price columns from the 'Most Active' list on this [New York Times URL](https://markets.on.nytimes.com/research/markets/overview/overview.asp).
**Why is this challenge interesting?**
Challenge:
Scrape thes... |
[Question]
[
Do you know [Icy Tower](https://en.wikipedia.org/wiki/Icy_Tower) ? Here is a [gameplay example](https://www.youtube.com/watch?v=TmyRdsuXdd0) of what i'm talking about
The game concept is simple : you play as Harold the Homeboy, and your goal is to jump from floors to floors to go as high as possible ... |
[Question]
[
Given a date, output the X and Y position of the current day of the date on a digital calendar. The digital calendar is sort of the calendar that gets shown when you click on your computers clock (at least on windows), and it looks something like this:
[![Digital Calendar for September 2017](https://... |
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.