josalhor / Cllt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HackEPS weekly challenges

Solution of the Collatz conjecture challenge

Autor: Josep Maria Salvia Hornos

Solutions

Two solutions are represented depending on the evaluation metrics.

If the definition of character is [a-zA-Z0-9] (as shared on social media), then my solution file is solution2.cjam with a number of characters of 0.

Otherwise, my solution file is solution1.gs.

Running the solutions

Solution 1 is programmed in GolfScript. Tested with latest April 30, 2013 patch.

ruby golfscript.rb solution1.gs

Solution 2 is programmed in CJam. Tested with version 0.6.5.

java -jar cjam-0.6.5.jar solution2.cjam

About


Languages

Language:JavaScript 100.0%