Skip to content

Instantly share code, notes, and snippets.

@zeroDivisible
zeroDivisible / Problem #31
Created January 20, 2013 22:05
This is simple solution to Problem #31 on Project Euler.
public class problem31 {
final static int TOTAL = 200;
public static void main(String[] args) {
int[] coins = {1, 2, 5, 10, 20, 50, 100, 200};
int[] ways = new int[TOTAL + 1];
ways[0] = 1;
for(int coin: coins)
for(int j = coin; j <= TOTAL; j++)