This file contains 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 FortyPounds { | |
static final int[] s = {-1, 0, 1}; | |
public static void main(String[] args) { | |
for (int w1 = 1; w1 <= 37; w1++) | |
for (int w2 = 1; w2 <= 38 - w1; w2++) | |
W3: for (int w3 = 1; w3 <= 39 - w1 - w2; w3++) { | |
int w4 = 40 - w1 - w2 - w3; | |
W: for (int w = 1; w <= 40; w++) { |