Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
list = input().split(" ")
N = int(list[0])
K = int(list[1])
list_hp = input().split(" ")
list_hp = [int(i) for i in list_hp]
list_hp = sorted(list_hp,reverse=True)

if K < N:
    for i in range(K):
        list_hp.pop(0)
    print(sum(list_hp))
    
else:
    print(0)

Fixed submission:
list = input().split(" ")
N = int(list[0])
K = int(list[1])
list_hp = input().split(" ")
list_hp = [int(i) for i in list_hp]
list_hp = sorted(list_hp)

if K < N:
    sum = 0
    for i in range(N-K):
        sum = sum + list_hp[i]
    print(sum)
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
list = input().split(" ")
N = int(list[0])
K = int(list[1])
list_hp = input().split(" ")
list_hp = [int(i) for i in list_hp]
list_hp = sorted(list_hp,reverse=True)

if K < N:
    for i in range(K):
        list_hp.pop(0)
    print(sum(list_hp))
    
else:
    print(0)

Fixed submission:
list = input().split(" ")
N = int(list[0])
K = int(list[1])
list_hp = input().split(" ")
list_hp = [int(i) for i in list_hp]
list_hp = sorted(list_hp)

if K < N:
    sum = 0
    for i in range(N-K):
        sum = sum + list_hp[i]
    print(sum)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
list = input().split(" ")
N = int(list[0])
K = int(list[1])
list_hp = input().split(" ")
list_hp = [int(i) for i in list_hp]
list_hp = sorted(list_hp)

if K < N:
    for i in range(1,K+1):
        list_hp.pop(-i)
    print(sum(list_hp))
    
else:
    print(0)

Fixed submission:
list = input().split(" ")
N = int(list[0])
K = int(list[1])
list_hp = input().split(" ")
list_hp = [int(i) for i in list_hp]
list_hp = sorted(list_hp)

if K < N:
    sum = 0
    for i in range(N-K):
        sum = sum + list_hp[i]
    print(sum)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
H = int(input())

def attack(x):
    if H > 0:
        return 2 * attack(int(x/2)) + 1
    else:
        return 1
      
print(attack(H))
      

Fixed submission:
H = int(input())

def attack(x):
    if x > 1:
        return attack(int(x/2)) * 2 + 1
    else:
        return 1
        
print(attack(H))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = input().split(" ")

t = 0
list = []
for i in range(N):
    list.append(int(P[i]))
    m = min(list)
    if m == int(P[i]):
        t = t + 1

print(t)

Fixed submission:
N = int(input())
P = input().split(" ")

t = 1
list = []
for i in range(N):
    list.append(int(P[i]))
    if i == 0:
        m = int(P[0])
    elif int(P[i]) < m:
        m = int(P[i])
        t = t + 1
        
print(t)

Buggy python submission (verdict: Runtime Error):
t = 0
list = []
for i in range(N):
    list.append(int(P[i]))
    m = min(list)
    if m == int(P[i]):
        t = t + 1

print(t)

Fixed submission:
N = int(input())
P = input().split(" ")

t = 1
list = []
for i in range(N):
    list.append(int(P[i]))
    if i == 0:
        m = int(P[0])
    elif int(P[i]) < m:
        m = int(P[i])
        t = t + 1
        
print(t)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = input().split(" ")

t = 1
for i in range(1,N):
    list = []
    for j in range(i + 1):
        list.append(int(P[j]))
    m = min(list)
    if m == int(P[i]):
        t = t + 1

print(t)

Fixed submission:
N = int(input())
P = input().split(" ")

t = 1
list = []
for i in range(N):
    list.append(int(P[i]))
    if i == 0:
        m = int(P[0])
    elif int(P[i]) < m:
        m = int(P[i])
        t = t + 1
        
print(t)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split(" "))
L = [0] * M
for i in range(M):
  L(i) = input().split(" ")

memoAC = [0]*N
memoWA = [0]*N
for list in L:
  if list[1]=="AC":
    memoAC[int(list[0])]=1
  else:
    if memoAC[int(list[0])]!=1:
      memoWA[int(list)[0]]+=1
      
AC = sum(memoAC)
WA = sum(memoWA)
print(AC,WA)

Fixed submission:
N,M = map(int,input().split(" "))
L = [0] * M
for i in range(M):
    L[i] = input().split(" ")
    
memoAC = [0] * N
memoWA = [0] * N
for list in L:
    if list[1] == "AC":
        memoAC[int(list[0])-1] = 1
    else:
        if memoAC[int(list[0])-1] != 1:
            memoWA[int(list[0])-1] += 1

for j in range(N):
    if memoAC[j] == 0:
        memoWA[j] = 0

AC = sum(memoAC)
WA = sum(memoWA)
print(AC,WA)
Buggy python submission (verdict: Runtime Error):
import math
A,B = map(int,input().split(" "))
print(int((A * B) / math.gcd(A, B)))

Fixed submission:
import fractions
A,B = map(int,input().split(" "))
print(int((A * B) / fractions.gcd(A, B)))

Buggy python submission (verdict: Runtime Error):
import math
A,B = map(int,input().split(" "))
print((A * B) // math.gcd(A, B))

Fixed submission:
import fractions
A,B = map(int,input().split(" "))
print(int((A * B) / fractions.gcd(A, B)))

Buggy python submission (verdict: Runtime Error):
import math
A,B = map(int,input().split(" "))
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(A,B))

Fixed submission:
import fractions
A,B = map(int,input().split(" "))
print(int((A * B) / fractions.gcd(A, B)))

Buggy python submission (verdict: Runtime Error):
import math
A,B = map(int,input().split(" "))
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(A,B))

Fixed submission:
import fractions
A,B = map(int,input().split(" "))
print(int((A * B) / fractions.gcd(A, B)))

Buggy python submission (verdict: Runtime Error):
import math
A,B = map(int,input().split(" "))
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(A,B))

Fixed submission:
import fractions
A,B = map(int,input().split(" "))
print(int((A * B) / fractions.gcd(A, B)))

Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().split(" "))
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(A,B))

Fixed submission:
import fractions
A,B = map(int,input().split(" "))
print(int((A * B) / fractions.gcd(A, B)))
Buggy python submission (verdict: Runtime Error):
S = input()
Weeks = ["MON","TUE","WED","THU","FRI","SAT","SUN"]
ind = Weeks.index(S)
if S != "SUN"
    print(6-ind)
else:
    print(7)

Fixed submission:
S = input()
Weeks = ["MON","TUE","WED","THU","FRI","SAT","SUN"]
ind = Weeks.index(S)
if S != "SUN":
    print(6-ind)
else:
    print(7)
Buggy python submission (verdict: Runtime Error):
S = input()

if N % 2 != 0:
    print("No")
else:
    for i in range(int(N/2)):
        if S[i] != S[i+int(N/2)]:
            print("No")
            exit()
    print("Yes")

Fixed submission:
N = int(input())
S = input()

if N % 2 != 0:
    print("No")
else:
    for i in range(int(N/2)):
        if S[i] != S[i+int(N/2)]:
            print("No")
            exit()
    print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))

for i in range(1,N+1):
    print(A.index(i)+1,end=" ")

Fixed submission:
import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))

ans = [0] * N
for k,v in enumerate(A):
    ans[v-1] = k+1

for i in range(N):
    print(ans[i],end=" ")

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))

for i in range(1,N+1):
    print(A.index(i)+1,end=" ")

Fixed submission:
import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int,input().split()))

ans = [0] * N
for k,v in enumerate(A):
    ans[v-1] = k+1

for i in range(N):
    print(ans[i],end=" ")
Buggy python submission (verdict: Runtime Error):
S = input()
n = len(S)

for i in range(int(n/2)+1):
    if S[2*i] != "R" and S[2*i] != "U" and S[2*i] != "D":
        print("No")
        exit()
for i in range(int(n/2)):
    if S[2*i + 1] != "L" and S[2*i + 1] != "U" and S[2*i + 1] != "D":
        print("No")
        exit()
print("Yes")

Fixed submission:
import math
S = input()
n = len(S)

for i in range(math.ceil(n/2)):
    if S[2*i] != "R" and S[2*i] != "U" and S[2*i] != "D":
        print("No")
        exit()
for i in range(int(n/2)):
    if S[2*i + 1] != "L" and S[2*i + 1] != "U" and S[2*i + 1] != "D":
        print("No")
        exit()
print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
H = list(map(int,input().split()))

s = 0
for i in range(N-1):
    num = i
    t = 0
    while num < N - 1 and H[num] >= H[num + 1]:
        t += 1
        num += 1
    if s <= t:
        s = t
        
print(s)

Fixed submission:
N = int(input())
H = list(map(int,input().split()))

s = 0
i = 0
while 0 <= i < N - 1:
    num = i
    t = 0
    while num < N - 1 and H[num] >= H[num + 1]:
        t += 1
        num += 1
    if s <= t:
        s = t
    i = num + 1
        
print(s)
Buggy python submission (verdict: Runtime Error):
N = int(input())
list = map(int,input().split(" "))
cards = sorted(list,reverse=True)

if len(cards) % 2 == 0:
    alice = 0
    for i in range(int(N/2)):
        alice = alice + cards[2 * i]
        
    bob = 0
    for j in range(int(N/2)):
        bob = bob + cards[2 * j + 1]
    else:
        alice = 0
    for i in range(int(N/2) + 1):
        alice = alice + cards[2 * i]
        
    bob = 0
    for j in range(int(N/2)):
        bob = bob + cards[2 * j + 1]
    
print(alice - bob)

Fixed submission:
N = int(input())
list = map(int,input().split(" "))
cards = sorted(list,reverse=True)

if len(cards) % 2 == 0:
    alice = 0
    for i in range(int(N/2)):
        alice = alice + cards[2 * i]
    bob = 0
    for j in range(int(N/2)):
        bob = bob + cards[2 * j + 1]
else:
    alice = 0
    for i in range(int(N/2) + 1):
        alice = alice + cards[2 * i]
    bob = 0
    for j in range(int(N/2)):
        bob = bob + cards[2 * j + 1]
        
print(alice - bob)

Buggy python submission (verdict: Runtime Error):
N = int(input())
list = map(int,input().split(" "))
cards = sorted(list,reverse=True)

#Aliceの得点（偶数番目の総和）
alice = 0
for i in range(int(N/2) + 1):
    alice = alice + cards[2 * i]

#Bobの得点（奇数番目の総和）
bob = 0
for j in range(int(N/2)):
    bob = bob + cards[2 * j + 1]
    
print(alice - bob)

Fixed submission:
N = int(input())
list = map(int,input().split(" "))
cards = sorted(list,reverse=True)

if len(cards) % 2 == 0:
    alice = 0
    for i in range(int(N/2)):
        alice = alice + cards[2 * i]
    bob = 0
    for j in range(int(N/2)):
        bob = bob + cards[2 * j + 1]
else:
    alice = 0
    for i in range(int(N/2) + 1):
        alice = alice + cards[2 * i]
    bob = 0
    for j in range(int(N/2)):
        bob = bob + cards[2 * j + 1]
        
print(alice - bob)
Buggy python submission (verdict: Time Limit Exceeded):
import math

if __name__ == '__main__':
    a, b, n = map(int, input().split())

    value = 0
    maxValue = 0

    while value <= n:
        res = math.floor((a * value) / b) - a * math.floor(value / b)
        maxValue = max(res, maxValue)
        value += 1
    
    print(maxValue)

Fixed submission:
import math


if __name__ == '__main__':
    a, b, n = map(int, input().split())

    x = min(b-1, n)

    res = math.floor((a*x)/b) - a * math.floor(x/b)
    print(res)
Buggy python submission (verdict: Time Limit Exceeded):
def get_subordinate(n, members):

    for i in range(1, n+1):
        occur = members.count(i)
        print(occur)
        

if __name__ == '__main__':
    n = int(input())
    members = list(map(int, input().rstrip().split()))
    get_subordinate(n, members)



Fixed submission:
def get_subordinate(n, members):
    new_dict = {}

    for i in range(1, n+1):
        new_dict[i] = 0

    for member in members:
        if member in new_dict:
            new_dict[member] += 1

    print(*new_dict.values(), sep="\n")


if __name__ == '__main__':
    n = int(input())
    members = list(map(int, input().rstrip().split()))
    get_subordinate(n, members)

Buggy python submission (verdict: Time Limit Exceeded):
def get_subordinate(n, members):

    for i in range(1, n+1):
        count = 0
        if i in members:
            for member in members:
                if i == member:
                    count += 1
        else:
            count = 0
        print(count)


if __name__ == '__main__':
    n = int(input())
    members = list(map(int, input().rstrip().split()))
    get_subordinate(n, members)



Fixed submission:
def get_subordinate(n, members):
    new_dict = {}

    for i in range(1, n+1):
        new_dict[i] = 0

    for member in members:
        if member in new_dict:
            new_dict[member] += 1

    print(*new_dict.values(), sep="\n")


if __name__ == '__main__':
    n = int(input())
    members = list(map(int, input().rstrip().split()))
    get_subordinate(n, members)

Buggy python submission (verdict: Time Limit Exceeded):
def get_subordinate(n, members):
    for i in range(1, n+1):
        count = 0
        for member in members:
            if i == member:
                count += 1
        print(count)


if __name__ == '__main__':
    n = int(input())
    members = list(map(int, input().rstrip().split()))
    get_subordinate(n, members)



Fixed submission:
def get_subordinate(n, members):
    new_dict = {}

    for i in range(1, n+1):
        new_dict[i] = 0

    for member in members:
        if member in new_dict:
            new_dict[member] += 1

    print(*new_dict.values(), sep="\n")


if __name__ == '__main__':
    n = int(input())
    members = list(map(int, input().rstrip().split()))
    get_subordinate(n, members)
Buggy python submission (verdict: Runtime Error):
def solve(a, b, c):
    print(f"{c} {a} {b}")


if __name__ == '__main__':
    xyz = input().split()

    x = int(xyz[0])
    y = int(xyz[1])
    z = int(xyz[2])

    solve(x, y, z)

Fixed submission:
def solve(a, b, c):
    print("%d %d %d"% (c, a, b))


if __name__ == '__main__':
    xyz = input().split()

    x = int(xyz[0])
    y = int(xyz[1])
    z = int(xyz[2])

    solve(x, y, z)
Buggy python submission (verdict: Time Limit Exceeded):
def solve(n, k):
    occurence = set()

    diff = n % k

    if diff == 0:
        print(diff)
        return 
    else:
        while n not in occurence:
            if k == 1:
                print(0)
                return

            occurence.add(n)

            n = abs(n - k)

            if n == 0:
                print(n)
                return

    min_value = min(occurence)
    print(min_value)


if __name__ == '__main__':
    nk = input().split()

    n = int(nk[0])
    k = int(nk[1])

    solve(n, k)


Fixed submission:
def solve(n, k):
    occurence = set()

    diff = n % k
    n = diff
    
    if diff == 0 or diff == 1:
        print(diff)
        return
    else:
        while n not in occurence:
            if k == 1:
                print(0)
                return

            occurence.add(n)

            n = abs(n - k)

            if n == 0:
                print(n)
                return

    min_value = min(occurence)
    print(min_value)


if __name__ == '__main__':
    nk = input().split()

    n = int(nk[0])
    k = int(nk[1])

    solve(n, k)

Buggy python submission (verdict: Time Limit Exceeded):
def solve(n, k):
    occurence = set()

    while n not in occurence:
        if k == 1:
            print(0)
            return

        occurence.add(n)

        n = abs(n - k)
        if n == 0:
            print(n)
            return

    min_value = min(occurence)
    print(min_value)


if __name__ == '__main__':
    nk = input().split()

    n = int(nk[0])
    k = int(nk[1])

    solve(n, k)


Fixed submission:
def solve(n, k):
    occurence = set()

    diff = n % k
    n = diff
    
    if diff == 0 or diff == 1:
        print(diff)
        return
    else:
        while n not in occurence:
            if k == 1:
                print(0)
                return

            occurence.add(n)

            n = abs(n - k)

            if n == 0:
                print(n)
                return

    min_value = min(occurence)
    print(min_value)


if __name__ == '__main__':
    nk = input().split()

    n = int(nk[0])
    k = int(nk[1])

    solve(n, k)
Buggy python submission (verdict: Runtime Error):
for i in range(10**8):
	for j in range(-10**4,10**4):
    	if i**5 - j **5 :
      		print(i.j)
      		break

Fixed submission:
n = int(input())
flag = False
for i in range(10**8):
    for j in range(-10**4,10**4):
        if i**5 - j **5 == n :
            print(i,j)
            flag = True
            break
    if flag == True :
        break
Buggy python submission (verdict: Time Limit Exceeded):
import sys 
try:
    sys.stdin = open('input.txt', 'r') 
    sys.stdout = open('output.txt', 'w')
except:
    pass

input = sys.stdin.readline
ht,st,ha,sa = map(int,input().split())
while True:
	ha -= st
	ht -= sa
	if ha==0 or ht==0:
		break
print("Yes") if ha==0 else print("No")
	



Fixed submission:
import sys 
import math
try:
    sys.stdin = open('input.txt', 'r') 
    sys.stdout = open('output.txt', 'w')
except:
    pass

input = sys.stdin.readline
ht,st,ha,sa = map(int,input().split())
t = math.ceil(ht/sa)
a = math.ceil(ha/st)
if t>=a:
	print("Yes")
else:
	print("No")
Buggy python submission (verdict: Runtime Error):
n, m, q = map(int, input().split())

abcd = [list(map(int, input().split())) for _ in range(q)]
from itertools import combinations_with_replacement as cwr
A = list(cwr(range(1, m+1), n))


maxPoint = 0
for item in A:
  point = 0
  for i in range(len(abcd)):
    a = abcd[i][0]
    b = abcd[i][1]
    c = abcd[i][2]
    d = abcd[i][3]
    if item[b-1] - item[a-1] == item[c-1]:
      point += d
  if point > maxPoint:
    maxPoint = point
print(maxPoint)

Fixed submission:
n, m, q = map(int, input().split())

abcd = [list(map(int, input().split())) for _ in range(q)]
from itertools import combinations_with_replacement as cwr
AList = list(cwr(range(1, m+1), n))


maxPoint = 0
for A in AList:
  point = 0
  for abc in abcd:
    a = abc[0]
    b = abc[1]
    c = abc[2]
    d = abc[3]
    if A[b-1] - A[a-1] == c:
      point += d
  if point > maxPoint:
    maxPoint = point
print(maxPoint)

Buggy python submission (verdict: Runtime Error):
n, m, q = map(int, input().split())

abcd = [list(map(int, input.split())) for _ in range(q)]
from itertools import combinations_with_replacement as cwr
A = list(cwr(range(1, m+1), n))


maxPoint = 0
for item in A:
  point = 0
  for i in range(len(abcd))
  a = abcd[i][0]
  b = abcd[i][1]
  c = abcd[i][2]
  d = abcd[i][3]
  if item[b-1] - item[a-1] == item[c-1]:
    point += d
  if point > maxPoint:
    maxPoint = point
print(maxPoint)

Fixed submission:
n, m, q = map(int, input().split())

abcd = [list(map(int, input().split())) for _ in range(q)]
from itertools import combinations_with_replacement as cwr
AList = list(cwr(range(1, m+1), n))


maxPoint = 0
for A in AList:
  point = 0
  for abc in abcd:
    a = abc[0]
    b = abc[1]
    c = abc[2]
    d = abc[3]
    if A[b-1] - A[a-1] == c:
      point += d
  if point > maxPoint:
    maxPoint = point
print(maxPoint)

Buggy python submission (verdict: Time Limit Exceeded):
n, m, q = map(int, input().split())


abcdList = []
for _ in range(q):
  abcd = list(map(int, input().split()))
  abcdList.append(abcd)
aList = []
def createA(tempA, x, t):
  if x!=0:
      tempA.append(t)
  if x == n:
    abc = []
    for item in tempA:
        abc.append(item)
    aList.append(abc)
    return
  x += 1
  for i in range(t, m+1):
    if x == 1:
        tempA = []
    createA(tempA, x, i)
    tempA.pop(-1)



x = 0
createA([], x, 1)
maxAns = 0
for item in aList:
  ans = 0
  for i in range(q):
    b = abcdList[i][1]
    a = abcdList[i][0]
    c = abcdList[i][2]
    d = abcdList[i][3]
    if item[b-1] - item[a-1] == c:
      ans += d
  if ans > maxAns:
    maxAns = ans
print(maxAns)
    
  
  




Fixed submission:
n, m, q = map(int, input().split())

abcd = [list(map(int, input().split())) for _ in range(q)]
from itertools import combinations_with_replacement as cwr
AList = list(cwr(range(1, m+1), n))


maxPoint = 0
for A in AList:
  point = 0
  for abc in abcd:
    a = abc[0]
    b = abc[1]
    c = abc[2]
    d = abc[3]
    if A[b-1] - A[a-1] == c:
      point += d
  if point > maxPoint:
    maxPoint = point
print(maxPoint)
Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
k = int(input())
result = 0

# 3つとも等しい数字
for i in range(1, k+1):
    for j in range(i, k+1):
        for m in range(j, k+1):
            if i==j==m:
                result += i
            elif i==j or j==m:
                result += gcd(i, m)*3
            else:
                result += gcd(i, gcd(j,m))*6
print(result)

Fixed submission:
from math import gcd
k = int(input())
result = 0

# 3つとも等しい数字
for i in range(1, k+1):
    for j in range(i, k+1):
        for m in range(j, k+1):
            if i==j==m:
                result += i
            elif i==j or j==m:
                result += gcd(i, m)*3
            else:
                result += gcd(i, gcd(j,m))*6
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
import itertools
k = int(input())

result = 0

# 3つとも等しい数字
for i in range(1, k+1):
    result += i

# 2つが等しくて、1つが異なる数字
for set in list(itertools.combinations(range(1, k+1), 2)):
    result += (gcd(set[0], set[1]))*6

# 3つとも異なる
for set in list(itertools.combinations(range(1, k+1), 3)):
    result += (gcd(gcd(set[0], set[1]), set[2]))*6

print(result)

Fixed submission:
from math import gcd
k = int(input())
result = 0

# 3つとも等しい数字
for i in range(1, k+1):
    for j in range(i, k+1):
        for m in range(j, k+1):
            if i==j==m:
                result += i
            elif i==j or j==m:
                result += gcd(i, m)*3
            else:
                result += gcd(i, gcd(j,m))*6
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
from fractions import gcd
import itertools
k = int(input())

result = 0

# 3つとも等しい数字
for i in range(1, k+1):
    result += i

# 2つが等しくて、1つが異なる数字
for i in range(1, k+1):
    liste = list(range(1, k+1))
    liste.pop(i-1)
    for j in liste:
        result += (gcd(i, j))*3

# 3つとも異なる
for set in list(itertools.combinations(range(1, k+1), 3)):
    result += (gcd(gcd(set[0], set[1]), set[2]))*6

print(result)



Fixed submission:
from math import gcd
k = int(input())
result = 0

# 3つとも等しい数字
for i in range(1, k+1):
    for j in range(i, k+1):
        for m in range(j, k+1):
            if i==j==m:
                result += i
            elif i==j or j==m:
                result += gcd(i, m)*3
            else:
                result += gcd(i, gcd(j,m))*6
print(result)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
numbers = list(map(int, input().split(' ')))
counter = 0

for i in range(n):
    flag = True
    for j in range(i):
        if numbers[i] > numbers[j]:
            flag = False
    if flag is True:
        counter += 1
print(counter)

Fixed submission:
n = int(input())
numbers = list(map(int, input().split(' ')))
counter = 0
min_value = numbers[0]
for number in numbers:
    if number <= min_value:
        counter += 1
        min_value = number

print(counter)
Buggy python submission (verdict: Time Limit Exceeded):
import fractions
k = int(input())
ans = 0

for a in range(1, k+1):
    for b in range(1, a+1):
        for c in range(1, b+1):
            g_ab = fractions.gcd(a ,b)
            g_abc = fractions.gcd(g_ab, c)
            if a != b != c:
                ans += g_abc * 6
            elif a == b == c:
                ans += g_abc
            else:
                ans += g_abc * 3
print(ans)

Fixed submission:
import math
k = int(input())
ans = 0

for a in range(1, k+1):
    for b in range(1, a+1):
        for c in range(1, b+1):
            g_ab = math.gcd(a ,b)
            g_abc = math.gcd(g_ab, c)
            if a != b != c:
                ans += g_abc * 6
            elif a == b == c:
                ans += g_abc
            else:
                ans += g_abc * 3
print(ans)