Tagged Questions
6
votes
3answers
293 views
Display a bézier curve in the browser
The goal is to display a bézier curve in any classical browser (except maybe old IE versions, because... are they really browsers?) client side.
Rules:
You must provide one or more files (or their ...
7
votes
3answers
238 views
Rosetta Stone Challenge: Draw a Box Plot
The goal of a Rosetta Stone Challenge is to write solutions in as many languages as possible. Show off your programming multilingualism!
The Challenge
Your challenge is to implement a program that ...
3
votes
4answers
578 views
RPN calculator without pointers
Me and some other students were at a bar discussing programming languages, in particular the C programming language. At some point a first year student said he didn't need no damn pointers. Another ...
2
votes
9answers
919 views
Triangle Puzzle
Triangle Puzzle
Consider the triangle below.
This triangle would be represented by the following input file.
5
9 6
4 6 8
0 7 1 5
By starting at the top and ...
7
votes
13answers
869 views
Rosetta Stone Challenge: Find the rule for a series
The goal of a Rosetta Stone Challenge is to write solutions in as many languages as possible. Show off your programming multilingualism!
The Challenge
Your challenge is to implement a program that ...
0
votes
0answers
1k views
Write an accurate evaluation function for a Snakes and Ladders game
Instructions
Given the following board,
, determine the percentage chance that a player will win.
Rules of the game
One six sided dice!
Two players take turns rolling the dice and moving their ...
13
votes
36answers
3k views
Adding without using a + or - sign
There have been many "Do __ without __" challenges before, but I hope that this is one of the most challenging.
The Challenge
You are to write a program that takes two natural numbers (whole numbers ...
9
votes
3answers
618 views
Solving triangles with trigonometry
Time to dig up your old trigonometry notes from high school! The challenge is to solve the unknown sides and angles of different triangles. And as is customary in code golf, the smallest working code ...
2
votes
0answers
336 views
Traffic light synchronization problem [closed]
I'm not a 100% sure if this qualifies under this stack exchange; however, I asked this question on the stats stackexchange with no answers. I wonder if you can solve it:
Traffic light synchronization ...
8
votes
2answers
340 views
Build a small and balanced mobile
You are given a bunch of weights, and your task is to build a small balanced mobile using those weights.
The input is a list of integer weights in the range 1 through 9, inclusive. There may be ...
2
votes
4answers
444 views
Amicable number calculator
Write a program that calculates amicable numbers, starting from [0,0], intil the maximum value for an integer is reached in the language you chose to write it in.
Amicable numbers are two different ...
4
votes
3answers
199 views
Code-Challenge: Non trivial powers Revisted
Challenge
In this task you would be given an
integer N you have to output all
non-trivial power representation of
the integer.
Non-trivial power means the base and exponent are > 1
The ...
3
votes
4answers
379 views
Code-Challenge: Farey sequence (II)
Challenge
In this task you would be given an integer N
(less than 10^6), output the number of terms in the Farey
sequence of order N.
The input N is given in a single line,the inputs are ...
9
votes
6answers
2k views
Count number of hefty decimals between 2 numbers
Let's say we have a non-negative integer that is "hefty" (that is, "heavy") if its average digit value is greater than 7.
The number 6959 is "hefty" because:
(6 + 9 + 5 + 9) / 4 = 7.5
The number ...
3
votes
6answers
348 views
Code Golf: Number of paths!
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
...