Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(set(list(map(int, input().split()))))

count = 0
for i in range(N):
    for j in range(i+1, N):
        for k in range(j+1, N):
            if L[i] < L[j] + L[k]:
                if L[j] < L[i] + L[k]:
                    if L[k] < L[i] + L[j]:
                        count += 1

print(count)

Fixed submission:
import sys
import bisect

N = int(sys.stdin.readline())
L = list(map(int, sys.stdin.readline().split()))
L = sorted(L)

count = 0
for a_i in range(N-1):
    for b_i in range(a_i+1, N):
        max_c = bisect.bisect_left(L, L[a_i]+L[b_i])
        if max_c > b_i:
            count += max_c - b_i - 1
        
print(count)

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

count = 0
for i in range(N):
    for j in range(i+1, N):
        for k in range(j+1, N):
            if L[i] < L[j] + L[k]:
                if L[j] < L[i] + L[k]:
                    if L[k] < L[i] + L[j]:
                        count += 1

print(count)

Fixed submission:
import sys
import bisect

N = int(sys.stdin.readline())
L = list(map(int, sys.stdin.readline().split()))
L = sorted(L)

count = 0
for a_i in range(N-1):
    for b_i in range(a_i+1, N):
        max_c = bisect.bisect_left(L, L[a_i]+L[b_i])
        if max_c > b_i:
            count += max_c - b_i - 1
        
print(count)

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

count = 0
for i in range(N):
    for j in range(i+1, N):
        for k in range(j+1, N):
            if L[i] < L[j] + L[k]:
                if L[j] < L[i] + L[k]:
                    if L[k] < L[i] + L[j]:
                        count += 1

print(count)

Fixed submission:
import sys
import bisect

N = int(sys.stdin.readline())
L = list(map(int, sys.stdin.readline().split()))
L = sorted(L)

count = 0
for a_i in range(N-1):
    for b_i in range(a_i+1, N):
        max_c = bisect.bisect_left(L, L[a_i]+L[b_i])
        if max_c > b_i:
            count += max_c - b_i - 1
        
print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
A = list(map(int, input().split()))

for i in range(M):
    A.sort()
    A[-1] = A[-1]//2

print(sum(A))

Fixed submission:
from heapq import heapify, heappush, heappop

N, M = map(int, input().split())
A = list(map(lambda x:int(x)*(-1), input().split()))
heapify(A)

for i in range(M):
    heappush(A, (-1*heappop(A))//2*-1)

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

movable = [0]*N
i = 0
while i < N-1-max(movable):
    j = i
    while j < N-1 and H[j] >= H[j+1]:
        movable[i] += 1
        j += 1
    i = i + movable[i] + 1

print(max(movable))

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

movable = [0]*N
i = 0
while i < N-1:
    j = i
    while j < N-1 and H[j] >= H[j+1]:
        movable[i] += 1
        j += 1
    i = i + movable[i] + 1

print(max(movable))

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

movable = [0]*N
for i in range(N-1):
    j = i
    while j < N-1 and H[j] >= H[j+1]:
        movable[i] += 1
        j += 1

print(max(movable))


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

movable = [0]*N
i = 0
while i < N-1:
    j = i
    while j < N-1 and H[j] >= H[j+1]:
        movable[i] += 1
        j += 1
    i = i + movable[i] + 1

print(max(movable))

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

movable = [0]*N
for i in range(N-1):
    j = i
    while j < N-1 and H[j] >= H[j+1]:
        movable[i] += 1
        j += 1

print(max(movable))


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

movable = [0]*N
i = 0
while i < N-1:
    j = i
    while j < N-1 and H[j] >= H[j+1]:
        movable[i] += 1
        j += 1
    i = i + movable[i] + 1

print(max(movable))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
anagram = [None]*N

ans = 0
for i in range(N):
    anagram[i] = "".join(sorted(input()))

for i in range(N):
    for j in range(i+1, N):
        if anagram[i] == anagram[j]:
            ans += 1

print(ans)

Fixed submission:
N = int(input())
anagram = {}

ans = 0
for i in range(N):
    tmp = str(sorted(input()))
    if tmp in anagram:
        ans += anagram[tmp]
        anagram[tmp] += 1
    else:
        anagram[tmp] = 1

print(ans)

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

ans = 0
for i in range(N):
    for j in range(i+1, N):
        if s[i] == s[j]:
            ans += 1

print(ans)

Fixed submission:
N = int(input())
anagram = {}

ans = 0
for i in range(N):
    tmp = str(sorted(input()))
    if tmp in anagram:
        ans += anagram[tmp]
        anagram[tmp] += 1
    else:
        anagram[tmp] = 1

print(ans)

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

for i in range(N):
    s[i] = sorted(s[i])

ans = 0
for i in range(N):
    for j in range(i+1, N):
        if s[i] == s[j]:
            ans += 1

print(ans)

Fixed submission:
N = int(input())
anagram = {}

ans = 0
for i in range(N):
    tmp = str(sorted(input()))
    if tmp in anagram:
        ans += anagram[tmp]
        anagram[tmp] += 1
    else:
        anagram[tmp] = 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

N, M = map(int, stdin.readline().split())
A = [None]*N
B = [None]*N
for i in range(N):
    A[i], B[i] = map(int, stdin.readline().split())

salary = 0
for i in range(1, M+1):
    assignable = [j for j, a in enumerate(A) if a <= i]
    if assignable:
        most_attractive_i = assignable[0]
        for _ in assignable:
            if B[_] > B[most_attractive_i]:
                most_attractive_i = _
        salary += B[most_attractive_i]
        A[most_attractive_i] = 100000+1

print(salary)

Fixed submission:
from sys import stdin
from heapq import heapify, heappop, heappush
from bisect import bisect_right

N, M = map(int, stdin.readline().split())
AB = [None]*N
for i in range(N):
    AB[i] = list(map(int, stdin.readline().split()))
AB.sort()

salary = 0
hq = []
j = 0
for i in range(1, M+1):
    while j < N and AB[j][0] == i:
        heappush(hq, -AB[j][1])
        j += 1
    if hq:
        salary -= heappop(hq)
print(salary)
Buggy python submission (verdict: Runtime Error):
#from scipy.misc import comb
from scipy.special import comb

N, K = map(int, input().split())
B = K
R = N - K
for i in range(1, K+1):
    # R+i C i
    tmp1 = comb(R+1, i, exact = True)%10000000007
    rest = B - i
    # i H rest
    tmp2 = comb(i+rest-1, rest, exact = True)%10000000007
    ans = (tmp1*tmp2)%1000000007
    print(int(ans))

Fixed submission:
from scipy.misc import comb
#from scipy.special import comb

N, K = map(int, input().split())
B = K
R = N - K
for i in range(1, K+1):
    # R+i C i
    #tmp1 = comb(R+1, i, exact = True)%10000000007
    tmp1 = comb(N-K+1, i, exact=True)
    rest = B - i
    # i H rest
    #tmp2 = comb(B-1, i-1, exact = True)%10000000007
    tmp2 = comb(K-1, i-1, exact=True)

    ans = (tmp1*tmp2)%1000000007
    print(int(ans))

Buggy python submission (verdict: Runtime Error):
from scipy.misc import comb
#from scipy.special import comb

N, K = map(int, input().split())
B = K
R = N - K
for i in range(1, K+1):
    ans = (comb(R+1, i, exact = True)*comb(i+(B-i)-1, B-i))%(10**9+7)
    print(int(ans))

Fixed submission:
from scipy.misc import comb
#from scipy.special import comb

N, K = map(int, input().split())
B = K
R = N - K
for i in range(1, K+1):
    # R+i C i
    #tmp1 = comb(R+1, i, exact = True)%10000000007
    tmp1 = comb(N-K+1, i, exact=True)
    rest = B - i
    # i H rest
    #tmp2 = comb(B-1, i-1, exact = True)%10000000007
    tmp2 = comb(K-1, i-1, exact=True)

    ans = (tmp1*tmp2)%1000000007
    print(int(ans))

Buggy python submission (verdict: Runtime Error):
#from scipy.misc import comb
from scipy.special import comb

N, K = map(int, input().split())
B = K
R = N - K
for i in range(1, K+1):
    ans = (comb(R+1, i, exact = True)*comb(i+(B-i)-1, B-i))%(10**9+7)
    print(int(ans))

Fixed submission:
from scipy.misc import comb
#from scipy.special import comb

N, K = map(int, input().split())
B = K
R = N - K
for i in range(1, K+1):
    # R+i C i
    #tmp1 = comb(R+1, i, exact = True)%10000000007
    tmp1 = comb(N-K+1, i, exact=True)
    rest = B - i
    # i H rest
    #tmp2 = comb(B-1, i-1, exact = True)%10000000007
    tmp2 = comb(K-1, i-1, exact=True)

    ans = (tmp1*tmp2)%1000000007
    print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

N = int(stdin.readline())
A = [None]*N
B = [None]*N
for i in range(N):
    A[i], B[i] = map(int, stdin.readline().split())

now = 0
for i in range(N):
    job = B.index(min(B))
    now += A[job]
    deadline = B[job]
    B[job] = 10000000000
    if now > deadline:
        print("No")
        quit()
else:
    print("Yes")

Fixed submission:
from sys import stdin

N = int(stdin.readline())
Job = [None]*N
for i in range(N):
    Job[i] = tuple(map(int, stdin.readline().split()))[::-1]

Job.sort()

Now = 0
for i in range(N):
    Deadline = Job[i][0]
    Now += Job[i][1]
    if Now > Deadline:
        print("No")
        quit()

else:
    print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin

N = int(stdin.readline())
A = [None]*N
B = [None]*N
for i in range(N):
    A[i], B[i] = map(int, stdin.readline().split())

now = 0

for i in range(N):
    job = B.index(min(B))
    now += A.pop(job)
    deadline = B.pop(job)
    if now > deadline:
        print("No")
        quit()
else:
    print("Yes")

Fixed submission:
from sys import stdin

N = int(stdin.readline())
Job = [None]*N
for i in range(N):
    Job[i] = tuple(map(int, stdin.readline().split()))[::-1]

Job.sort()

Now = 0
for i in range(N):
    Deadline = Job[i][0]
    Now += Job[i][1]
    if Now > Deadline:
        print("No")
        quit()

else:
    print("Yes")

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [None]*N
B = [None]*N
for i in range(N):
    A[i], B[i] = map(int, input().split())

now = 0

for i in range(N):
    job = B.index(min(B))
    now += A.pop(job)
    deadline = B.pop(job)
    if now > deadline:
        print("No")
        quit()
else:
    print("Yes")


Fixed submission:
from sys import stdin

N = int(stdin.readline())
Job = [None]*N
for i in range(N):
    Job[i] = tuple(map(int, stdin.readline().split()))[::-1]

Job.sort()

Now = 0
for i in range(N):
    Deadline = Job[i][0]
    Now += Job[i][1]
    if Now > Deadline:
        print("No")
        quit()

else:
    print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int, input().split())
S = input()
lr = [None] * Q
for _ in range(Q):
    lr[_] = list(map(int, input().split()))
for _ in range(Q):
    ans = S.count("AC", lr[_][0] - 1, lr[_][1])
    print(ans)


Fixed submission:
N, Q = map(int, input().split())
S = input()
L = len(S)
ACnum = [0] * L
for i in range(1, L):
    ACnum[i] += ACnum[i - 1]
    if S[i - 1] == "A" and S[i] == "C":
        ACnum[i] += 1

lr = [None] * Q
for _ in range(Q):
    lr[_] = list(map(int, input().split()))

for i in range(Q):
    ans = ACnum[lr[i][1] - 1] - ACnum[lr[i][0] - 1]
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int, input().split())
S = input()
lr = [None] * Q
for _ in range(Q):
    lr[_] = list(map(int, input().split()))
for _ in range(Q):
    ans = S[lr[_][0] - 1:lr[_][1]].count("AC")
    print(ans)


Fixed submission:
N, Q = map(int, input().split())
S = input()
L = len(S)
ACnum = [0] * L
for i in range(1, L):
    ACnum[i] += ACnum[i - 1]
    if S[i - 1] == "A" and S[i] == "C":
        ACnum[i] += 1

lr = [None] * Q
for _ in range(Q):
    lr[_] = list(map(int, input().split()))

for i in range(Q):
    ans = ACnum[lr[i][1] - 1] - ACnum[lr[i][0] - 1]
    print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**5)

N = int(sys.stdin.readline())
h = tuple(map(int, sys.stdin.readline().split()))
cost = [None]*N

def DP(n):
    if cost[n] != None:
        return cost[n]
    
    if n==0:
        return 0
    elif(n > 1):
        cost[n] = min(DP(n-1) + abs(h[n] - h[n-1]), DP(n-2) + abs(h[n] - h[n-2]))
        return cost[n]
    else:
        cost[n] = DP(n-1) + abs(h[n] - h[n-1])
        return cost[n]


print(DP(N-1))

Fixed submission:
import sys
sys.setrecursionlimit(10**6)

N = int(sys.stdin.readline())
h = tuple(map(int, sys.stdin.readline().split()))
cost = [None]*N

def DP(n):
    if cost[n] != None:
        return cost[n]
    
    if n==0:
        return 0
    elif(n > 1):
        cost[n] = min(DP(n-1) + abs(h[n] - h[n-1]), DP(n-2) + abs(h[n] - h[n-2]))
        return cost[n]
    else:
        cost[n] = DP(n-1) + abs(h[n] - h[n-1])
        return cost[n]


print(DP(N-1))

Buggy python submission (verdict: Runtime Error):
N = int(input())
h = tuple(map(int, input().split()))
cost = [None]*N

def DP(n):
    if cost[n] != None:
        return cost[n]
    
    if n==0:
        return 0
    elif(n > 1):
        cost[n] = min(DP(n-1) + abs(h[n] - h[n-1]), DP(n-2) + abs(h[n] - h[n-2]))
        return cost[n]
    else:
        cost[n] = DP(n-1) + abs(h[n] - h[n-1])
        return cost[n]


print(DP(N-1))

Fixed submission:
import sys
sys.setrecursionlimit(10**6)

N = int(sys.stdin.readline())
h = tuple(map(int, sys.stdin.readline().split()))
cost = [None]*N

def DP(n):
    if cost[n] != None:
        return cost[n]
    
    if n==0:
        return 0
    elif(n > 1):
        cost[n] = min(DP(n-1) + abs(h[n] - h[n-1]), DP(n-2) + abs(h[n] - h[n-2]))
        return cost[n]
    else:
        cost[n] = DP(n-1) + abs(h[n] - h[n-1])
        return cost[n]


print(DP(N-1))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
sys.setrecursionlimit(10**6)

N, K = map(int, sys.stdin.readline().split())
h = tuple(map(int, sys.stdin.readline().split()))
cost = [None]*N
cost[0] = 0

for i in range(N+1):
    for j in range(1, K+1):
        if i + j > N-1:
            break
        tmp = cost[i] + abs(h[i] - h[i+j])
        if cost[i+j] == None or cost[i+j] > tmp:
            cost[i+j] = tmp
        
print(cost[N-1])

Fixed submission:
import sys

N, K = map(int, sys.stdin.readline().split())
h = tuple(map(int, sys.stdin.readline().split()))
cost = [None]*N
cost[0] = 0

for i in range(N):
    for j in range(1, K+1):
        if i + j > N-1:
            break
        tmp = cost[i] + abs(h[i] - h[i+j])
        if cost[i+j] == None or cost[i+j] > tmp:
            cost[i+j] = tmp

print(cost[N-1])
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
h = [None] * N
for _ in range(N):
    h[_] = int(input())

h.sort()
ans = 10000000000
for i in range(N - K + 1):
    ans = min(ans, max(h[i:i + K]) - min(h[i:i + K]))

print(ans)


Fixed submission:
N, K = map(int, input().split())
h = [None] * N
for _ in range(N):
    h[_] = int(input())

h.sort()
ans = 10000000000
tmp = sum(h[:K])
for i in range(N - K + 1):
    ans = min(ans, h[i + K - 1] - h[i])
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from bisect import bisect_left

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

ans = 0
for c in C:
    max_index_B = bisect_left(B, c)
    for i in range(max_index_B):
        ans += bisect_left(A, B[i])

print(ans)


Fixed submission:
from bisect import bisect_left, bisect_right

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

ans = 0
for b in B:
    max_index_A = bisect_left(A, b)
    max_index_C = N - bisect_right(C, b)
    ans += (max_index_A) * (max_index_C)

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
from bisect import bisect_left

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

ans = 0
for c in C:
    max_index_B = bisect_left(B, c)
    for i in range(max_index_B):
        ans += bisect_left(A, B[i])

print(ans)


Fixed submission:
from bisect import bisect_left, bisect_right

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

ans = 0
for b in B:
    max_index_A = bisect_left(A, b)
    max_index_C = N - bisect_right(C, b)
    ans += (max_index_A) * (max_index_C)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
b=0
c=int(a**(1/2))
for i in range(-1500,1500):
    for j in range(-1500,1500):
        if((i**5)-(j**5)==a):
            b=1
            break
    if(b==1):
        break
print(i,j)

Fixed submission:
a=int(input())
b=0
c=int(a**(1/2))
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if((i**5)-(j**5)==a):
            b=1
            break
    if(b==1):
        break
print(i,j)

Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
b=0
c=int(a**(1/2))
for i in range(-2000,2000):
    for j in range(-2000,2000):
        if((i**5)-(j**5)==a):
            b=1
            break
    if(b==1):
        break
print(i,j)

Fixed submission:
a=int(input())
b=0
c=int(a**(1/2))
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if((i**5)-(j**5)==a):
            b=1
            break
    if(b==1):
        break
print(i,j)

Buggy python submission (verdict: Time Limit Exceeded):
a=int(input())
b=0
c=int(a**(1/2))
for i in range(c+1):
    for j in range(-c,c):
        if((i**5)-(j**5)==a):
            b=1
            break
    if(b==1):
        break
print(i,j)

Fixed submission:
a=int(input())
b=0
c=int(a**(1/2))
for i in range(-1000,1000):
    for j in range(-1000,1000):
        if((i**5)-(j**5)==a):
            b=1
            break
    if(b==1):
        break
print(i,j)
Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())

A2=A-K
if A2<0:
    B2=B+A2
    A2=0
print(A2, B2)

Fixed submission:
A, B, K = map(int, input().split())


if A>=K:
    A2=A-K
    B2=B
elif A+B>=K:
    A2=0
    B2=A+B-K
else:
    A2=B2=0
print(A2, B2)
Buggy python submission (verdict: Runtime Error):
n=int(input())
d=map(int,input().split())
d=list(d)
kotae=0
for i in range(n):
  for j in range(i+1,n):
    kotae=kotae+d[i]*d[i+j]
print(kotae)


Fixed submission:
n=int(input())
d=list(map(int,input().split()))

kotae=0
for i in range(n):
  for j in range(i+1,n):
    kotae=kotae+d[i]*d[j]
print(kotae)

Buggy python submission (verdict: Runtime Error):
n=int(input())
d=map(int,input().split())
kotae=0
for i in range(n):
  for j in range(n-i-1):
    kotae=kotae+d[i]*d[j]
print(kotae)

Fixed submission:
n=int(input())
d=list(map(int,input().split()))

kotae=0
for i in range(n):
  for j in range(i+1,n):
    kotae=kotae+d[i]*d[j]
print(kotae)
Buggy python submission (verdict: Runtime Error):
N=int(input())
lis=[]
for i in range(N):
  lis.append(int(input())
lis2=sorted(lis)
ma1=lis2[-1]
ma2=lis2[-2]

for i in range(N):
  if lis[i] == ma1:
    print(ma2)
  else:
    print(ma1)

Fixed submission:
N=int(input())
lis=[]
for i in range(N):  
  lis.append(int(input()))
lis2=sorted(lis)
ma1=lis2[-1]
ma2=lis2[-2]

for i in range(N):
  if lis[i] == ma1:
    print(ma2)
  else:
    print(ma1)
Buggy python submission (verdict: Runtime Error):
L2, R2= map(int, input().split())

L=L2%2019
R=R2%2019

hasamu=R2-L2
kotae=10000
if hasamu>2017:
  kotae=0
if L>R:
  kotae=0
else:
  for i in range(L,R):
    for j in range(i+1,R+1):
      seki=i*j
      amari=seki%2019
        if amari<kotae:
          kotae=amari
print(kotae)
  


Fixed submission:
L2, R2= map(int, input().split())

L=L2%2019
R=R2%2019

hasamu=R2-L2
kotae=10000
if hasamu>2017:
  kotae=0
if L>R:
  kotae=0
else:
  for i in range(L,R):
    for j in range(i+1,R+1):
      seki=i*j
      amari=seki%2019
      if amari<kotae:
        kotae=amari
print(kotae)

Buggy python submission (verdict: Runtime Error):
L2, R2= map(int, input().split())

L=L2%2019
R=R2%2019

hasamu=R2-L2
kotae=10000
if hasamu>2017:
  kotae=0
if L>R:
  kotae=0
else:
  for i in range(L,R):
  	for j in range(i+1,R+1):
    	seki=i*j
    	amari=seki%2019
    	if amari<kotae:
     		kotae=amari
print(kotae)
  


Fixed submission:
L2, R2= map(int, input().split())

L=L2%2019
R=R2%2019

hasamu=R2-L2
kotae=10000
if hasamu>2017:
  kotae=0
if L>R:
  kotae=0
else:
  for i in range(L,R):
    for j in range(i+1,R+1):
      seki=i*j
      amari=seki%2019
      if amari<kotae:
        kotae=amari
print(kotae)

Buggy python submission (verdict: Time Limit Exceeded):
L, R= map(int, input().split())

hasamu=R-L
kotae=10000
if hasamu>2017:
  kotae=0

for i in range(L,R):
  for j in range(i+1,R+1):
    seki=i*j
    amari=seki%2019
    if amari<kotae:
      kotae=amari
print(kotae)
  


Fixed submission:
L2, R2= map(int, input().split())

L=L2%2019
R=R2%2019

hasamu=R2-L2
kotae=10000
if hasamu>2017:
  kotae=0
if L>R:
  kotae=0
else:
  for i in range(L,R):
    for j in range(i+1,R+1):
      seki=i*j
      amari=seki%2019
      if amari<kotae:
        kotae=amari
print(kotae)

Buggy python submission (verdict: Time Limit Exceeded):
L, R= map(int, input().split())

hasamu=R-L
kotae=10000
if hasamu>2017:
  kotae=0

for i in range(L,R):
  for j in range(i+1,R+1):
    seki=i*j
    amari=seki%2019
    if amari<kotae:
      kotae=amari
print(kotae)
  


Fixed submission:
L2, R2= map(int, input().split())

L=L2%2019
R=R2%2019

hasamu=R2-L2
kotae=10000
if hasamu>2017:
  kotae=0
if L>R:
  kotae=0
else:
  for i in range(L,R):
    for j in range(i+1,R+1):
      seki=i*j
      amari=seki%2019
      if amari<kotae:
        kotae=amari
print(kotae)

Buggy python submission (verdict: Runtime Error):
L, R= map(int, input())

hasamu=R-L
kotae=10000
if hasamu>2017:
  kotae=0

for i in range(L,R):
  for j in range(i+1,R+1):
    seki=i*j
    amari=seki%2019
    if amari<kotae:
      kotae=amari
print(kotae)
  


Fixed submission:
L2, R2= map(int, input().split())

L=L2%2019
R=R2%2019

hasamu=R2-L2
kotae=10000
if hasamu>2017:
  kotae=0
if L>R:
  kotae=0
else:
  for i in range(L,R):
    for j in range(i+1,R+1):
      seki=i*j
      amari=seki%2019
      if amari<kotae:
        kotae=amari
print(kotae)
Buggy python submission (verdict: Runtime Error):
moto=input()
count=0
countlist=[]
for i in range(len(moto)):
  if moto[i]=="A":
    count=count+1
  elif moto[i]=="T":
    count=count+1
  elif moto[i]=="G":
    count=count+1
  elif moto[i]=="C":
    count=count+1
  else:
    countlist.append(count)
    count=0
kotae=max(countlist)
print(kotae)
    

Fixed submission:
moto=input()
count=0
countlist=[0]
for i in range(len(moto)):
  if moto[i]=="A" or moto[i]=="T" or moto[i]=="G" or moto[i]=="C":
    count=count+1
  else:
    countlist.append(count)
    count=0
countlist.append(count)
kotae=max(countlist)
print(kotae)