Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())

result=""
for ss in s:
    if ss=="a":
        result+="a"
    else:
        if k>= 123 - ord(ss):
            k-=123-ord(ss)
            result+="a"
        else:
            result+=ss


if k>0:
    k=k%(123-97)
    temp=chr((((ord(result[-1])-97)+k)%(123-97))+97)
    
print(result[:-1]+temp)

#print(ord("a")):97
#print(ord("b")):98
#print(ord("z")):122
#97ならそのまま
#aにするには123-ord()をすればいい

Fixed submission:
s=input()
k=int(input())

result=""
for ss in s:
    if ss=="a":
        result+="a"
    else:
        if k>= 123 - ord(ss):
            k-=123-ord(ss)
            result+="a"
        else:
            result+=ss


if k>0:
    k=k%(123-97)
    temp=chr((((ord(result[-1])-97)+k)%(123-97))+97)
    print(result[:-1]+temp)
else:
    print(result)

#print(ord("a")):97
#print(ord("b")):98
#print(ord("z")):122
#97ならそのまま
#aにするには123-ord()をすればいい

Buggy python submission (verdict: Runtime Error):
s=input()
k=int(input())

result=""
for ss in s:
    if ss=="a":
        result+="a"
    else:
        if k>= 123 - ord(ss):
            k-=123-ord(ss)
            result+="a"
        else:
            result+=ss



print(result[:-1]+chr(ord(result[-1])+k))

#print(ord("a")):97
#print(ord("b")):98
#print(ord("z")):122
#97ならそのまま
#aにするには123-ord()をすればいい

Fixed submission:
s=input()
k=int(input())

result=""
for ss in s:
    if ss=="a":
        result+="a"
    else:
        if k>= 123 - ord(ss):
            k-=123-ord(ss)
            result+="a"
        else:
            result+=ss


if k>0:
    k=k%(123-97)
    temp=chr((((ord(result[-1])-97)+k)%(123-97))+97)
    print(result[:-1]+temp)
else:
    print(result)

#print(ord("a")):97
#print(ord("b")):98
#print(ord("z")):122
#97ならそのまま
#aにするには123-ord()をすればいい
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())

ans=0

a=[]
b=[]

for _ in range(n):
    x=int(input())
    a.append(x)
    b.append(x)
b.sort()

cnt=0
for i,v in enumerate(a):
    if i%2 != (b.index(v))%2:
        cnt+=1
print(cnt//2)

Fixed submission:
n=int(input())

ans=0

a=[]
b=[]

for _ in range(n):
    x=int(input())
    a.append(x)
    b.append(x)
b.sort()

dic={}
for i,v in enumerate(b):
    dic[v]=i%2

cnt=0
for i,v in enumerate(a):
    if i%2 != dic[v]:
        cnt+=1
print(cnt//2)

Buggy python submission (verdict: Runtime Error):
n=int(input())

ans=0

a=[]
b=[]

for _ in range():
    x=int(input())
    a.append(x)
    b.append(x)
b.sort()

cnt=0
for i,v in enumerate(a):
    if i%2 != (b.index(v))%2:
        cnt+=1
print(cnt//2)

Fixed submission:
n=int(input())

ans=0

a=[]
b=[]

for _ in range(n):
    x=int(input())
    a.append(x)
    b.append(x)
b.sort()

dic={}
for i,v in enumerate(b):
    dic[v]=i%2

cnt=0
for i,v in enumerate(a):
    if i%2 != dic[v]:
        cnt+=1
print(cnt//2)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())

ans=0

a=[int(input()) for _ in range(n)]

b=sorted(a)

cnt=0
for i,v in enumerate(a):
    if i%2 != (b.index(v))%2:
        cnt+=1
print(cnt//2)

Fixed submission:
n=int(input())

ans=0

a=[]
b=[]

for _ in range(n):
    x=int(input())
    a.append(x)
    b.append(x)
b.sort()

dic={}
for i,v in enumerate(b):
    dic[v]=i%2

cnt=0
for i,v in enumerate(a):
    if i%2 != dic[v]:
        cnt+=1
print(cnt//2)

Buggy python submission (verdict: Runtime Error):
n=int(input())

ans=0

a=[int(input()) for _ in range(n)]

b=a.sorted()

cnt=0
for i,v in enumerate(a):
    if i%2 != (b.index(b))%2:
        cnt+=1
print(cnt//2)

Fixed submission:
n=int(input())

ans=0

a=[]
b=[]

for _ in range(n):
    x=int(input())
    a.append(x)
    b.append(x)
b.sort()

dic={}
for i,v in enumerate(b):
    dic[v]=i%2

cnt=0
for i,v in enumerate(a):
    if i%2 != dic[v]:
        cnt+=1
print(cnt//2)
Buggy python submission (verdict: Runtime Error):
s=input()

#長さ2
#xx
#長さ3
#xxy←長さ2に内包,yxx,xyx
#長さ5:xyxzx　←長さ３に内包

if len(s)==2:
    if s[i]+s[i+1]:
        print(1,2)
        exit()

for i in range(len(s)-2):
    if s[i]==s[i+1]:
        print(i+1,i+1+1)
        exit()
    elif s[i]==s[i+2]:
        print(i+1,i+2+1)
        exit()

print(-1,-1)

    



Fixed submission:
s=input()

#長さ2
#xx
#長さ3
#xxy←長さ2に内包,yxx,xyx
#長さ5:xyxzx　←長さ３に内包

if len(s)==2:
    if s[0]==s[1]:
        print(1,2)
        exit()

for i in range(len(s)-2):
    if s[i]==s[i+1]:
        print(i+1,i+1+1)
        exit()
    elif s[i]==s[i+2]:
        print(i+1,i+2+1)
        exit()

print(-1,-1)
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python3

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

ans=1

for i in range(N):
    ans*=A[i]

if ans > 1000000000000000000:
    print(-1)
else:
    print(ans)


Fixed submission:
#!/usr/bin/env python3

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

ans=1

for i in range(N):
    if A[i]==0:
        print(0)
        exit()

for i in range(N):
    ans*=A[i]
    if ans > 1000000000000000000:
        print(-1)
        exit()

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())
tmp = 7
for i in range(1,K+1):
    if tmp%K == 0:
        print(i)
        exit()
    tmp += 7*10**i%K
    tmp %= K
print(-1)

Fixed submission:
K = int(input())
tmp = 7
for i in range(1,K+1):
    if tmp%K == 0:
        print(i)
        exit()
    tmp = (tmp*10 + 7)%K
    tmp %= K
print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import accumulate
n,m,k = map(int,input().split())
deskA = list(map(int,input().split()))
deskB = list(map(int,input().split()))
cumA = list(accumulate(deskA))
cumB = list(accumulate(deskB))
cumA = [0] + cumA
cumB = [0] + cumB
ans = 0
for i in range(n+1):
    tmp = k - cumA[i]
    if tmp<0:
        continue
    j = m
    tmp -= cumB[j]
    while tmp < 0:
        tmp += cumB[j]
        j -= 1
        tmp -= cumB[j]
    ans = max(i+j,ans)
print(ans)

Fixed submission:
from itertools import accumulate
n,m,k = map(int,input().split())
deskA = list(map(int,input().split()))
deskB = list(map(int,input().split()))
cumA = list(accumulate(deskA))
cumB = list(accumulate(deskB))
cumA = [0] + cumA
cumB = [0] + cumB
ans = 0
l = m
for i in range(n+1):
    tmp = k - cumA[i]
    if tmp<0:
        continue
    j = l
    tmp -= cumB[j]
    while tmp < 0:
        tmp += cumB[j]
        j -= 1
        tmp -= cumB[j]
    l = j
    ans = max(i+j,ans)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import accumulate
n,m,k = map(int,input().split())
deskA = list(map(int,input().split()))
deskB = list(map(int,input().split()))
cumA = list(accumulate(deskA))
cumB = list(accumulate(deskB))
cumA = [0] + cumA
cumB = [0] + cumB
ans = 0
for i in range(n+1):
    tmp = k - cumA[i]
    if tmp<0:
        continue
    j = m
    tmp -= cumB[j]
    while tmp < 0:
        tmp += cumB[j]
        j -= 1
        tmp -= cumB[j]
    ans = max(i+j,ans)
print(ans)

Fixed submission:
from itertools import accumulate
n,m,k = map(int,input().split())
deskA = list(map(int,input().split()))
deskB = list(map(int,input().split()))
cumA = list(accumulate(deskA))
cumB = list(accumulate(deskB))
cumA = [0] + cumA
cumB = [0] + cumB
ans = 0
l = m
for i in range(n+1):
    tmp = k - cumA[i]
    if tmp<0:
        continue
    j = l
    tmp -= cumB[j]
    while tmp < 0:
        tmp += cumB[j]
        j -= 1
        tmp -= cumB[j]
    l = j
    ans = max(i+j,ans)
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

D = [0] * (10**6 + 1)
A.sort()
for i in range(N):
    D[A[i]] += 1
    
ans = 0
for i in range(1, 10**6+1):
    if D[i]:
        if D[i]==1:
            ans += 1
        for j in range(i,m,i):
            D[j] = 0
print(ans)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
m = max(a) + 10
li = [0]*m 
for x in a:
    li[x] += 1
ans = 0
for i in range(1,m):
    if li[i]: 
        if li[i]==1: 
            ans += 1 
        for j in range(i,m,i): 
            li[j] = 0
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
m = max(a)
li = [0]*m 
for x in a:
    li[x] += 1
ans = 0
for i in range(1,m):
    if li[i]: 
        if li[i]==1: 
            ans += 1 
        for j in range(i,m,i): 
            li[j] = 0
print(ans)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
m = max(a) + 10
li = [0]*m 
for x in a:
    li[x] += 1
ans = 0
for i in range(1,m):
    if li[i]: 
        if li[i]==1: 
            ans += 1 
        for j in range(i,m,i): 
            li[j] = 0
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
m = max(a)
li = [0]*m 
for x in a:
    li[x] += 1
ans = 0
for i in range(1,m):
    if li[i]: 
        if li[i]==1: 
            ans += 1 
        for j in range(i,m,i): 
            li[j] = 0

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
m = max(a) + 10
li = [0]*m 
for x in a:
    li[x] += 1
ans = 0
for i in range(1,m):
    if li[i]: 
        if li[i]==1: 
            ans += 1 
        for j in range(i,m,i): 
            li[j] = 0
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
ans = 1
for i in a:
    ans *= i
print(ans if ans <= 10**18 else -1)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = 1
if 0 in a:
    print(0)
    exit()
for i in a:
    ans *= i
    if ans > 10**18:
        ans = -1
        break
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int,input().split())
h = list(map(int,input().split()))
r = [list(map(int,input().split())) for _ in range(m)]
s = [[] for _ in range(n+1)]
for i in range(m):
    t1,t2 = r[i][0],r[i][1]
    s[t1].append(t2)
    s[t2].append(t1)
bad = []
cnt = 0
for i in range(1,n+1):
    if i not in bad:
        setsi = set(s[i])
        if all(h[i-1] > h[k-1] for k in setsi):
            cnt += 1
            for k in setsi:
                if k not in bad:
                    bad.append(k)
print(cnt)

Fixed submission:
n,m = map(int,input().split())
h = list(map(int,input().split()))
ans = [1]*n
for i in range(m):
    a,b = map(int,input().split())
    a -= 1
    b -= 1
    if h[a] <= h[b]:
        ans[a] = 0
    if h[b] <= h[a]:
        ans[b] = 0
print(sum(ans))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
a = np.array(list(map(int,input().split())))
ans = 0
for i in range(1,n):
    ai = a[i:] + a[:-i]
    ans += np.count_nonzero(ai==i)
print(ans)

Fixed submission:
from collections import Counter
n = int(input())
a = list(map(int,input().split()))
a1,a2 = [],[]
for i in range(n):
    a1.append(i+a[i])
    a2.append(i-a[i])
a1,a2 = Counter(a1),Counter(a2)
rng = max(a2)
ans = 0
for i in range(1,rng+1):
    if i in a1 and i in a2:
        ans += a1[i]*a2[i]
print(ans)
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.count(i))

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
lis = [0]*n
for i in range(n-1):
    lis[a[i]-1] += 1
for i in range(n):
    print(lis[i])
Buggy python submission (verdict: Runtime Error):
from math import gcd
K = int(input())
 
c = 0
for i in range(1,K+1):
    for j in range(1,K+1):
      k = gcd(i,j)
        for l in range(1,K+1):
            a = gcd(k, l)
            c += a
 
print(c)

Fixed submission:
from math import gcd
ans = 0
n = int(input())

for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            l = gcd(i,j)
            ans += gcd(k,l)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math
K = int(input())
 
c = 0
for i in range(1,K+1):
    for j in range(1,K+1):
        for l in range(1,K+1):
            a = math.gcd(math.gcd(i,j), l)
            c += a
 
print(c)

Fixed submission:
from math import gcd
ans = 0
n = int(input())

for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            l = gcd(i,j)
            ans += gcd(k,l)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
cnt = 0
import numpy as np
gcdlist = []
for i in range(1,n+1):
    for j in range(1,n+1):
        gcdlist.append(np.gcd(i,j))
for i in range(len(gcdlist)):
    for j in range(1,n+1):
        cnt += np.gcd(gcdlist[i],j)
print(cnt)

Fixed submission:
from math import gcd
ans = 0
n = int(input())

for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            l = gcd(i,j)
            ans += gcd(k,l)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
import numpy as np
cnt = 0
for i in range(1,n+1):
    for j in range(1,n+1):
        l = np.gcd(i,j)
        for k in range(1,n+1):
            if i==1 or j==1 or k==1:
                cnt += 1
            else:
                cnt += np.gcd(k,l)
print(cnt)

Fixed submission:
from math import gcd
ans = 0
n = int(input())

for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            l = gcd(i,j)
            ans += gcd(k,l)
print(ans)
Buggy python submission (verdict: Runtime Error):
n,m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse = True)
if a[m] * 4*m >= sum(a):
    print('Yes')
else:
    print('No')

Fixed submission:
n,m = map(int, input().split())
a = list(map(int, input().split()))
a.sort(reverse = True)
if a[m-1] * 4*m >= sum(a):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n,x,y = map(int,input().split())
a = np.zeros(n-1)
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i, abs(i-x+1)+1+abs(j-y+1), abs(i-y+1)+1+abs(j-x+1))
        a[dist-1] += 1
for ans in a:
    print(int(ans))

Fixed submission:
n,x,y = map(int,input().split())
a = [0]*(n-1)
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i, abs(i-x+1)+1+abs(j-y+1))
        a[dist-1] += 1
for ans in a:
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,x,y = map(int,input().split())
a = [0]*(n-1)
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i, abs(i-x+1)+1+abs(j-y+1), abs(i-y+1)+1+abs(j-x+1))
        a[dist-1] += 1
for ans in a:
    print(ans)

Fixed submission:
n,x,y = map(int,input().split())
a = [0]*(n-1)
for i in range(n-1):
    for j in range(i+1,n):
        dist = min(j-i, abs(i-x+1)+1+abs(j-y+1))
        a[dist-1] += 1
for ans in a:
    print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

from collections import Counter
cnt = Counter(A)

ans = 0
for v in cnt.values():
    ans += v*(v-1)//2

for a in A:
    k = C[a]
    print(ans - (k*(k-1)//2) + (k-1)*(k-2)//2)

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

from collections import Counter
cnt = Counter(A)

ans = 0
for v in cnt.values():
    ans += v*(v-1)//2

for a in A:
    k = cnt[a]
    print(ans - (k*(k-1)//2) + (k-1)*(k-2)//2)

Buggy python submission (verdict: Time Limit Exceeded):
import math
def bicomb(n):
    return math.factorial(n) // (math.factorial(n - 2) * math.factorial(2))

from collections import Counter
cnt = Counter()
    
N = int(input())
A = list(map(int,input().split()))
for i in range(N):
    cnt[A[i]] += 1
ans = 0
for v in cnt.values():
    if v==1:
        continue
    else:
        ans += bicomb(v)
ans2 = ans
for i in A:
    if cnt[i]==1:
        pass
    elif cnt[i]==2:
        ans -= 1
    else:
        ans -= bicomb(cnt[i]) - bicomb(cnt[i]-1)
    print(ans)
    ans = ans2

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

from collections import Counter
cnt = Counter(A)

ans = 0
for v in cnt.values():
    ans += v*(v-1)//2

for a in A:
    k = cnt[a]
    print(ans - (k*(k-1)//2) + (k-1)*(k-2)//2)
Buggy python submission (verdict: Runtime Error):
n,r = map(int,input().split())
cnt = 0
while n >= 1:
    n /= k
    cnt += 1
print(cnt)

Fixed submission:
n,k = map(int,input().split())
cnt = 0
while n >= 1:
    n /= k
    cnt += 1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for i in range(n)]
from collections import Counter
s1 = Counter(s)
s2 = list(set(s))
s2.sort()
for i in range(len(s2)):
    if s1[s2[i]] == max(s1.values()):
        print(s2[i])

Fixed submission:
n = int(input())
s = [input() for i in range(n)]
from collections import Counter
s1 = Counter(s)
max_s = max(s1.values())
ans = []
for k,v in s1.items(): 
    if v == max_s:
        ans.append(k)
ans.sort()
for a in ans:
    print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for i in range(n)]
s.sort()
from collections import Counter
s1 = Counter(s)
s2 = list(set(s))
s2.sort()
for i in range(len(s2)):
    if s1[s2[i]] == max(s1.values()):
        print(s2[i])

Fixed submission:
n = int(input())
s = [input() for i in range(n)]
from collections import Counter
s1 = Counter(s)
max_s = max(s1.values())
ans = []
for k,v in s1.items(): 
    if v == max_s:
        ans.append(k)
ans.sort()
for a in ans:
    print(a)

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]
s.sort()
from collections import Counter
s1 = collections.Counter(s)
s2 = list(set(s))
s2.sort()
for i in range(len(s2)):
    if s1[s2[i]] == max(s1.values()):
        print(s2[i])

Fixed submission:
n = int(input())
s = [input() for i in range(n)]
from collections import Counter
s1 = Counter(s)
max_s = max(s1.values())
ans = []
for k,v in s1.items(): 
    if v == max_s:
        ans.append(k)
ans.sort()
for a in ans:
    print(a)
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())
c = fractions.gcd(a,b)
print(a*b//c)

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())
c = fractions.gcd(a,b)
print(a*b//c)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
for i in range(len(s)):
    for j in range(26):
        if s[i]==alpha[j]:
            s = s[:i]+alpha[j+n]+s[i+1:]
            break
print(s)

Fixed submission:
N = int(input())
S = input()
T = ''
for i in S:
    if (ord(i)-64+N)%26 != 0:
        T += chr((ord(i)-64+N)%26 + 64)
    else:
        T += 'Z'
print(T)
Buggy python submission (verdict: Runtime Error):
from collections import Counter
n,k,q = map(int,input().split())
a = [int(input) for _ in range(n)]
a = Counter(a)
for i in range(1,n+1):
    if a[i] > q-k:
        print('Yes')
    else:
        print('No')

Fixed submission:
from collections import Counter
n,k,q = map(int,input().split())
a = [int(input()) for _ in range(q)]
a = Counter(a)
for i in range(1,n+1):
    if a[i] > q-k:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = 10**9+7
dp = [0]*(n+1)
dp[0] = 1
dp[1] = 0 if 1 in a else 1
for i in range(2, n+1):
    dp[i] = (dp[i-1]+dp[i-2])%mod if i not in a else 0 #かけたところは0にしとこう、ってことか…
print(dp[n])

Fixed submission:
n,m = map(int, input().split())
a = set([int(input()) for _ in range(m)])
mod = 10**9+7
dp = [0]*(n+1)
dp[0] = 1
dp[1] = 0 if 1 in a else 1
for i in range(2, n+1):
    dp[i] = (dp[i-1]+dp[i-2])%mod if i not in a else 0 #かけたところは0にしとこう、ってことか…
print(dp[n])

Buggy python submission (verdict: Time Limit Exceeded):
n,m = map(int, input().split())
a = [int(input()) for i in range(m)]
step = [1] + [0]*n
mod = 10**9 + 7
for i in range(1,n+1):
    if i in a:
        continue
    else:
        if i-1 not in a:
            step[i] += step[i-1]%mod
        if i-2 not in a and i>=2:
            step[i] += step[i-2]%mod
        if i-1 in a and i-2 in a:
            print(0)
            exit()
print(step[n]%(10**9+7))

Fixed submission:
n,m = map(int, input().split())
a = set([int(input()) for _ in range(m)])
mod = 10**9+7
dp = [0]*(n+1)
dp[0] = 1
dp[1] = 0 if 1 in a else 1
for i in range(2, n+1):
    dp[i] = (dp[i-1]+dp[i-2])%mod if i not in a else 0 #かけたところは0にしとこう、ってことか…
print(dp[n])
Buggy python submission (verdict: Runtime Error):
s = input()
ans = 0
for i in range(1,len(s)+1): #i文字の文字列について調べる
    for j in range(len(s)-1): #j文字目でスタートしたとして
        if all(s[k]=='A' or s[k]=='G' or s[k]=='C' or s[k]=='T' for k in range(j,j+i)):
            ans = i
print(ans)

Fixed submission:
s = input()
ans = 0
for i in range(1,len(s)+1): #i文字の文字列について調べる
    for j in range(len(s)-i+1): #j文字目でスタートしたとして
        if all(s[k]=='A' or s[k]=='G' or s[k]=='C' or s[k]=='T' for k in range(j,j+i)):
            ans = i
print(ans)
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
dis = []
ans = 0
for i in range(m-1):
    dis.append(x[i+1]-x[i])
    ans += x[i+1]-x[i]
dis.sort(reverse = True)
for j in range(n-1):
    ans -= dis[j]
print(ans)

Fixed submission:
n,m = map(int,input().split())
x = list(map(int,input().split()))
x.sort()
dis = []
ans = 0
if n>m:
  print(0)
  exit()
for i in range(m-1):
    dis.append(x[i+1]-x[i])
    ans += x[i+1]-x[i]
dis.sort(reverse = True)
for j in range(n-1):
    ans -= dis[j]
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
import numpy as np
for i in range(n):
  h[i] = abs( a - (t - h[i] * 0.006))
print(np.armmin(h) + 1)

Fixed submission:
n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
import numpy as np
for i in range(n):
  h[i] = abs( a - (t - h[i] * 0.006))
print(np.argmin(h) + 1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
import numpy as np
for i in range(n):
  h[i] = abs( a - (t - h[i] * 0.006))
print(np.armmin(h) + 1)

Fixed submission:
n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
import numpy as np
for i in range(n):
  h[i] = abs( a - (t - h[i] * 0.006))
print(np.argmin(h) + 1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
import numpy as np
for i in range(n):
  h[i] = abs( a - (t - h[i] * (-0.006)))
print(np.armmin(h) + 1)

Fixed submission:
n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
import numpy as np
for i in range(n):
  h[i] = abs( a - (t - h[i] * 0.006))
print(np.argmin(h) + 1)

Buggy python submission (verdict: Runtime Error):
n = input()
t, a = map(float, input().split())
h = list(map(float, input().split()))
for i in range(n):
  h[i] = abs( a - (t - h[i] * (-0.006)))
print(min(h))

Fixed submission:
n = int(input())
t, a = map(float, input().split())
h = list(map(float, input().split()))
import numpy as np
for i in range(n):
  h[i] = abs( a - (t - h[i] * 0.006))
print(np.argmin(h) + 1)