Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
HP_list = [int(i) for i in input().split()]
while len(set(HP_list))>1:
    for i in range(0, len(set(HP_list))):
        min_HP = min(HP_list)
        if HP_list[i] > min_HP:
            HP_list[i] = HP_list[i]%min_HP
            if HP_list[i]==0:
                HP_list[i] += min_HP
print(list(set(HP_list))[0])

Fixed submission:
import numpy as np
N = int(input())
HPs = np.array([int(i) for i in input().split()])
np.sort(HPs)
while len(HPs) > 1:
    HPs[1:] %= HPs[0]
    HPs[HPs==0] = HPs[0]
    HPs=np.unique(HPs)
print(HPs[0])

Buggy python submission (verdict: Runtime Error):
N = int(input())
HP_list = [int(i) for i in input().split()]
while len(set(HP_list))>1:
    for i in range(0, len(set(HP_list))):
        min_HP = min(HP_list)
        if HP_list[i] > min_HP:
            HP_list[i] = HP_list%min_HP
            if HP_list[i]==0:
                HP_list[i] += min_HP
print(list(set(HP_list))[0])

Fixed submission:
import numpy as np
N = int(input())
HPs = np.array([int(i) for i in input().split()])
np.sort(HPs)
while len(HPs) > 1:
    HPs[1:] %= HPs[0]
    HPs[HPs==0] = HPs[0]
    HPs=np.unique(HPs)
print(HPs[0])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
HP_list = [int(i) for i in input().split()]
while len(set(HP_list))>1:
    HP_list[-1] = min([HP_list[-1]%i for i in HP_list[:-1]])
    if HP_list[-1]== 0:
        HP_list.pop(-1)
    else:
        HP_list.sort()
print(HP_list[0])

Fixed submission:
import numpy as np
N = int(input())
HPs = np.array([int(i) for i in input().split()])
np.sort(HPs)
while len(HPs) > 1:
    HPs[1:] %= HPs[0]
    HPs[HPs==0] = HPs[0]
    HPs=np.unique(HPs)
print(HPs[0])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
HP_list = [int(i) for i in input().split()]
HP_list.sort()
while len(HP_list)>1:
    HP_list[-1] = min([HP_list[-1]%i for i in HP_list[:-1]])
    if HP_list[-1]== 0:
        HP_list.pop(-1)
    else:
        HP_list.sort()
print(HP_list[0])

Fixed submission:
import numpy as np
N = int(input())
HPs = np.array([int(i) for i in input().split()])
np.sort(HPs)
while len(HPs) > 1:
    HPs[1:] %= HPs[0]
    HPs[HPs==0] = HPs[0]
    HPs=np.unique(HPs)
print(HPs[0])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
HP_list = [int(i) for i in input().split()]

while len(HP_list)>1:
    HP_list.sort()
    #attacked_list = [HP_list[-1]%i for i in HP_list[:-1]]
    HP_list[-1] = min([HP_list[-1]%i for i in HP_list[:-1]])
    HP_list.sort()
    if HP_list[0] == 0:
        HP_list=HP_list[1:]
print(HP_list[0])

Fixed submission:
import numpy as np
N = int(input())
HPs = np.array([int(i) for i in input().split()])
np.sort(HPs)
while len(HPs) > 1:
    HPs[1:] %= HPs[0]
    HPs[HPs==0] = HPs[0]
    HPs=np.unique(HPs)
print(HPs[0])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
HP_list = [int(i) for i in input().split()]
while len(HP_list)>1:
    HP_list.sort()
    HP_max = HP_list.pop(-1)
    attacked_list = [HP_max%i for i in HP_list]
    HP_list.append(min(attacked_list))
    HP_list.sort()
    if HP_list[0] == 0:
        HP_list.pop(0)
print(HP_list[0])

Fixed submission:
import numpy as np
N = int(input())
HPs = np.array([int(i) for i in input().split()])
np.sort(HPs)
while len(HPs) > 1:
    HPs[1:] %= HPs[0]
    HPs[HPs==0] = HPs[0]
    HPs=np.unique(HPs)
print(HPs[0])