Problem p02555 (python)

Fixed submission:
import numpy as np

MOD = 10**9+7

n = int(input())
arr = np.zeros((n+1,n+1), dtype=int)
for i in np.arange(3,n+1):
    arr[0,i] = 1

for i in np.arange(1,n+1):
    sum_ = 0
    for j in np.arange(3*i,n+1):
        sum_ += arr[i-1,j]
        sum_ %= MOD
        if j+3 >= n + 1:
            break
        arr[i,j+3] = sum_

ans = 0
for i in range(n+1):
    ans += arr[i,n]
    ans %= MOD
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np

MOD = 10**9+7

n = int(input())
arr = np.zeros((n+1,n+1), dtype=int)
for i in np.arange(3,n+1):
    arr[0,i] = 1

for i in np.arange(1,n+1):
    sum_ = 0
    for j in np.arange(3*i,n+1):
        sum_ += arr[i-1,j]
        sum_ %= MOD
        if j+3 >= n + 1:
            break
        arr[i,j+3] = sum_

ans = 0
for i in range(n+1):
    ans += arr[i,n]
    ans %= MOD
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np

MOD = 10**9+7

n = int(input())
arr = np.zeros((n+1,n+1), dtype=int)
for i in np.arange(3,n+1):
    arr[0,i] = 1

for i in np.arange(1,n+1):
    sum_ = 0
    for j in np.arange(3*i,n+1):
        sum_ += arr[i-1,j]
        sum_ %= MOD
        if j+3 >= n + 1:
            break
        arr[i,j+3] = sum_

ans = 0
for i in range(n+1):
    ans += arr[i,n]
    ans %= MOD
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np

MOD = 10**9+7

n = int(input())
arr = np.zeros((n+1,n+1), dtype=int)
for i in np.arange(3,n+1):
    arr[0,i] = 1

for i in np.arange(1,n+1):
    sum_ = 0
    for j in np.arange(3*i,n+1):
        sum_ += arr[i-1,j]
        sum_ %= MOD
        if j+3 >= n + 1:
            break
        arr[i,j+3] = sum_

ans = 0
for i in range(n+1):
    ans += arr[i,n]
    ans %= MOD
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np

MOD = 10**9+7

n = int(input())
arr = np.zeros((n+1,n+1), dtype=int)
for i in np.arange(3,n+1):
    arr[0,i] = 1

for i in np.arange(1,n+1):
    sum_ = 0
    for j in np.arange(3*i,n+1):
        sum_ += arr[i-1,j]
        sum_ %= MOD
        if j+3 >= n + 1:
            break
        arr[i,j+3] = sum_

ans = 0
for i in range(n+1):
    ans += arr[i,n]
    ans %= MOD
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np

MOD = 10**9+7

n = int(input())
arr = np.zeros((n+1,n+1), dtype=int)
for i in np.arange(3,n+1):
    arr[0,i] = 1

for i in np.arange(1,n+1):
    sum_ = 0
    for j in np.arange(3*i,n+1):
        sum_ += arr[i-1,j]
        sum_ %= MOD
        if j+3 >= n + 1:
            break
        arr[i,j+3] = sum_

ans = 0
for i in range(n+1):
    ans += arr[i,n]
    ans %= MOD
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np

n = int(input())
print(n)

Buggy submission (verdict: Runtime Error):
import numpy as np

MOD = 10**9+7

n = int(input())
print(n)

Buggy submission (verdict: Runtime Error):
import numpy as np

MOD = 10**9+7

n = int(input())

Buggy submission (verdict: Runtime Error):
import numpy as np

MOD = 10**9+7

n = int(input())
arr = np.zeros((n+1,n+1), dtype=np.int16)
for i in np.arange(3,n+1):
    arr[0,i] = 1

Buggy submission (verdict: Runtime Error):
import sys
import numpy as np

def dump(x):
    print(x, file=sys.stderr)


MOD = 10**9+7

N = int(input())
arr = np.zeros((N+1,N+1),dtype=int)
for i in range(3,N+1):
    arr[0,i] = 1

for i in range(1,N+1):
    sum_ = 0
    for j in range(3*i,N+1):
        sum_ += arr[i-1,j]
        sum_ %= MOD
        if j+3 >= N + 1:
            break
        arr[i,j+3] = sum_

dump(arr)

ans = 0
for i in range(N+1):
    ans += arr[i,N]
    ans %= MOD
print(ans)