Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N = int(input())
S = input()

candi = list(itertools.product(range(10),repeat=3))

cnt = 0

for i in candi:
    flag1 = False
    flag2 = False
    flag3 = False
    for j in S:
        if flag1 == False and int(j) == i[0]:
            flag1 = True
            continue
        if flag1 == True and flag2 == False and int(j)==i[1]:
            flag2 = True
            continue
        if flag2 == True and flag3 == False and int(j)==i[2]:
            flag3 = True
            cnt += 1    
            break

print(cnt)



Fixed submission:
import itertools

N = int(input())
S = input()

candi = list(itertools.product(range(10),repeat=3))

cnt = 0

for i in candi:
    if str(i[0]) in S:
        T = S[S.find(str(i[0]))+1:]
        if str(i[1]) in T:
            U = T[T.find(str(i[1]))+1:]
            if str(i[2]) in U:
                cnt += 1

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

#A.sort()
B.sort()
C.sort()

def is_ok(arg, target, abc):
    if abc[arg] > target:
        return True
    else:
        return False

def bict(left, right, target, abc):

    while(right - left > 1):
        mid = (right + left)//2

        if is_ok(mid, target, abc):
            right = mid
        else:
            left = mid

    return right

cnt = 0
for a in A:
    b_min_index = bict(-1, N, a, B)
    for b_index in range(b_min_index,N):
        c_min_index = bict(-1, N ,B[b_index],C)
        c_num = N - c_min_index
        cnt += c_num

print(cnt)


Fixed submission:

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

A.sort()
B.sort()
C.sort()

def is_ok(arg, target, abc):
    if abc[arg] >= target:
        return True
    else:
        return False

def is_ok2(arg, target, abc):
    if abc[arg] > target:
        return True
    else:
        return False


def bict(left, right, target, abc, jug):

    while(right - left > 1):
        mid = (right + left)//2

        if jug(mid, target, abc):
            right = mid
        else:
            left = mid

    return right

cnt = 0
for b in B:
    a_min_index = bict(-1, N, b, A, is_ok)
    c_min_index = bict(-1, N, b, C, is_ok2)
    temp = (a_min_index - 1 + 1) * (N - c_min_index)
    cnt += temp

print(cnt)

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

A.sort()
B.sort()
C.sort()

def is_ok(arg, target, abc):
    if abc[arg] > target:
        return True
    else:
        return False

def bict(left, right, target, abc):

    while(right - left > 1):
        mid = (right + left)//2

        if is_ok(mid, target, abc):
            right = mid
        else:
            left = mid

    return right

cnt = 0
for a in A:
    b_min_index = bict(-1, N, a, B)
    for b_index in range(b_min_index,N):
        c_min_index = bict(-1, N ,B[b_index],C)
        c_num = N - c_min_index
        cnt += c_num

print(cnt)


Fixed submission:

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

A.sort()
B.sort()
C.sort()

def is_ok(arg, target, abc):
    if abc[arg] >= target:
        return True
    else:
        return False

def is_ok2(arg, target, abc):
    if abc[arg] > target:
        return True
    else:
        return False


def bict(left, right, target, abc, jug):

    while(right - left > 1):
        mid = (right + left)//2

        if jug(mid, target, abc):
            right = mid
        else:
            left = mid

    return right

cnt = 0
for b in B:
    a_min_index = bict(-1, N, b, A, is_ok)
    c_min_index = bict(-1, N, b, C, is_ok2)
    temp = (a_min_index - 1 + 1) * (N - c_min_index)
    cnt += temp

print(cnt)
Buggy python submission (verdict: Runtime Error):
r=int(input(半径 R の円の周長を出力してください。:))
result=2*double(r)*3.14
print(result)

Fixed submission:
import math
r = int(input())
print(2*math.pi*r)
Buggy python submission (verdict: Runtime Error):
input = map(int, [input()] + input().split(' '))
[k,start,end] = input

for i in range(start, end + 1):
  if i % k == 0:
    return True
return False



Fixed submission:
k = int(input())
(start, end) = map(int, input().split())


for i in range(start, end+1):
  if i % k == 0:
    print('OK')
    exit(0)
print('NG')

Buggy python submission (verdict: Runtime Error):
k = int(input())
[start end] = input().split(' ')
start = int(start)
end = int(end)

for i in range(start, end):
  if i % k == 0:
    return True
return False

Fixed submission:
k = int(input())
(start, end) = map(int, input().split())


for i in range(start, end+1):
  if i % k == 0:
    print('OK')
    exit(0)
print('NG')

Buggy python submission (verdict: Runtime Error):
k = input()
[start,end] = input().split(' ')

for i in range(start,end+1):
  if i % k == 0:
    return True
return False

Fixed submission:
k = int(input())
(start, end) = map(int, input().split())


for i in range(start, end+1):
  if i % k == 0:
    print('OK')
    exit(0)
print('NG')
Buggy python submission (verdict: Runtime Error):
import math
r = input()
circ = 2 * math.pi * r
print(circ)

Fixed submission:
R = int(input())
circumference = 2 * 3.14 * R
print(circumference)

Buggy python submission (verdict: Runtime Error):
circumference = 2 * math.pi * input()
print(circumference)

Fixed submission:
R = int(input())
circumference = 2 * 3.14 * R
print(circumference)

Buggy python submission (verdict: Runtime Error):
import math
r = input()
print(f"{math.pi * r ** 2}"}

Fixed submission:
R = int(input())
circumference = 2 * 3.14 * R
print(circumference)
Buggy python submission (verdict: Runtime Error):
from math import sqrt
v = list(map(int, input().split()))
if (v[0]+v[1]) < v[2]:
    print('Yes')
else:
    print('No')

Fixed submission:
x = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(x[int(input())-1])

Buggy python submission (verdict: Runtime Error):
x = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(x[int(input())])

Fixed submission:
x = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(x[int(input())-1])

Buggy python submission (verdict: Runtime Error):
length = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

K = int(input())


print(length[K])


Fixed submission:
length = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

K = int(input())


print(length[K-1])
Buggy python submission (verdict: Runtime Error):
a = input().split()

b = [int(x) for x in input().split()]

c = input()

if c == a[0] && :
  b[0]-=1
elif c == a[1]:
  b[1]-=1

if b[0] < 0:
  b[0] = 0
if b[1] < 0:
  b[1] = 0
print("{} {}".format(*b))

Fixed submission:
a = input().split()
 
b = [int(x) for x in input().split()]
 
c = input()
 
if c == a[0]:
  b[0]-=1
elif c == a[1]:
  b[1]-=1
 
if b[0] < 0:
  b[0] = 0
if b[1] < 0:
  b[1] = 0
print("{} {}".format(*b))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
ans = []

for i in range(n):
    ans.append(1+a.index(i+1))
print(*ans)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans = [0 for i in range(n)]

for i in range(n):
    ans[a[i]-1] = i+1
print(*ans)
Buggy python submission (verdict: Runtime Error):
import math
import collections

def fact(n):
    c = []
    while n % 2 == 0:
        c.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            c.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        c.append(n)
    return c

a, b = map(int, input().split())
g = math.gcd(a, b)
c = collections.Counter(fact(g))

print(len(c)+1)

Fixed submission:
import fractions
import collections

def fact(n):
    c = []
    while n % 2 == 0:
        c.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            c.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        c.append(n)
    return c

a, b = map(int, input().split())
g = fractions.gcd(a, b)
c = collections.Counter(fact(g))

print(len(c)+1)
Buggy python submission (verdict: Time Limit Exceeded):
l, r = list(map(int, input().split()))
ans = r*r
for j in range(r, l, -1):
    for i in range(j-1, l-1, -1):
        ans = min(ans, (i*j)%2019)
        if ans == 2:
            break
print(ans)

Fixed submission:
L, R = map(int, input().split())
    
ans = 2019
for i in range(L, min(L+2019, R),1):
    for j in range(i+1, min(L+2019, R)+1,1):
        ans = min(ans, (i*j)%2019)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
l, r = list(map(int, input().split()))
ans = r*r
for i in range(l, r):
    for j in range(i+1, r+1):
        ans = min(ans, (i*j)%2019)
print(ans)

Fixed submission:
L, R = map(int, input().split())
    
ans = 2019
for i in range(L, min(L+2019, R),1):
    for j in range(i+1, min(L+2019, R)+1,1):
        ans = min(ans, (i*j)%2019)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
K,S=map(int,input().split())
ans=0
for x in range(K+1):
  for y in range(K+1):
    for z in range(K+1):
      if x+y+z==S: ans+=1
print(ans)

Fixed submission:
K,S=map(int,input().split())
ans=0
for x in range(K+1):
  for y in range(K+1):
    z=S-x-y
    if 0<=z<=K: ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
l=list(map(int,input().split()))
a=l[0]
b=l[1]
n=l[2]
if b-1<n:
  i=b-1
else:
  i=n
y=(((a*i)/b)//1)-(a*((i/b)//1))
print(int(y))

Fixed submission:
k=int(input())
l=list(map(int,input().split()))
x=l[0]//k
if(x*k==l[0] or k*(x+1)<=l[1]):
  print("OK")
else:
  print("NG")

Buggy python submission (verdict: Runtime Error):
l=list(map(int,input().split()))
a=l[0]
b=l[1]
n=l[2]
x=0
if b-1<n:
  i=b-1
  y=(((a*i)/b)//1)-(a*((i/b)//1))
else:
  i=n
  y=(((a*i)/b)//1)-(a*((i/b)//1))
print(int(x))

Fixed submission:
k=int(input())
l=list(map(int,input().split()))
x=l[0]//k
if(x*k==l[0] or k*(x+1)<=l[1]):
  print("OK")
else:
  print("NG")
Buggy python submission (verdict: Time Limit Exceeded):
l=list(map(int,input().split()))
a=l[0]
b=l[1]
n=l[2]
x=0
for i in range(1,n+1):
  y=(((a*i)/b)//1)-(a*((i/b)//1))
  if(y>x):
    x=y
print(int(x))

Fixed submission:
l=list(map(int,input().split()))
a=l[0]
b=l[1]
n=l[2]
if b-1<=n:
  i=b-1
else:
  i=n
y=(((a*i)/b)//1)-(a*((i/b)//1))
print(int(y))
Buggy python submission (verdict: Runtime Error):
b, c = map(int, input().split())
a = list(map(int, input().split()))
d = sum(a)
new_a = list(reversed(sorted(a)))
e = 0
f = 0
g = 4*c
while new_a[e] >= d/g:
    e = e+1
    if e == n:
        break
    f = f+1
if f >= c:
    print("Yes")
else:
    print("No")


Fixed submission:
n, m = map(int, input().split())
ai = list(map(int, input().split()))
required = sum(ai) / (4 * m)
count = 0
for a in sorted(ai, reverse=True):
    if a >= required:
        count += 1
    else:
        break
print("YNeos"[count < m::2])

Buggy python submission (verdict: Runtime Error):
b, c = map(int, input().split())
a = list(map(int, input().split()))
d = sum(a)
new_a = list(reversed(sorted(a)))
e = 0
f = 0
g = 4*c
while new_a[e] >= d/g:
    e = e+1
    f = f+1
if f >= c:
    print("Yes")
else:
    print("No")


Fixed submission:
n, m = map(int, input().split())
ai = list(map(int, input().split()))
required = sum(ai) / (4 * m)
count = 0
for a in sorted(ai, reverse=True):
    if a >= required:
        count += 1
    else:
        break
print("YNeos"[count < m::2])
Buggy python submission (verdict: Runtime Error):
print(input()+input())

Fixed submission:
print("".join(input().split()[::-1]))
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
r, s, p = map(int, input().split())
t = input()
score_map = {
    "r": p,
    "p": s,
    "s": r,
    "n": 0,
}
t = list(t)
ans = 0
for i in range(k):
    skipped_list = t[i::k]
    print(f"{skipped_list}===")
    for j, c in enumerate(skipped_list[1:]):
        if skipped_list[j] == c:
            skipped_list[j+1] = "n"
    for c in skipped_list:
        ans += score_map[c]
print(ans)


Fixed submission:
n, k = map(int, input().split())
r, s, p = map(int, input().split())
t = input()
score_map = {
    "r": p,
    "p": s,
    "s": r,
    "n": 0,
}
t = list(t)
ans = 0
for i in range(k):
    skipped_list = t[i::k]
    for j, c in enumerate(skipped_list[1:]):
        if skipped_list[j] == c:
            skipped_list[j+1] = "n"
    for c in skipped_list:
        ans += score_map[c]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
s = input()
b = []
tmp = 0
while True:
    tmp = s.find("AC", tmp)
    if tmp == -1:
        break
    tmp += 1
    b.append(tmp)
ans = []
for i in range(q):
    l, r = map(int, input().split())
    ans.append(sum(l <= x < r for x in b))
print(*ans, sep="\n")


Fixed submission:
n, q = map(int, input().split())
s = input()
appmap = [0] * (n + 1)
for i in range(n):
    appmap[i + 1] = appmap[i] + (1 if s[i: i + 2] == "AC" else 0)
for i in range(q):
    l, r = map(int, input().split())
    print(appmap[r - 1] - appmap[l - 1])

Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())
s = input()
ans = []
for i in range(q):
    l, r = map(int, input().split())
    ans.append(s[l - 1: r].replace("AC", "*").count("*"))
print(*ans, sep="\n")


Fixed submission:
n, q = map(int, input().split())
s = input()
appmap = [0] * (n + 1)
for i in range(n):
    appmap[i + 1] = appmap[i] + (1 if s[i: i + 2] == "AC" else 0)
for i in range(q):
    l, r = map(int, input().split())
    print(appmap[r - 1] - appmap[l - 1])

Buggy python submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
ans = []
for i in range(3):
    l, r = map(int, input().split())
    ans.append(s[l - 1: r].replace("AC", "*").count("*"))
print(*ans, sep="\n")


Fixed submission:
n, q = map(int, input().split())
s = input()
appmap = [0] * (n + 1)
for i in range(n):
    appmap[i + 1] = appmap[i] + (1 if s[i: i + 2] == "AC" else 0)
for i in range(q):
    l, r = map(int, input().split())
    print(appmap[r - 1] - appmap[l - 1])
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
data = []
for i in range(n):
    a, b = map(int, input().split())
    data.append([a, b])
data.sort(key=lambda x: x[0])   #値段でソート
prices = []
for p in data:
    for i in range(p[1]):
        prices.append(p[0])
print(sum(prices[:m]))


Fixed submission:
n, m = map(int, input().split())
data = []   #値段、個数
for i in range(n):
    a, b = map(int, input().split())
    data.append([a, b])
data.sort(key=lambda x: x[0])   #値段でソート
ans = 0
for p in data:
    ans += p[0] * min(m, p[1])
    m -= p[1]
    if m <= 0:
        break

print(ans)
Buggy python submission (verdict: Runtime Error):
n, x, y = map(int, input().split())
print((n - x + 1) * (n - y + 1))

Fixed submission:
n, x, y = [int(input()) for _ in range(3)]
print((n - x + 1) * (n - y + 1))
Buggy python submission (verdict: Runtime Error):
d = [int(input()) for i in range(0, 3)]
print("Hello World" if d[0] == 1 else sum(d[1:]))

Fixed submission:
n = int(input())
print("Hello World" if n == 1 else sum([int(input()) for i in range(0, 2)]))
Buggy python submission (verdict: Runtime Error):
import java.util.Scanner;

class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        scan.close();
        System.out.println(0b1 << Integer.toBinaryString(N).length() - 1);
    }
}


Fixed submission:
print(1 << len(bin(int(input()))) - 3)
Buggy python submission (verdict: Runtime Error):
l,r=map(int,raw_input().split())
if l<2019 and r<2019:
  print(((l%2019)*(r%2019))%2019)
else:
  if (r-l)>=2019:
    print('0')
  else:
  	print(((l%2019)*((l+1)%2019))%2019)

Fixed submission:
n,a,b=map(int,raw_input().split())
print(min(n*a,b))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input(''))
a= [int(s) for s in input().split(" ")]

for i in range(1,n+1):
    s=0
    for k in range(0,len(a)):
        if a[k]==i:
            s=s+1 
    print(s)

Fixed submission:
n=int(input(''))
a= [int(s) for s in input().split(" ")]
t=[0]*(n+1)
for i in range(0,len(a)):
        t[a[i]]+=1
for i in range(1,n+1):
    print(t[i])
Buggy python submission (verdict: Runtime Error):
N = int(input())
 
ABI = sorted(((a, i) for i, a in enumerate(A, 1)), reverse=True)
prev = [0]
for k, (a,i) in enumerate(ABI):
  curr = [0]*(k+2)
  for l in range(k+1):
    curr[l] = max(curr[l], prev[l]+abs(N-i-k+l)*a)
    curr[l+1] = prev[l]+abs(i-l-1)*a
    
  prev = curr
 
print(max(prev))

Fixed submission:
N = int(input())
A = [int(s) for s in input().split(" ")]
ABI = sorted(((a, i) for i, a in enumerate(A, 1)), reverse=True)
prev = [0]
for k, (a,i) in enumerate(ABI):
  curr = [0]*(k+2)
  for l in range(k+1):
    curr[l] = max(curr[l], prev[l]+abs(N-i-k+l)*a)
    curr[l+1] = prev[l]+abs(i-l-1)*a
    
  prev = curr
 
print(max(prev))

Buggy python submission (verdict: Runtime Error):
N = int(input())
 
A = [int(s) for s in input().split(" ")]
ABI = sorted(((a, i) for i, a in enumerate(A, 1)), reverse=True)
prev = [0]
for k, (a,i) in enumerate(ABI):
  curr = [0]*(k+2)
  for l in range(k+1):
    curr[l] = max(curr[l], prev[l]+abs(N-i-k+l)*a)
    curr[l+1] = prev[l]+abs(i-l-1)*a
    print(curr,k,i)
  prev = curr
 
print(max(prev))

Fixed submission:
N = int(input())
A = [int(s) for s in input().split(" ")]
ABI = sorted(((a, i) for i, a in enumerate(A, 1)), reverse=True)
prev = [0]
for k, (a,i) in enumerate(ABI):
  curr = [0]*(k+2)
  for l in range(k+1):
    curr[l] = max(curr[l], prev[l]+abs(N-i-k+l)*a)
    curr[l+1] = prev[l]+abs(i-l-1)*a
    
  prev = curr
 
print(max(prev))
Buggy python submission (verdict: Runtime Error):
import numpy as np
import fractions

S = input()
F = int(S[0:2])
E = int(S[2:4])
if(0 < F and F<13 and 0 < E and E<13):
    print("AMBIGUOUS")
elif(0<F and F<13 and E>13):
    print("MMYY")
elif(F>13 and 0<E and E<13):
    print("YYMM")
else
    print("NA")


Fixed submission:
import numpy as np
import fractions

S = input()
F = int(S[0:2])
E = int(S[2:4])

if(0 < F and F < 13 ):
    if(0 < E and E<13):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:#F>=13
    if(0 < E and E < 13):
        print("YYMM")
    else:
        print("NA")
Buggy python submission (verdict: Runtime Error):
import numpy as np
import fractions

N = int(input())
A = np.array([int(i) for i in (input()).split(" ")])
maxA = np.max(A)

if(maxA == np.min(A)):
    print(maxA)
else:
    check = np.unique(maxA // np.arange(1,maxA))
    #check = minA // np.arange(1,minA)
    for i in check[::-1]:
        #全てのAに対してiで割り切れるか＝最大公約数
        #iで割り切れた数＝len(A)-1なら，残りの数にiをかけて最大公約数に出来る．
        num = np.sum((A % i>0))
        if(num < 2):
            print(i)
            break

Fixed submission:
a,b,t = map(int, (input()).split(" "))
n = t//a
print("{}".format(n*b,'d'))

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

N = int(input())
A = np.array([int(i) for i in (input()).split(" ")])
minA = np.min(A)

if(minA == np.max(A)):
    print(minA)
else:
    check = np.unique(minA // np.arange(1,minA))
    #check = minA // np.arange(1,minA)
    for i in check[::-1]:
        #全てのAに対してiで割り切れるか＝最大公約数
        #iで割り切れた数＝len(A)-1なら，残りの数にiをかけて最大公約数に出来る．
        num = np.sum((A % i>0))
        if(num < 2):
            j = A[np.where(A % i>0)][0]
            #print(i,j,i*j//math.gcd(i,j))
            if(i*j//math.gcd(i,j) < 10**9):
                print(i)
                break

Fixed submission:
a,b,t = map(int, (input()).split(" "))
n = t//a
print("{}".format(n*b,'d'))
Buggy python submission (verdict: Runtime Error):
k = int(input())
a, b = [int(x) for x in input()]
res = a//k < b//k or not a%k or not b%k
print('OK' if res else 'NG')

Fixed submission:
k = int(input())
a, b = [int(x) for x in input().split()]
res = (a//k < b//k) or (not a%k) or (not b%k)
print('OK' if res else 'NG')

Buggy python submission (verdict: Runtime Error):
k = int(input())
a, b = [int(x) for x in input()]
res = a//k < b//k or not a%k not b%k
print('OK' if res else 'NG')

Fixed submission:
k = int(input())
a, b = [int(x) for x in input().split()]
res = (a//k < b//k) or (not a%k) or (not b%k)
print('OK' if res else 'NG')

Buggy python submission (verdict: Runtime Error):
import sys

k, tmp = [line.rstrip() for line in sys.stdin]
k, a, b = int(k), [int(x) for x in tmp.split()]
print(a//k < b//k)

Fixed submission:
k = int(input())
a, b = [int(x) for x in input().split()]
res = (a//k < b//k) or (not a%k) or (not b%k)
print('OK' if res else 'NG')
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
List=list(map(int,input().split()))

counter=0
for i in range(N):
  Pj_list=[]
  for j in range(i+1):
    Pj_list.append(List[j])
  Mi=min(Pj_list)
  if Mi==List[i]:
    counter+=1
print(counter)

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

counter=0
mj=N
for i in range(N):
  if mj>List[i]:
    mj=List[i]
  if List[i]==mj:
    counter+=1
print(counter)

Buggy python submission (verdict: Runtime Error):
N=int(input())
List=list(map(int,input().split()))

counter=0
for i in range(N):
  Pj_list=[]
  for j in range(i):
    Pj=List[j]
    Pj_list.append(Pj)
  Mi=min(Pj_list)
  if Mi==List[i]:
    counter+=1

print(counter)

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

counter=0
mj=N
for i in range(N):
  if mj>List[i]:
    mj=List[i]
  if List[i]==mj:
    counter+=1
print(counter)

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

break_count=0
break_flag=0
for i in range(N):
  for j in range(i):
    if List[i]>List[j]:
      break_count+=1
      break_flag=1
      break
  if break_flag==1:
    break_flag=0
    continue
print(N-break_count)

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

counter=0
mj=N
for i in range(N):
  if mj>List[i]:
    mj=List[i]
  if List[i]==mj:
    counter+=1
print(counter)

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

i_ok_count=0
break_flag=0
for i in range(len(List)):
  for j in range(i):
    if List[i]>List[j]:
      break_flag=1
      break
  if break_flag==1:
    break_flag=0
    continue
  i_ok_count+=1
  break_flag=0

print(i_ok_count)

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

counter=0
mj=N
for i in range(N):
  if mj>List[i]:
    mj=List[i]
  if List[i]==mj:
    counter+=1
print(counter)

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

#print(N)
#print(List[0])
i_ok_count=0
break_flag=0
for i in range(len(List)):
  #print(i+1)#i
  for j in range(i):
    if List[i]>List[j]:
      break_flag=1
      break
  if break_flag!=1:
    i_ok_count+=1
  break_flag=0

print(i_ok_count)

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

counter=0
mj=N
for i in range(N):
  if mj>List[i]:
    mj=List[i]
  if List[i]==mj:
    counter+=1
print(counter)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
print(sum(range(1, N)))


Fixed submission:
N=int(input())
print(sum(range(1, N)))

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
x=0
for i in range(N):
    x=x+i
print(x)    


Fixed submission:
N=int(input())
print(sum(range(1, N)))