Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
x=int(input())
y=[x]

i=1
while i < N:
    x=int(input())
    a=0
    flag=1
    while a < len(y):
        if y[a]==x:
            del y[a]
            flag=-1
            break
        a+=1
    if flag==1:
        y.append(x)
    i+=1

print(len(y))


Fixed submission:

N = int(input())
x = [int(input()) for i in range(N)]

x.sort()
i=0
while i < N-1:
    if x[i]==x[i+1]:
        del x[i+1]
        del x[i]
        N-=2
        continue
    i+=1
print(len(x))

Buggy python submission (verdict: Runtime Error):

N = int(input())
x=int(input())
y=[x]


for i in range(1,N):
    x=int(input())
    a=0
    flag=1
    while a < i:
        if y[a]==x:
            del y[a]
            flag=-1
            break
        a+=1
    if flag==1:
        y.append(x)

print(len(y))


Fixed submission:

N = int(input())
x = [int(input()) for i in range(N)]

x.sort()
i=0
while i < N-1:
    if x[i]==x[i+1]:
        del x[i+1]
        del x[i]
        N-=2
        continue
    i+=1
print(len(x))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
x = [int(input()) for i in range(N)]

i=0
while i < N:

    j=i+1
    while j < N:
        if x[i]==x[j]:
            del x[j]
            del x[i]
            N-=2
            i-=1
            break
        j+=1
    i+=1


print(len(x))

Fixed submission:

N = int(input())
x = [int(input()) for i in range(N)]

x.sort()
i=0
while i < N-1:
    if x[i]==x[i+1]:
        del x[i+1]
        del x[i]
        N-=2
        continue
    i+=1
print(len(x))

Buggy python submission (verdict: Time Limit Exceeded):

N = int(input())
x = [int(input()) for i in range(N)]

i=0
while i < N:
    if x[i]==0:
        i+=1
        continue
    j=i+1
    while j < N:
        if x[i]==x[j]:
            x[i]=x[j]=0
            break
        j+=1
    i+=1

res=0
for i in x:
    if i!=0:
        res+=1

print(res)

Fixed submission:

N = int(input())
x = [int(input()) for i in range(N)]

x.sort()
i=0
while i < N-1:
    if x[i]==x[i+1]:
        del x[i+1]
        del x[i]
        N-=2
        continue
    i+=1
print(len(x))

Buggy python submission (verdict: Runtime Error):

N = int(input())
x = [int(input()) for i in range(N)]

y=[0]*(100000+1)


for i in range(N):
    if y[x[i]]==0:
        y[x[i]]=1
    else:
        y[x[i]]=0

sum=0
for i in y:
    sum+=i

print(sum)

Fixed submission:

N = int(input())
x = [int(input()) for i in range(N)]

x.sort()
i=0
while i < N-1:
    if x[i]==x[i+1]:
        del x[i+1]
        del x[i]
        N-=2
        continue
    i+=1
print(len(x))
Buggy python submission (verdict: Runtime Error):

N = int(input())
x = list(map(int, input().split()))

def quicksort(x):
    if x==[]: return []

    smallerSorted = quicksort([a for a in x[1:] if a <= x[0]])
    biggerSorted = quicksort([a for a in x[1:] if a > x[0]])

    return(smallerSorted+[x[0]]+biggerSorted)


y = quicksort(x)
width=[0,0]
height=[0,0]


for i in range(0,len(y)-1):
    if (y[len(y)-1-i]==y[len(y)-2-i] and width[0]==0):
        width[0]=y[len(y)-1-i]
        width[1]=len(y)-1-i
        continue
    if (width!=0 and y[len(y)-1-i]==y[len(y)-2-i]):
        if(len(y)-1-i==width[1]-1):
            continue
        height[0]=y[len(y)-1-i]
        break



print('{0}'.format(int(width[0])*int(height[0])))



quit()

Fixed submission:

N = int(input())
x = list(map(int, input().split()))

y=sorted(x)
width=[0,0]
height=[0,0]


for i in range(0,len(y)-1):
    if (y[len(y)-1-i]==y[len(y)-2-i] and width[0]==0):
        width[0]=y[len(y)-1-i]
        width[1]=len(y)-1-i
        continue
    if (width!=0 and y[len(y)-1-i]==y[len(y)-2-i]):
        if(len(y)-1-i==width[1]-1):
            continue
        height[0]=y[len(y)-1-i]
        break



print('{0}'.format(int(width[0])*int(height[0])))



quit()
Buggy python submission (verdict: Runtime Error):

def theather():
  total = 0
  try:
    N = int(input())
    l_r = (list(map(lambda x: int(x), input().split(' '))) for _ in range(N))
  except:
    return
  if not (1 <= N and N <= 1000): return
  for l, r in l_r:
    if 1 <= l and l <= 100000 or 1 <= r and r <= 100000:
      total += r - l + 1
    else:
      return
  print(total)

if __name__ == "__main__":
  theater()

Fixed submission:
def theater():
    total = 0
    try:
        N = int(input())
        l_r = (list(map(lambda x: int(x), input().split(' '))) for elem in range(N))
    except:
        return
    if not (1 <= N and N <= 1000): return
    for l, r in l_r:
        if 1 <= l and l <= 100000 or 1 <= r and r <= 100000:
            total += r - l + 1
        else:
            return
    print(total)

if __name__ == "__main__":
    theater()
Buggy python submission (verdict: Runtime Error):
# -*- encoding: utf-8 -*-
n = int(input().rstrip())
array = list(map(int, input().rstrip().split(' ')))
count = [0] * 100000

for a in array:
    count[a - 1] += 1
    count[a    ] += 1
    count[a + 1] += 1

print(max(count))

Fixed submission:
# -*- encoding: utf-8 -*-
n = int(input().rstrip())
array = sorted(list(map(int, input().split(' '))))
count = [0] * 100002

for a in array:
    count[a - 1] += 1
    count[a    ] += 1
    count[a + 1] += 1

print(max(count))

Buggy python submission (verdict: Runtime Error):
# -*- encoding: utf-8 -*-
n = int(input().rstrip())
array = sorted(list(map(int, input().rstrip().split(' '))))
count = [0] * (10 ** 5)

for a in array:
    count[a - 1] += 1
    count[a    ] += 1
    count[a + 1] += 1

print(max(count))

Fixed submission:
# -*- encoding: utf-8 -*-
n = int(input().rstrip())
array = sorted(list(map(int, input().split(' '))))
count = [0] * 100002

for a in array:
    count[a - 1] += 1
    count[a    ] += 1
    count[a + 1] += 1

print(max(count))
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
cnt=0
for i in range(len(a)):
    if i < len(a):
        if a[i] == i+1:
            inter=a[i]
            a[i]=a[i+1]
            a[i+1]=inter
            cnt +=1
        continue
print(cnt)

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
cnt=0
for i in range(len(a)):
    if i+1 < N:
        if a[i] == i+1:
            inter=a[i]
            a[i]=a[i+1]
            a[i+1]=inter
            cnt +=1
        continue
print(cnt)

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))

Buggy python submission (verdict: Runtime Error):
s=str(input())
x=list(s)
out=""
for i in range(x):
	if (i+1) % 2 ==0:
		out+=x[i]
print(out)

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))

Buggy python submission (verdict: Runtime Error):
s=str(input())
x=list(s)
out=""
for i in range(x):
	if (i+1) % 2 !=1:
		out+=x[i]
print(out)

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))

Buggy python submission (verdict: Runtime Error):
s=str(input())
x=list(s)
out=""
for  i in len(x):
 if (i+1) % 2 !=1:
  out+=x[i]
print(out)

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))

Buggy python submission (verdict: Runtime Error):
s=str(input())
x=list(s)
out=str()
for  i in len(x):
 if (i+1) % 2 !=1:
  out+=x[i]
print(out)

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))

Buggy python submission (verdict: Runtime Error):
x,t=input().split()
 
print(max(x-t,0))

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))

Buggy python submission (verdict: Runtime Error):
X,t=input().split

print(max(X-t,0))

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))

Buggy python submission (verdict: Runtime Error):
X, t=input(int, split())

print(max(X-t),0)

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))

Buggy python submission (verdict: Runtime Error):
X=input("入力1")
t=input("入力2")
 
y=X-t
 
print(max(y,0))

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))

Buggy python submission (verdict: Runtime Error):
X=input("入力1")
t=input("入力2")

y=X-t

print(y)

Fixed submission:
x,t=map(int, input().split())

print(max(x-t,0))
Buggy python submission (verdict: Runtime Error):

s=str(input())
x=list(s)
if i in len(x):


Fixed submission:
s=input()
x=list(s)
out=""
for i in range(len(x)):
	if i % 2 ==0:
		out+=x[i]
print(out)
Buggy python submission (verdict: Runtime Error):
N=int(input())
a = list(map(int, input().split()))
cnt=[0]*10009
for t in a:
    cnt[t] += 1
    cnt[t-1] += 1
    cnt[t+1] += 1
print(max(cnt))

Fixed submission:
N=int(input())
a = list(map(int, input().split()))
cnt=[0]*100009
for t in a:
    cnt[t] += 1
    cnt[t-1] += 1
    cnt[t+1] += 1
print(max(cnt))

Buggy python submission (verdict: Runtime Error):
N=int(input())
a = list(map(int, input().split()))
cnt=[0]*10000
for t in a:
    cnt[t] += 1
    cnt[t-1] += 1
    cnt[t+1] += 1
print(max(cnt))


Fixed submission:
N=int(input())
a = list(map(int, input().split()))
cnt=[0]*100009
for t in a:
    cnt[t] += 1
    cnt[t-1] += 1
    cnt[t+1] += 1
print(max(cnt))

Buggy python submission (verdict: Runtime Error):
N=int(input())
a = list(map(int, input().split()))
cnt=[0]*10000
for t in a:
    cnt[t] += 1
    cnt[t-1] += 1
    cnt[t+1] += 1
print(max(cnt))

Fixed submission:
N=int(input())
a = list(map(int, input().split()))
cnt=[0]*100009
for t in a:
    cnt[t] += 1
    cnt[t-1] += 1
    cnt[t+1] += 1
print(max(cnt))

Buggy python submission (verdict: Runtime Error):
N=int(input())
a = list(map(int, input().split()))
cnt=[0]*10000
print(a)
for t in a:
    cnt[t] += 1
    cnt[t-1] += 1
    cnt[t+1] += 1
print(max(cnt))

Fixed submission:
N=int(input())
a = list(map(int, input().split()))
cnt=[0]*100009
for t in a:
    cnt[t] += 1
    cnt[t-1] += 1
    cnt[t+1] += 1
print(max(cnt))

Buggy python submission (verdict: Runtime Error):
a = list(map(int, input().split()))
cnt=[0]*10000
print(a)
for t in a:
    cnt[t] += 1
    cnt[t-1] += 1
    cnt[t+1] += 1
print(max(cnt))

Fixed submission:
N=int(input())
a = list(map(int, input().split()))
cnt=[0]*100009
for t in a:
    cnt[t] += 1
    cnt[t-1] += 1
    cnt[t+1] += 1
print(max(cnt))
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int, input().split()))
cnt=0
for i in range(len(a)):
    if i < len(a):
        if a[i] == i+1:
            inter=a[i]
            a[i]=a[i+1]
            a[i+1]=inter
            cnt +=1
        continue
print(cnt)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt=0
for i in range(N):
    if a[i] == i+1:
        if i+1 == N:
            inter=a[i]
            a[i]=a[i-1]
            a[i-1]=inter
        else:
            inter=a[i]
            a[i]=a[i+1]
            a[i+1]=inter
        cnt +=1
print(cnt)

Buggy python submission (verdict: Runtime Error):
N=int(input())
a=list(map(int,input().split()))
cnt=0
for i in range(len(a)):
    if a[i] == i+1:
        int=a[i+1]
        a[i]=a[i+1]
        a[i+1]=int
        cnt +=1
print(cnt)

Fixed submission:
N = int(input())
a = list(map(int, input().split()))
cnt=0
for i in range(N):
    if a[i] == i+1:
        if i+1 == N:
            inter=a[i]
            a[i]=a[i-1]
            a[i-1]=inter
        else:
            inter=a[i]
            a[i]=a[i+1]
            a[i+1]=inter
        cnt +=1
print(cnt)
Buggy python submission (verdict: Runtime Error):
from collections import Counter
N=int(input())
a=list(map(int, input().split()))
h = w = 0
 
for i, cnt in Counter(a).items:
    if cnt >= 2 and i > w:
        if i > h:
            if cnt >= 4:
                h = i
                w = i
            else:
                w = h
                h = i
        else:
            w = i
            
print(w * h)

Fixed submission:
from collections import Counter
 
N = int(input())
A = list(map(int, input().split()))
h = w = 0
 
for i, cnt in Counter(A).items():
    if cnt >= 2 and i > w:
        if i > h:
            if cnt >= 4:
                h = i
                w = i
            else:
                w = h
                h = i
        else:
            w = i
            
print(w * h)

Buggy python submission (verdict: Runtime Error):
from collections import Counter
N=int(input())
c=[]
a=list(map(int, input().split()))
s=sorted(set(a), reverse=True)
 
for i, cnt in Counter(a).items:
    if cnt >= 2 and i > w:
        if i > h:
            if cnt >= 4:
                h = i
                w = i
            else:
                w = h
                h = i
        else:
            w = i
            
print(w * h)

Fixed submission:
from collections import Counter
 
N = int(input())
A = list(map(int, input().split()))
h = w = 0
 
for i, cnt in Counter(A).items():
    if cnt >= 2 and i > w:
        if i > h:
            if cnt >= 4:
                h = i
                w = i
            else:
                w = h
                h = i
        else:
            w = i
            
print(w * h)
Buggy python submission (verdict: Runtime Error):
import sys;sys.setrecursionlimit(int(1e7))
from sys import stdin
from collections import deque
 
input = stdin.readline
N = int(input())
tree = [[] for _ in range(N+1)]
for _ in range(N-1):
    a, b, c = map(int,input().split())
    tree[a].append((b,c))
    tree[b].append((a,c))
 
Qn,K = map(int,input().split())
XY = [tuple(map(int,input().split())) for _ in range(Qn)]
 
depth = [None]*(N+1)
def DFS(v,p,d):
    depth[v] = d
    for e in tree[v]:
        if e[0] != p:
            DFS(e[0], v, d + e[1])
DFS(K,0,0)
 
for i in range(Qn):
    print(depth[XY[i][0]] + depth[XY[i][1]])

Fixed submission:
S=list(map(int, input()))

if S[0]==S[2]:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
def gcd(a,b):
    #a=min(a,b)
    #b=max(a,b)
    while b:
        a,b= b, a%b
    return a

def lcm(a,b):
    return a*b//gcd(a,b)
T=[]
N=int(input())
for i in range(N):
    T.append(int(input()))

ans=1
for t in T:
    ans=lcm(ans, t)

print(ans)

Fixed submission:
S=list(map(int, input()))

if S[0]==S[2]:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
def gcd(a,b):
    a=min(a,b)
    b=max(a,b)
    while b:
        a,b= b, a%b
    return a

def lcm(a,b):
    return a*b//gcd(a,b)

N=int(input())
for i in range(N):
    T.append(int(input()))

ans=1
for t in range(N):
    ans=lcm(ans,T[i])
            
print(ans)

Fixed submission:
def gcd(a,b):
    #a=min(a,b)
    #b=max(a,b)
    while b:
        a,b= b, a%b
    return a

def lcm(a,b):
    return a*b//gcd(a,b)
T=[]
N=int(input())
for i in range(N):
    T.append(int(input()))

ans=1
for t in T:
    ans=lcm(ans, t)

print(int(ans))
Buggy python submission (verdict: Runtime Error):
input(); print((lambda xs: max(xs) - min(xs))([int(x) for x in input().split()]))

Fixed submission:
x = "".join(input().split())
x = int(x)
if x % 4 == 0:
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
print("YES" if int("".join(input())) % 4 == 0 else "NO)

Fixed submission:
x = "".join(input().split())
x = int(x)
if x % 4 == 0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
input(); print((lambda xs: max(xs) - min(xs))[int(x) for x in input().split()])

Fixed submission:
n = int(input())
points = [int(x) for x in input().split()]
points.sort()
print(points[-1] - points[0])
Buggy python submission (verdict: Runtime Error):
input()
rates = sorted([int(x) for x in input().split()])
counts = []
for boundary in [399, 799, 1199, 1599, 1999, 2399, 2799, 3199]:
    counts.append(1 if rates[0] <= boundary else 0)
    rates = [rate for rate in rates if rate > boundary]
higher = len(rates)
least = sum(counts)
print("{} {}".format(1 if least == 0 else least, least+higher))

Fixed submission:
# -* encode: utf-8 *-

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

rates.sort()
uppers = [399, 799, 1199, 1599, 1999, 2399, 2799, 3199, 4800]
accum = list()
counts = list()

for upper in uppers:
    accum.append(len([x for x in rates if x <= upper]))

counts.append(accum[0])
for i in range(1, 9):
    counts.append(accum[i] - accum[i-1])

_least = sum([1 for count in counts[:-1] if count > 0])
max_scorerer = counts[-1]

if _least == 0:
    least = 1
    most = max_scorerer
else:
    least = _least
    most = least + max_scorerer

print("{} {}".format(least, most))

Buggy python submission (verdict: Runtime Error):
boundaries = [399, 799, 1199, 1599, 1999, 2399, 2799, 3199, 4800]
input()
rates = sorted([int(x) for x in input().split()])
counts = []
for boundary in boundaries:
    tmp = 0
    while rates[0] <= boundary:
        tmp += 1
        rates.pop(0)
    counts.append(tmp)
least = sum([x > 0 for x in counts[:-1]])
print("{} {}".format(1 if least == 0 else least, counts[-1]+least))


Fixed submission:
# -* encode: utf-8 *-

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

rates.sort()
uppers = [399, 799, 1199, 1599, 1999, 2399, 2799, 3199, 4800]
accum = list()
counts = list()

for upper in uppers:
    accum.append(len([x for x in rates if x <= upper]))

counts.append(accum[0])
for i in range(1, 9):
    counts.append(accum[i] - accum[i-1])

_least = sum([1 for count in counts[:-1] if count > 0])
max_scorerer = counts[-1]

if _least == 0:
    least = 1
    most = max_scorerer
else:
    least = _least
    most = least + max_scorerer

print("{} {}".format(least, most))
Buggy python submission (verdict: Runtime Error):
d={}
n,m = map(int,input().split())
for _ in range(m):
    i,j = map(int,input().split())
    if j in d:
        d[j].append(i)
    else:
        d[j]=[i]
flag=0
if n in d:
    for item in d[n]:
        if item in d and 1 in d[item]:
            flag=1
            break
print('POSSIBLE' if flag else 'IMPOSSIBLE')


Fixed submission:
print('ABC'+input())

Buggy python submission (verdict: Runtime Error):
a=[1,2,4,8,16,32,64,128]
n=int(input())
i=0
while a[i]<=n:
    i+=1
print(a[i-1])

Fixed submission:
print('ABC'+input())

Buggy python submission (verdict: Runtime Error):
a=[1,2,4,8,16,32,64,128]
n=int(input())
i=0
while a[i]<=n:
    i+=1
print(a[i-1] if i>0 else 0)


Fixed submission:
print('ABC'+input())

Buggy python submission (verdict: Runtime Error):
    a=[1,2,4,8,16,32,64,128]
    n=int(input())
    i=0
    while a[i]<=n:
        i+=1
    print(a[i-1] if i>0 else 0)

Fixed submission:
print('ABC'+input())
Buggy python submission (verdict: Runtime Error):
a=[1,2,2,4,4,4,4,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64]
print(a[(int(input()))])


Fixed submission:
a=[0,1,2,2,4,4,4,4,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64]
print(a[(int(input()))])
Buggy python submission (verdict: Runtime Error):
N = int(input())
p = list(map(int, input().split()))
plen = len(p)

count = 0

for i in range(plen):
    if p[i] == N - 1:
        p[i - 1], p[i] = p[i], p[i - 1]
        count += 1
    elif p[i] == i + 1:
        p[i], p[i + 1] = p[i + 1], p[i]
        count += 1
            
print(count)


Fixed submission:
N = int(input())
p = list(map(int, input().split()))
plen = len(p)

count = 0

for i in range(plen):
    if p[i] == i + 1:
        if p[i] == N:
            p[i - 1], p[i] = p[i], p[i - 1]
        else:
            p[i], p[i + 1] = p[i + 1], p[i]
        count += 1
    
            
print(count)

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

count = 0

for i in range(plen):
    if p[i] == N - 1:
        p[i], p[i - 1] = p[i - 1], p[i]
        count += 1
    elif p[i] == i + 1:
        p[i], p[i + 1] = p[i + 1], p[i]
        count += 1
            
print(count)


Fixed submission:
N = int(input())
p = list(map(int, input().split()))
plen = len(p)

count = 0

for i in range(plen):
    if p[i] == i + 1:
        if p[i] == N:
            p[i - 1], p[i] = p[i], p[i - 1]
        else:
            p[i], p[i + 1] = p[i + 1], p[i]
        count += 1
    
            
print(count)

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

count = 0
for i in range(1, plen):
    if p[i] == i :
        if p[i] == N:
            p[i -1], p[i] = p[i], p[i - 1]
            count += 1
            break
        else:
            p[i], p[i + 1] = p[i + 1], p[i]
            count += 1
print(count)


Fixed submission:
N = int(input())
p = list(map(int, input().split()))
plen = len(p)

count = 0

for i in range(plen):
    if p[i] == i + 1:
        if p[i] == N:
            p[i - 1], p[i] = p[i], p[i - 1]
        else:
            p[i], p[i + 1] = p[i + 1], p[i]
        count += 1
    
            
print(count)

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

count = 0
for i in range(plen):
    if p[i] == i + 1:
        p[i], p[i + 1] = p[i + 1], p[i]
        count += 1
print(count)


Fixed submission:
N = int(input())
p = list(map(int, input().split()))
plen = len(p)

count = 0

for i in range(plen):
    if p[i] == i + 1:
        if p[i] == N:
            p[i - 1], p[i] = p[i], p[i - 1]
        else:
            p[i], p[i + 1] = p[i + 1], p[i]
        count += 1
    
            
print(count)

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

count = 0
for i in range(plen):
    if p[i] == i + 1:
        p[i], p[i + 1] = p[i + 1], p[i]
        count += 1
print(count)


Fixed submission:
N = int(input())
p = list(map(int, input().split()))
plen = len(p)

count = 0

for i in range(plen):
    if p[i] == i + 1:
        if p[i] == N:
            p[i - 1], p[i] = p[i], p[i - 1]
        else:
            p[i], p[i + 1] = p[i + 1], p[i]
        count += 1
    
            
print(count)
Buggy python submission (verdict: Runtime Error):
print(max(int(input()) - int(input()), 0))


Fixed submission:
x, t = list(map(int, input().split()))
print(max((x - t), 0))