This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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++) |
NewerOlder