Problem p03281 (python)

Fixed submission:
import numpy as np
N=int(input())
x=[105, 135, 165, 189, 195]

X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
if N<195:
  print(XX[0][0])
else:
  print(5)

Buggy submission (verdict: Runtime Error):
import numpy as np
N=int(input())
x=[105, 135, 165, 189, 195]

X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
if N<195:
  print(XX[0][0])
  else:
    print(5)

Buggy submission (verdict: Runtime Error):
import numpy as np
N=int(input())
x=[105, 135, 165, 189, 195]

X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
print(XX[0][0])

Buggy submission (verdict: Runtime Error):
N=int(input())
import math


#hoge=[[108]]

#x=[3,5,7,11,13,17,19]
#a=[pow(2,3)*i for i in x]

x=[5,7]
b=[[pow(3,3)*i for i in x]]

#x=[5,7,11,13,17,19,23,29,31]
#c=[2*3*i for i in x]

#x=[7,11,13,17,19]
#d=[2*5*i for i in x]

#x=[11,13]
#e=[2*7*i for i in x]

x=[7,11,13]
f=[3*5*i for i in x]

b.append(f)



x=[]
for v in b:
  for item in v:
    x.append(item)


x.sort()
import numpy as np
X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
if N!=1:
  print(XX[0][0])
if N==1:
  print(0)

Buggy submission (verdict: Runtime Error):
N=int(input())
import math

#hoge=[[108]]

#x=[3,5,7,11,13,17,19]
#a=[pow(2,3)*i for i in x]

x=[5,7]
b=[[pow(3,3)*i for i in x]]

#x=[5,7,11,13,17,19,23,29,31]
#c=[2*3*i for i in x]

#x=[7,11,13,17,19]
#d=[2*5*i for i in x]

#x=[11,13]
#e=[2*7*i for i in x]

x=[7,11,13]
f=[3*5*i for i in x]

b.append(f)



x=[]
for v in b:
  for item in v:
    x.append(item)


x.sort()
import numpy as np
X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
print(XX[0][0])

Buggy submission (verdict: Runtime Error):
N=int(input())
import math

#hoge=[[108]]

#x=[3,5,7,11,13,17,19]
#a=[pow(2,3)*i for i in x]

x=[[5,7]]
b=[pow(3,3)*i for i in x]

#x=[5,7,11,13,17,19,23,29,31]
#c=[2*3*i for i in x]

#x=[7,11,13,17,19]
#d=[2*5*i for i in x]

#x=[11,13]
#e=[2*7*i for i in x]

x=[7,11,13]
f=[3*5*i for i in x]

b.append(f)



x=[]
for v in b:
  for item in v:
    x.append(item)


x.sort()
import numpy as np
X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
print(XX[0][0])

Buggy submission (verdict: Runtime Error):
N=int(input())
import math

#hoge=[[108]]

#x=[3,5,7,11,13,17,19]
#a=[pow(2,3)*i for i in x]

x=[5,7]
b=[pow(3,3)*i for i in x]

#x=[5,7,11,13,17,19,23,29,31]
#c=[2*3*i for i in x]

#x=[7,11,13,17,19]
#d=[2*5*i for i in x]

#x=[11,13]
#e=[2*7*i for i in x]

x=[7,11,13]
f=[3*5*i for i in x]

b.append(f)



x=[]
for v in b:
  for item in v:
    x.append(item)


x.sort()
import numpy as np
X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
print(XX[0][0])

Buggy submission (verdict: Runtime Error):
N=int(input())
import math

hoge=[[108]]

x=[3,5,7,11,13,17,19]
a=[pow(2,3)*i for i in x]

x=[2,5,7]
b=[pow(3,3)*i for i in x]

x=[5,7,11,13,17,19,23,29,31]
c=[2*3*i for i in x]

x=[7,11,13,17,19]
d=[2*5*i for i in x]

x=[11,13]
e=[2*7*i for i in x]

x=[7,11,13]
f=[3*5*i for i in x]

hoge.append(a)
hoge.append(b)
hoge.append(c)
hoge.append(d)
hoge.append(e)
hoge.append(f)


x=[]
for v in hoge:
  for item in v:
    x.append(item)

x.sort()
import numpy as np
X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
print(XX[0][0])

Buggy submission (verdict: Runtime Error):
N=int(input())
import math

hoge=[[108]]

x=[3,5,7,11,13,17,19]
a=[pow(2,3)*i for i in x]

x=[2,5,7]
b=[pow(3,3)*i for i in x]

x=[5,7,11,13,17,19,23,29,31]
c=[2*3*i for i in x]

x=[7,11,13,17,19]
d=[2*5*i for i in x]

x=[11,13]
e=[2*7*i for i in x]

x=[7,11,13]
f=[3*5*i for i in x]

hoge.append(a)
hoge.append(b)
hoge.append(c)
hoge.append(d)
hoge.append(e)
hoge.append(f)


x=[]
for v in hoge:
  for item in v:
    x.append(item)

x.sort()
import numpy as np
X=N-x
XX=np.where(X < 0) 
print(XX[0])