diff options
-rwxr-xr-x | 09/main.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -17,8 +17,10 @@ for line in sys.stdin: derivatives.append(derivative(derivatives[-1])) prediction = 0 + sign = 1 for d in derivatives: - prediction += d[-1] + prediction += d[0] * sign + sign *= -1 output += prediction |