Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- long[] store = new long[((int) a+1)/2];
- store[0] = 2;
- long l = ((int) a)-2;
- for (long iy = 0; iy < l; iy++) {
- long ta = store[0];
- store[0]++;
- int ix = 1;
- for (; ix <= (iy+1)/2; ix++) {
- long tb = store[ix];
- store[ix] = ta+tb;
- ta = tb;
- }
- if ((iy & 1) == 0) {
- store[ix] = store[ix-1];
- }
- }
Add Comment
Please, Sign In to add comment