All Questions
-1
votes
0answers
7 views
website for lowest bidding auction
Create a website to auction things. The lowest unique bidder should be considered as the winner. Your website should contain an admin login and user login.
-7
votes
0answers
26 views
solving problem step by step, limit x to inf, limit x to 0 and limit x to -1 [on hold]
lim x to inf ((x^4)-3x)/(-2x+5) solving step by step
lim x to 0 ((-(cosx)^2)/4x^2) solving step by step
lim x to -1 ((x+1)/((6(x^2)+3)^1/2)+3x) solving step by step
4
votes
5answers
94 views
Double-duty quine
Write a program that will output its own source code when run, and nothing else. Seems easy, right?
The catch is that when the source code is reversed, your program must output "Hello, World!" ...
15
votes
11answers
341 views
The plus-minus sequence
The plus-minus sequence
The plus-minus sequence is one that starts with two seeds, a(0) and b(0). Each iteration of this sequence is the addition and subtraction of the previous two members of the ...
21
votes
3answers
231 views
Clean the muddy quartata-fish
This challenge is in honor of the Rookie of the Year category winners of Best of PPCG 2015: muddyfish (for I'm not the language you're looking for!) and quartata (for Implement a Truth-Machine).
...
14
votes
0answers
53 views
Highest score on the field
Introduction
Let a field be a rectangle filled with only the characters - and [0-9]. An example of a field is:
11-011123
111-010--
0010---01
111-01234
You see that this field has been separated ...
8
votes
6answers
297 views
Read a crossword
Inspired by this question about packing into this format.
Occasionally I see a completed crossword and being as I am, I can't be bothered to find out what the solutions to the clues actually were.
...
2
votes
1answer
103 views
Shortest code for key-logger
Okay, I propose a shortest-key-logger challenge. As explained by the gentleman at "Are key-logger questions allowed?", strict rules have to be imposed in order to make this challenge valid for PPCG.
...
14
votes
3answers
252 views
Go to opposite corner of rectangle in all directions - Harder
This is essentially the same thing as this question, except harder. You are again to write a program that gets from the lower-left corner of a rectangle to the upper-right corner. However, this time ...
2
votes
0answers
98 views
Shortest code to secure wipe a disk
As you can tell from this question and my previous one, I am determined to kill my SSD.
Let's write the shortest code to perform a simplified variant of the DoD 5220.22-M Wipe Method with only two ...
22
votes
12answers
648 views
The Arithmetic Derivative
The derivative of a function is a cornerstone of mathematics, engineering, physics, biology, chemistry, and a large number of other sciences as well. Today we're going to be calculating something only ...
6
votes
1answer
104 views
Validate a Wikipedia page name [on hold]
Wikipedia has several restrictions on an article's title. I summarize them here:
It may not be empty.
It may not begin with a lowercase letter. A character is considered lowercase if it has an Ll ...
-3
votes
3answers
139 views
Evaluate an infinite sum [on hold]
This challenge is write code that can perform an infinite sum to high precision.
Task
Your code should compute
sum(exp(-x^2), x = -infinity..infinity)
to 50 decimal places.
The answer should ...
-1
votes
0answers
78 views
Write an interpreter for my new esoteric language StreamFlow [on hold]
I don't even know why I called it that...
So, I thought up of an idea for an esoteric language, and today, it's your task to write an interpreter! This is code-golf.
The language specification is ...
16
votes
2answers
386 views
Draw a random hexa-glyph
The above image is called a hexa-glyph. Hexa-glyphs are some cool patterns I made up while doodling during my DiffEq class. Here's how you make one:
Consider the following set of points, shaped ...
13
votes
14answers
603 views
Optimal solution to go to opposite corner of a rectangle
Your job is to write a program that finds the optimal number of moves it takes to get from the lower-left corner of a rectangle to the upper-right corner directly opposite.
Your program will accept ...
-4
votes
0answers
51 views
JAVA code to calculate marks of lowest ID student [on hold]
Marks of Lowest ID Student:
The input is being read in from a file called input.txt, in this format:
22|Data Structures|45
23|English|52
22|English|51
26|Data Structures|72
23|Data Structures|61 ...
-4
votes
0answers
29 views
Exercism (javascript) palindrome-products requirements [on hold]
I'm working on the exercism.io javascript puzzle palindrome-products and I'm having a hard time understanding the requirements of the first test in the test-suite.
As I understand the first test for ...
13
votes
7answers
676 views
Turn a string into a windmill
The code on this site is rapidly being depleted. We need to invest in renewable strings. So you must write a program that takes a string and converts it into a windmill.
The Challenge
Let's take a ...
0
votes
0answers
72 views
Create a Calculator in the least amount of Bytes [on hold]
Create a program that has a working Calculator
Make it with a graphical user interface (meaning no batch)
It should support at least + - * / ^ ± 1/x MC MS MR M+ operations
Here is my try: (6,648 ...
10
votes
4answers
213 views
Find the shortest way to advance a counter to a certain number
I have a counter. It's a small device that looks like this:
The display goes from 0000 to 9999. It has a little push-button at the top that increases the count by 1, and a little knob at the right ...
7
votes
3answers
89 views
Ordering words to fit in a given string
Given a string of letters and a set of words, output an ordering of the words so
that they can be found in the string by dropping letters that are not needed.
Words may occur more than once in the ...
-5
votes
0answers
56 views
Write the ugliest Javascript conceivable [on hold]
After being a C++ programmer who has never used js, being assigned js projects for 5 months, I have finally snapped and realized js can be made so ugly its an art.
var t2b= {id:0};
...
9
votes
4answers
235 views
Code a code page
Introduction
A code page maps integer values to a specific character. We can visualize a code page like this:
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| | 0 | 1 | 2 | ...
5
votes
3answers
160 views
Write an interpreter for my new programming language
I have a new programming language called Brussels-Sprout. Brussels-Sprout functions in an array of 256 boolean values, all initialized to zero, has one instruction pointer, and one "bit index".
...
3
votes
4answers
93 views
Is this a Lucas number? [duplicate]
Write a program or function that takes an input greater than or equal to 2. It should output a truthy or falsy value corresponding to whether the input is a Lucas number or not. You may take input ...
14
votes
11answers
405 views
Ravenity of Cube Distance Numbers
Inspired by this Numberphile entry
Background
The cube distance numbers of an integer n are defined here as the set of integers that are x³ distance away for a given x. For a simple example, with ...
-6
votes
0answers
33 views
building an adding machine [on hold]
i'm having real problems how to build an adding machine.
its supposed to have 5 inputs and 3 outputs.
output should give a sum of positive signals (all binary, so with 2 positive inputs it should ...
32
votes
23answers
4k views
Shortest code for infinite disk I/O
(Just open 50 tabs in Google Chrome :D (just kidding, no you can't))
Shortest code for infinite disk I/O any language, C# example:
using System.IO;
namespace FileApp {
static class Program {
...
50
votes
18answers
2k views
Tweetable hash function challenge
In this code-challenge you will write a hash function in 140 bytes1 or less of source code. The hash function must take an ASCII string as input, and return a 24-bit unsigned integer ([0, 224-1]) as ...
0
votes
0answers
56 views
Output your used source code in reverse [duplicate]
I'm new to this stackexchange, but I must say I am very impressed by the knowledge of some here, and the original codegolf answers for some questions.
I'm not even sure if the following is possible, ...
-1
votes
6answers
116 views
Write a program to fabricate elaborate acronyms [duplicate]
"Hey Bob, I need a new acronym. Something better than 'Automated Support System'. I need you to fabricate me an acronym!"
"Sure thing Joe! I'd love to fabricate an elaborate way to renovate, and not ...
3
votes
8answers
392 views
Write a program that converts unary input to binary, decimal, and hexadecimal equivalents
Write a program that accepts input (through stdin) as a string of unary numbers delimited by spaces, and prints the equivalent string of numbers in binary, decimal, and hexadecimal. These unary ...
-3
votes
0answers
56 views
Print a PPCG user card! [on hold]
You need to print a PPCG user card. Your program must take an input in the form of a username profile link and spit out a user card. Example:
_____________________________________
| CrazyPython top ...
-2
votes
0answers
44 views
Awk or vim. Trying to generate numbers like so {1,2,3,4}…{1,2,3,4} [on hold]
I'm trying to generate numbers between {1,2,3,4} up to {1,98,99,100} by using awk or vim. Can anyone help?
2
votes
0answers
67 views
Friday the 13th [duplicate]
This post would make more sense if it were Friday the 13th today... But oh well.
Write a full program that, given any year as the input from at least -10,000 to 10,000, prints all dates of that year ...
13
votes
10answers
608 views
Determine the type of an input
The challenge is simple: Determine the type of an input, and output an identifier telling what type it is.
"UI", Unsigned integer: 0, 1,34, 111111111111111111111111111111111111111111
"SI", Signed ...
-5
votes
4answers
125 views
Write a palindrome that prints “Hello, World!” without using comments [duplicate]
Your Task: Print "Hello, World!" using a palindrome.
Simple, right?
Nope.
You have one restriction: you may not use comments.
"Comments" include
Normal // or # comments
Adding extraneous ...
-3
votes
1answer
78 views
What is the euclidean distance between two hex codes? [on hold]
This one kept me up last night. Solution will be a function which takes two 6-character hex strings (not prepended with #) and outputs their euclidean distance when plotted on a square like on this ...
14
votes
5answers
192 views
Identify arborally satisfied point sets
An arborally satisfied point set is a 2D set of points such that, for any axis-aligned rectangle that can be formed using two points in the set as opposite corners, that rectangle contains or touches ...
8
votes
6answers
285 views
Final Fantasy XV UNCOVERED!
Since I am INSANELY hyped for the Final Fantasy XV Uncovered event, I want you to write me a program to tell me when it is!!!
The input
Your take input in the form of HH:MM XDT, where HH is a number ...
7
votes
4answers
458 views
Child Genotypes
The Challenge
Everybody loves genetics, right? In this challenge, you will be given the genotypes of two parents. You must find each possible genotype of a child produced by the parents. You must ...
8
votes
2answers
311 views
Tic-tac-toe with only crosses as quick as possible
As per Luke's request and Peter Taylor's addition to this challenge.
Introduction
Everyone knows the game tic-tac-toe, but in this challenge, we are going to introduce a little twist. We are only ...
29
votes
7answers
2k views
A Tiny Explorer
You are an explorer, mapping an unknown world. Your ship is carried on the wind. Where it goes, who knows?
Each day, in your spyglass, you see features to the north, south, east and west. You always ...
22
votes
38answers
7k views
Open the browser to http://codegolf.stackexchange.com
Your job is to open a browser window of the default browser to http://codegolf.stackexchange.com.
Your code must open the browser itself, and cannot rely on an open one.
This is code-golf, so the ...
16
votes
1answer
214 views
Find the treasure in a 2D dungeon
You are in a one-floor dungeon. There is a treasure which is protected by locked doors. Doors can be opened by finding the corresponding keys. Your goal is to find the shortest path to the treasure.
...
10
votes
5answers
475 views
Express a number with only 0-9 and the four operations
Explanation
Befunge is a two-dimensional program that uses stacks.
That means, to do 5 + 6, you write 56+, meaning:
56+
5 push 5 into stack
6 push 6 into stack
+ pop the first two items in ...
24
votes
10answers
2k views
Parse a Quaternion
If you don't know already, a quaternion is basically a 4-part number. For the purposes of this challenge, it has a real component and three imaginary components. The imaginary components are ...
32
votes
27answers
5k views
Passwordify the string
Your challenge is to passwordify the string! What is passwordifying, you ask?
Take a string as input. This string will only contain uppercase letters, lowercase letters, digits, and spaces.
You ...
-5
votes
20answers
264 views
Print the sum of the squares of some numbers
This is a little codegolf challenge from codingame.com. I was wondering how much Python3 code is necessary (but of course answers are not limited to Python3).
Input
The first line contains one ...