3 more problems down...one was in Ruby, which was easy/fun enough, one in Whenever, which is a ridiculous language except for when it is easy to write a solution in one line, and one is in Ook, a variant of Brainfuck. Despite how fun it has been to write brainfuck code, if I actually want to reach my goal, I am going to have to stick with more "reasonable" languages for a bit
Problem 4: Ruby
Find the largest palindrome which is the product of 2 3-digit numbers
https://dl.dropboxusercontent.com/u/34972177/PELC/e4.rb
Problem 5: Whenever
Find the smallest natural number divisible by the integers 1,...,20
https://dl.dropboxusercontent.com/u/34972177/PELC/e5.we
Problem 6: Ook! (Compiled to Ook! from Brainfuck)
Find the difference between (1 + 2 + ... + 100)^2 and (1^2 + 2^2 + ... + 100^2)
https://dl.dropboxusercontent.com/u/34972177/PELC/e6.bf
https://dl.dropboxusercontent.com/u/34972177/PELC/e6.ook
No comments:
Post a Comment