Skip to content

Instantly share code, notes, and snippets.

@gberenfield
gberenfield / gist:2052257
Created March 16, 2012 20:00
Week 1 - problem #2
(ns codelesson.week1
(:require [clojure.math.combinatorics :as mc]))
(defn add-up [coeffs terms]
"ax + by + cz + ...
this adds up a Specific set of coefficients for terms(coins)"
(reduce + (map #(* %1 %2) coeffs terms)))
(defn coeffs [dollar coin]
"return a sequence of coeffs from 0 to the divisor of the dollar amt by the coin
@gberenfield
gberenfield / output.png
Created June 30, 2011 06:15
Pixelizing images with ChunkyPNG - codebrawl #2
output.png