text stringlengths 180 608k |
|---|
[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/6500/edit).
Closed 7 years ago.
[Improve this question](/posts/6500/edit)
... |
[Question]
[
Write a series of programs in the *same language* that print “Hello, world!” using n distinct source characters, where n is in [1..10] inclusive (“distinct” meaning that duplicate characters are ignored from character count). The winner is the solution with the most programs, each with distinct n. I ... |
[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/209980/edit).
Closed 3 years ago.
[Improve this question](/posts/209980/edi... |
[Question]
[
# Description :
Given a string of space separated binary digits or space separated booleans or an array of binary digits or array of booleans . Your job is to find the xor of each until you end up with one answer either 0 or 1. The inputs will always be valid and will only be either 0 or 1.
# Example... |
[Question]
[
**This question already has answers here**:
[Code close to the challenge: Sum of integers](/questions/53604/code-close-to-the-challenge-sum-of-integers)
(34 answers)
Closed 8 years ago.
So, ~~blatantly plagiarizing from~~ inspired by [this challenge](https://codegolf.stackexchange.com/question... |
[Question]
[
I'm solving problem: in file "a.in" given the number N - length of the number consists of ones. Need to gets square of it, and put this in file "a.out". This is my shortest solution(150 bytes):
```
char s[1<<27];j;main(i,n){for(fscanf(fopen("a.in","r"),"%d",&n),i=n*=2;--i;j+=i<n/2?i:n-i,s[i-1]=48+j%1... |
[Question]
[
# Background
We define the prime-counting function, \$\pi(x)\$, as the number of prime numbers less than or equal to \$x\$. You can read about it [here](https://en.m.wikipedia.org/wiki/Prime-counting_function "Prime-counting function on Wikipedia").
For example, \$\pi(2) = 1\$ and \$\pi(6) = 3\$.
It ... |
[Question]
[
**This question already has answers here**:
[Produce the word 'codegolf' without using any of its characters in code [closed]](/questions/42350/produce-the-word-codegolf-without-using-any-of-its-characters-in-code)
(28 answers)
Closed 8 years ago.
# Goal
Your goal is to write "Code Golf" witho... |
[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/187528/edit).
Closed 4 years ago.
[Improve this question](/posts/187528/edi... |
[Question]
[
It is only Tuesday, ugh. I deserve a treat. Golf me a Castle. The Least amount of bytes wins!
Taken no input and output this image exactly:
```
/\ /\
/ \ / \
---- ----
| |^^^^^^^^^| |
-----------------
| _ |
| | | | | |
| | | |
```
### Edit
[... |
[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/25045/edit).
Closed 9 years ago.
[Improve this question](... |
[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 9 years ago.
[Improve this que... |
[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/127980/edit).
Closed 6 years ago.
[Improve this question](/posts/127980/edi... |
[Question]
[
Your job is to output the html of the current version (at the time of this writing) of the Wikipedia page for Kolmogorov complexity: <https://en.wikipedia.org/w/index.php?title=Kolmogorov_complexity&oldid=781950121&action=raw> ([backup](https://gist.githubusercontent.com/anonymous/826ffbc9c86501f86db... |
[Question]
[
**This question already has answers here**:
[Convert a number to Hexadecimal](/questions/68247/convert-a-number-to-hexadecimal)
(32 answers)
Closed 8 years ago.
## Challenges
You need to do a program that outputs the input string to hexadecimal!
For each character in the input string, convert ... |
[Question]
[
**This question already has answers here**:
[Count the divisors of a number](/questions/64944/count-the-divisors-of-a-number)
(68 answers)
Closed 3 years ago.
Create a function which takes in a input integer and then returns the number of factors it has, like if you pass `25` then it will retu... |
[Question]
[
Target:
Write a `floor()` function from scratch.
Manipulating like converting float to string, and cutting all after dot are allowed.
All languages are allowed.
Any usage of built in language functions (like `toInteger()`) or similar is not allowed, casting operators are not allowed.
So, your task is... |
[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/79938/edit).
Closed 7 years ago.
[Improve this question](... |
[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/69327/edit).
Closed 8 years ago.
[Improve this question](... |
[Question]
[
Make a [cat program](https://esolangs.org/wiki/Cat_program), with a catch. The program must refuse under all circumstances to output "Hello World", instead outputting "Goodbye World", with matching spacing (but matching casing is not required).
"Hello World" must never appear as a substring of the ou... |
[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/42350/edit).
Closed 7 years ago.
[Improve this question](... |
[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/22492/edit).
Closed 9 years ago.
[Improve this question](/posts/22492/edit)... |
[Question]
[
This is a **code-golf**, so keep your code small!
The **objective** is to create a function that receives 3 arguments:
* **Rows**(int): The max number of an item in each array;
* **Cols**(int): The max number of dimensions (sub-arrays);
* **Val**(\*): The starting value in each item;
This function sh... |
[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 8 years ago.
[Improve this que... |
[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/160781/edit).
Closed 5 years ago.
[Improve this question](/posts/160781/edi... |
[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/121796/edit).
Closed 6 years ago.
[Improve this question](/posts/121796/edi... |
[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/86778/edit).
Closed 7 years ago.
[Improve this question](/posts/86778/edit)... |
[Question]
[
**This question already has answers here**:
[Simple cat program](/questions/62230/simple-cat-program)
(330 answers)
Closed 5 years ago.
# Challenge
Your challenge is to make a simple program that takes the [input] and formats it as "Hello, [input]!"
## Input
Either a function call variable or ... |
[Question]
[
You will take a set of input numbers, and output the minimum and maximum of the set. You can either write two programs, with 1 program doing each function, or one combined program.
Here's an example in Perl, 50 and 42 bytes (92 total):
Max:
```
sub mx {return ( reverse sort {$a <=> $b} @_ )[0]}
```
M... |
[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/206711/edit).
Closed 3 years ago.
[Improve this question](/posts/206711/edi... |
[Question]
[
<https://www.youtube.com/watch?v=6vAhPeqlODg>
Ok—jig's up—this one's only related to smash in name, but it'll give you something to burn your time with while you wait 'til December 7th
Given a color string `s` of form `#rgb`(in hex, so #000000 to #ffffff, dont worry about the three digit ones: ~~... |
[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 9 years ago.
[Improve this que... |
[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/214731/edit).
Closed 3 years ago.
[Improve this question](/posts/214731/edi... |
[Question]
[
I'm looking for the shortest code to generate the following sequences:
```
Sequence A
i | y x
0 | 0 0
1 | 0 1
2 | 1 0
3 | 1 1
```
The best I have is `x = i % 2, y = i / 2`, there is probably no beating that. Those are coordinates of corners of a box in 2D, but they are not in a good order for drawing... |
[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/162859/edit).
Closed 5 years ago.
[Improve this question](/posts/162859/edi... |
[Question]
[
### Objective
Write a program that outputs some printable ASCII characters. The trick is that if the program is reversed byte-by-byte, it must output the same thing in the reverse order, byte-by-byte, too.
### Rules
* No standard loopholes.
* The program must **not** be a palindrome, nor can it be 1 ... |
[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/21758/edit).
Closed 7 years ago.
[Improve this question](/posts/21758/edit)... |
[Question]
[
## Challenge
You must choose one number `x` (`y = x + 9`) and create ten unique programs which each print out one of the numbers in the range `x` to `y` inclusive. However, there are three twists:
* Each program's score is the difference between length of your program in bytes and `n` (where `n` is t... |
[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/11997/edit).
Closed 7 years ago.
[Improve this question](/posts/11997/edit)... |
[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/63519/edit).
Closed 8 years ago.
[Improve this question](/posts/63519/edit)... |
[Question]
[
# Introduction
In most interpreted languages, there is an operation that will run code generated at runtime. It generally requires alphanumeric characters to refer to this operation. Write a program, using as few alphanumeric characters as possible, that is able to download and execute any string in ... |
[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/75899/edit).
Closed 7 years ago.
[Improve this question](... |
[Question]
[
**This question already has answers here**:
[Implement Minceraft](/questions/224365/implement-minceraft)
(91 answers)
Closed 2 years ago.
# Your task
Randomly pick and print "Joe Mama" or "Joe Biden" in as little bytes as possible.
## Rules
* No trailing lines, spaces, or anything else weird l... |
[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/134960/edit).
Closed 1 year ago.
[Improve this question](/posts/134960/edit... |
[Question]
[
It's easier to put this into coding terminology, so here we go:
1. First find the average, median, mode, and range.
2. Then, put those values in another array, then find the new average, median, mode, and range.
3. Bonus -10 bytes (yeah, negative bytes, because there's already answers) for programs t... |
[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 2 years ag... |
[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 8 years ago.
[Improve this que... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This site is for programming contests and challenges. **General programming questions** are off-topic here. You may be able to get help on [Stack Overflow](http://stackoverflow.com/about)... |
[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 9 years ago.
[Improve this que... |
[Question]
[
Create A "Hello, World!" program but without any vowels. Winner is the program with the least bytes.
**Rules:**
* No vowels are allowed in the code.
* Must print to STDOUT
* Must be a full program.
* Submissions are measured in Bytes
Any language goes as long as there aren't any vowels
Edit:
Y is onl... |
[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/133332/edit).
Closed 6 years ago.
[Improve this question](/posts/133332/edi... |
[Question]
[
A prime number is a positive integer that has exactly two divisors 1 and the number itself. For example number 7 is a prime since it is divisible by 1 and 7. Number 1 is not a prime since it has only one divisor. Write a program or function that produces all even prime numbers.
This is a code golf ch... |
[Question]
[
For this challenge, the objective is to take a list of integers, and output the sum of every unique integer in that list, i.e. count multiples of the same integer only once.
Your input will be a string in the format `"{1,2,3,4}"` with any amount of elements. The string will never have whitespace or... |
[Question]
[
This question was profoundly inspired by [Joe Z's question](https://codegolf.stackexchange.com/questions/17005/produce-the-number-2014-without-any-numbers-in-your-source-code?answertab=active#tab-top).
But, with a twist...
So, now that it's almost 2017, it's time for a code question involving the num... |
[Question]
[
**This question already has answers here**:
[Minecraft Mirrored](/questions/53925/minecraft-mirrored)
(24 answers)
[Are my eyes open or closed?](/questions/79053/are-my-eyes-open-or-closed)
(7 answers)
Closed 7 years ago.
You are trying to guess my emotion.
I will give you an adjective, as ... |
[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 que... |
[Question]
[
Your challenge is to write a program or function to output [this](https://pastebin.com/MX3Sjirk) sequence of numbers.
Output requirements:
* Must contain numbers specified above
* Must be in order as specified
* Numbers must be delimited by whitespace
Shortest code in bytes wins.
[Answer]
# Py... |
[Question]
[
You are trying to guess my emotion.
I will give you an adjective, as the input to the function/program.
Your task is to output the state of my eyes, either `O_O` for open, or `._.` for closed.
# Details
For these adjectives, you must output open eyes `O_O`
```
animated
breezy
brisk
driving
enterprisi... |
[Question]
[
Given integers 0<x<10106 and 0<n<106, work out x(1/n) under 15 seconds(TIO or your computer), 1GB memory. You can assume the result is integer smaller than 50000.
Shortest code in bytes in each language win.
Sample:
```
x n result
121 2 11
123 1 123
1024 10 2
```
A larger sam... |
[Question]
[
### Introduction
We all love StackExchange, therefore it would be essential to download all gems hidden on Stack Overflow repositories in the simplest possible way.
### Challenge/Task
Your task is to write a script or program which would:
1. Fetch the list of all (within current page) repositories un... |
[Question]
[
The aim is to create an algorithm to detect that one of the string in a small list of strings contains `%s`, `%d`, `%f`, or `%r`. All sub-string will start by '%' and be 2 characters longs. Input string will be from 1 to 500 characters with a median of around 20 characters and contain zero to multipl... |
[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/55027/edit).
Closed 8 years ago.
[Improve this question](/posts/55027/edit)... |
[Question]
[
**This question already has answers here**:
[Obfuscated Hello World](/questions/307/obfuscated-hello-world)
(145 answers)
Closed 10 years ago.
The challenge is to write the string `hello world` to your processes standard output, using as few characters of code as possible.
The following restri... |
[Question]
[
Write code to generate a PDF file containing 6 bingo cards. Winner is the one that uses the shortest code and needs no actions except for installing a library and running the code. (No Save As PDF). Rules are as follows.
* The generated PDF file should display accurately in Adobe's PDF reader, Google... |
[Question]
[
Using the shortest JS (ES5) code possible, as measured in number of characters, gather all the ids on a page for `foobar` elements into a comma-delimited string. For example:
```
<div>
<foobar id="456"></foobar>
<foobar id="aaa"></foobar>
<foobar id="987"></foobar>
<div>
```
Should give `"456,a... |
[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/259321/edit).
Closed 11 months ago.
[Improve this question](/posts/259321/e... |
[Question]
[
So what might be the shortest language for this simple task?
## Task:
You are given an input of type `String` - the string is a `valid` hexadecimal number (`[0-9A-F]`).
Convert it to a decimal number and print it to the console.
## Tests:
```
HEX -> DEC
1 -> 1
98 -> 152
539 -> 1337
1337 -> 4919
A5F9... |
[Question]
[
Write a script, program or function which takes one input of type string and outputs or returns some sort of indication wether the input string was 'hi whats up' (without the apostrophes) or not.
You can for example return true if it was and false if it wasn't. Or print something to the screen, like ... |
[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/194324/edit).
Closed 4 years ago.
[Improve this question](/posts/194324/edi... |
[Question]
[
You have to write a program, if its source code is reversed, then it will error.
For example, if your source is `ABC`, then reversing it and writing `CBA` should crash/throw an error. And `ABC` itself should be a vaild program (I mean your primary source should be a valid program). Output of the main... |
[Question]
[
It's strange this question hasn't been asked yet, so here it is:
**Calculate the length of a string given through STDIN**
## Rules
* As said, your string will be given through STDIN, not via command line arguments
* Print the length of the string to STDOUT
* Only ASCII chars will be given, **and all ... |
[Question]
[
## Challenge
Given two numbers, output their quotient. In other words, integer divide one number by another.
Both divisor/dividend will be under 10001. Division must be performed using integer division, rounding down.
Here are some example inputs and outputs:
```
5 1 5
-4 2 -2
... |
[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/172511/edit).
Closed 5 years ago.
[Improve this question](/posts/172511/edi... |
[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/58597/edit).
Closed 7 years ago.
[Improve this question](/posts/58597/edit)... |
[Question]
[
Following this question: [Tut-tut-tut-tut-tut](https://codegolf.stackexchange.com/questions/251772/tut-tut-tut-tut-tut)
Write a program that writes "tut-tut-tut" **without** using the characters "t", "u" or "-" in the code itself.
This is code golf, shortest code in bytes wins.
[Answer]
# [Jap... |
[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/158134/edit).
Closed 5 years ago.
[Improve this question](/posts/158134/edi... |
[Question]
[
Your program is supposed to create a full red screen in MSDOS. The source of the binary (.com file) must be 5 bytes or less. No wild assumptions, the binary must work in MsDos, DosBox, and FreeDos alike. For winning, you have to post x86 assembler code which can be assembled with NASM (FASM) or direc... |
[Question]
[
Your friend has been caught sleeping in class again! As punishment, his computer science teacher has assigned him homework, knowing that he will not be able to solve it due to not having paid any attention.
The assignment seems deceiving simple at first; all that is required is to output the string:
... |
[Question]
[
Use any programming language to display numbers divisible by 1000000 that are greater than 1 and less than 10000000. Each number should be displayed in new line. Your program should display exactly:
```
1000000
2000000
3000000
4000000
5000000
6000000
7000000
8000000
9000000
```
[Answer]
# Japt... |
[Question]
[
This is my 12th question, so I thought of this idea.
Goal:
* Output 12, with **any preceding or trailing whitespace permitted**
* **In as many languages as possible** (where different versions or flags **count as the same language**)
* **Without using any numbers**
* The criteria for a valid programm... |
[Question]
[
For today's challenge you have to take an input, and if your source code is reversed, then the input should be printed doubled.
Let's say your source code is `ABC` and its input is `xyz`. If I write `CBA` instead and run it, the output must be any of be `xyzxyz` or `xyz xyz` or
```
xyz
xyz
```
For a... |
[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/23920/edit).
Closed 9 years ago.
[Improve this question](... |
[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/122858/edit).
Closed 6 years ago.
[Improve this question]... |
[Question]
[
**This question already has answers here**:
[We're no strangers to code golf, you know the rules, and so do I](/questions/6043/were-no-strangers-to-code-golf-you-know-the-rules-and-so-do-i)
(73 answers)
["Hello, World!"](/questions/55422/hello-world)
(974 answers)
Closed 6 years ago.
*[Rela... |
[Question]
[
*Note: [This challenge](/questions/75687) is not the same.*
# Challenge
Believe it or not, we haven't got ONE challenge for reversing one-dimensional arrays (although we've got one for n-dimensional ones)! This should operate only on the 1st dimension, not on all dimensions of an array.
# Rules
* Sta... |
[Question]
[
## Challenge
* Input two integers.
+ Integer I/O must be decimal.
* If the integers are equal, output a truthy value.
* Otherwise, output a falsy value.
### Clarifications
* You will never receive non-integer inputs.
* You will never receive an input that is outside the bounds [-2³¹, 2³¹).
## Rules
... |
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.