# | Line 27 | Line 27 | public class Finals { | |
---|---|---|
27 | } | |
28 | } | |
29 | ||
30 | < | static long nextRandom(long seed) { |
30 | > | static long nextRandom(long seed) { |
31 | return (seed * 0x5DEECE66DL + 0xBL) & ((1L << 48) - 1); | |
32 | } | |
33 | ||
# | Line 58 | Line 58 | public class Finals { | |
58 | long s = initialSeed(this); | |
59 | while (s != 0 && n > 0) { | |
60 | long nexts = nums[(int)(s & (LEN-1))].longValue(); | |
61 | < | if (nexts != s) |
61 | > | if (nexts != s) |
62 | --n; | |
63 | else if (done) | |
64 | break; | |
# | Line 66 | Line 66 | public class Finals { | |
66 | } | |
67 | done = true; | |
68 | total += s; | |
69 | < | if (s == 0) |
69 | > | if (s == 0) |
70 | throw new Error("Saw uninitialized value"); | |
71 | } | |
72 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |