Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03305 (python)

Fixed submission:
from collections import deque
n,m,s,t = map(int,input().split())
edgem = [[]for i in range(n)]
edges = [[]for i in range(n)]
for i in range(m):
    u,v,a,b = map(int,input().split())
    edgem[u-1].append([v-1,a])
    edgem[v-1].append([u-1,a])
    edges[u-1].append([v-1,b])
    edges[v-1].append([u-1,b])

costm = [float('inf')]*n
costs = [float('inf')]*n
costm[s-1],costs[t-1] = 0,0

queue = deque([s-1])
while queue.__len__() > 0:
    p = queue.popleft()
    for a,b in edgem[p]:
        if costm[a] > costm[p] + b:
            costm[a] = costm[p] + b
            queue.append(a)
queue = deque([t-1])
while queue.__len__() > 0:
    p = queue.popleft()
    for a,b in edges[p]:
        if costs[a] > costs[p] + b:
            costs[a] = costs[p] + b
            queue.append(a)
ans = [float('inf')]*n
for i in range(n):
    ans[i] = costm[i] + costs[i]
for i in range(n-1,0,-1):
    ans[i-1] = min(ans[i-1],ans[i])
money = 10**15
for i in ans:
    print(money-i)

Buggy submission (verdict: Runtime Error):
from collections import deque
n,m,s,t = map(int,input().split())
edgem = [[]for i in range(n)]
edges = [[]for i in range(n)]
for i in range(m):
    u,v,a,b = map(int,input().split())
    edgem[u-1].append([v-1,a])
    edgem[v-1].append([u-1,a])
    edges[u-1].append([v-1,b])
    edges[v-1].append([u-1,b])

costm = [float('inf')]*n
costs = [float('inf')]*n
costm[s-1],costs[t-1] = 0,0

queue = deque([s-1])
while queue != deque([]) > 0:
    p = queue.popleft()
    for a,b in edgem[p]:
        if costm[a] > costm[p] + b:
            costm[a] = costm[p] + b
            queue.append(a)
queue = deque([t-1])
while queue != deque([]):
    p = queue.popleft()
    for a,b in edges[p]:
        if costs[a] > costs[p] + b:
            costs[a] = costs[p] + b
            queue.append(a)
ans = [float('inf')]*n
for i in range(n):
    ans[i] = costm[i] + costs[i]
for i in range(n-1,0,-1):
    ans[i-1] = min(ans[i-1],ans[i])
money = 10**15
for i in ans:
    print(money-i)
Problem p03377 (python)

Fixed submission:
A,B,X = map(int,input().split())
if A <= X and X <= A+B:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
A,B,X = int(input().split())
if A < X and X < A+B:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
A,B,X = int(input())
if A < X and X < A+B:
    print("YES")
else:
    print("NO")
Problem p03573 (python)

Fixed submission:
X = list(map(int,input().split()))
X.sort()
print(sum(X)-X[1]*2)

Buggy submission (verdict: Runtime Error):
X = list(map(int,input().split))
X.sort()
print(sum(X)-X[1]*2)
Problem p03576 (python)

Fixed submission:
N,K = map(int,input().split())
XY = []

for i in range(N):
    x,y = map(int,input().split())
    XY.append((x,y))


ans = float('inf')

for lx, _ in XY:
    for rx, _ in XY:
        if lx > rx:
            continue
        for _, dy in XY:
            for _, uy in XY:
                if dy > uy:
                    continue
                count = 0
                for x,y in XY:
                    if lx <= x <= rx and dy <= y <= uy:
                        count += 1
                if count >= K:
                    ans = min(ans,(rx-lx)*(uy-dy))
print(ans)

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
XY = list(list(map(int,input().split()))for i in range(N))
XY.sort()
ans = float('inf')
for i in range(N-K+1):
    miny = XY[i][1]
    maxy = miny
    y = []
    for j in range(i,i+K):
        y.append(XY[j][1])
    y.sort()
    ans = min((XY[j][0] - XY[i][0])*(y[-1]-y[0]),ans)
    for j in range(i+K,N):
        y.append(XY[j][1])  
        y.sort()
        for k in range(j-K+1):
            ans = min((XY[j][0] - XY[i][0])*(y[k+K-1]-y[k]),ans)
print(ans)
Problem p03608 (python)

Fixed submission:
import sys
input = sys.stdin.readline

N,M,R = map(int,input().split())
r = list(map(int,input().split()))
S = [[]for i in range(N)]
for i in range(M):
    a,b,c = map(int,input().split())
    S[a-1].append([b-1,c])
    S[b-1].append([a-1,c])
d = [[float('inf')]*N for i in range(N)]
queue = []
hoge = [0]*(M)
for i in range(N):
    queue = [i]
    d[i][i] = 0
    while queue !=[]:
        l = 0
        for q in queue:
            for next,c in S[q]:
                if d[i][next] > d[i][q]+c:
                    d[i][next] = d[i][q]+c
                    if not(next in hoge[:l]):
                        hoge[l] = next
                        l += 1
        queue = hoge[:l]
def func(x,l):
    if l == []:
        return 0
    ans = float('inf')
    for i in range(len(l)):
        ans =min(ans,func(l[i],l[:i]+l[i+1:]) + d[x-1][l[i]-1])
    return ans
ans = float('inf')
for i in r:
    ans = min(ans,func(i,r))
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N,M,R = map(int,input().split())
r = list(map(int,input().split()))
S = [[]for i in range(N)]
for i in range(M):
    a,b,c = map(int,input().split())
    S[a-1].append([b-1,c])
    S[b-1].append([a-1,c])
d = [[float('inf')]*N for i in range(N)]
queue = []
for i in range(N):
    queue = [i]
    d[i][i] = 0
    while queue !=[]:
        hoge = [0]*(N+1)
        l = 0
        for q in queue:
            for next,c in S[q]:
                if d[i][next] > d[i][q]+c:
                    hoge[l] = next
                    l += 1
                    d[i][next] = d[i][q]+c
        queue = hoge[:l]
def func(x,l):
    if l == []:
        return 0
    ans = float('inf')
    for i in range(len(l)):
        ans =min(ans,func(l[i],l[:i]+l[i+1:]) + d[x-1][l[i]-1])
    return ans
ans = float('inf')
for i in r:
    ans = min(ans,func(i,r))
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

N,M,R = map(int,input().split())
r = list(map(int,input().split()))
S = [[]for i in range(N)]
for i in range(M):
    a,b,c = map(int,input().split())
    S[a-1].append([b-1,c])
    S[b-1].append([a-1,c])
d = [[float('inf')]*N for i in range(N)]
queue = []
for i in range(N):
    queue = [i]
    d[i][i] = 0
    while queue !=[]:
        hoge = [0]*N
        l = 0
        for q in queue:
            for next,c in S[q]:
                if d[i][next] > d[i][q]+c:
                    hoge[l] = next
                    l += 1
                    d[i][next] = d[i][q]+c
        queue = hoge[:l]
def func(x,l):
    if l == []:
        return 0
    ans = float('inf')
    for i in range(len(l)):
        ans =min(ans,func(l[i],l[:i]+l[i+1:]) + d[x-1][l[i]-1])
    return ans
ans = float('inf')
for i in r:
    ans = min(ans,func(i,r))
print(ans)
Problem p03699 (python)

Fixed submission:
N = int(input())
s = list(int(input()) for i in range(N))
ans = 0
sum_s = sum(s)
if sum_s%10 != 0:
    ans = sum_s
for i in s:
    if (sum_s - i)%10 != 0:
        ans = max(ans,sum_s - i)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
s = list(int(input().split())for i in range(N))
ans = sum(s)
if ans%10 == 0:
    for i in s:
        if i%10!=0:
            ans -= i
            break
print(ans)
Problem p03732 (python)

Fixed submission:
N,W = map(int,input().split())
w1,v = map(int,input().split())
wv = [[v],[],[],[]]
for i in range(N-1):
    w,v = map(int,input().split())
    wv[w-w1].append(v)
for i in range(4):
    wv[i]=[0] + sorted(wv[i],reverse=True)
# 累積和
for i in range(4):
    for j in range(1,len(wv[i])):
        wv[i][j] += wv[i][j-1]
ans = 0
hoge = [0,0,0,0]
for i in range(len(wv[0])):
    hoge[0] = wv[0][i]
    for j in range(len(wv[1])):
        hoge[1] = wv[1][j]
        for k in range(len(wv[2])):
            hoge[2] = wv[2][k]
            for l in range(len(wv[3])):
                hoge[3] = wv[3][l]
                if w1*(i+j+k+l)+j+2*k+3*l > W:
                    break
                else:
                    ans = max(ans,sum(hoge))
print(ans)

Buggy submission (verdict: Runtime Error):
N,W = map(int,input().split())
wv = list(list(map(int,input().split()))for i in range(N))
dp = [[0]*(W+1) for i in range(N+1)]

for i in range(N):
    w,v = wv[i]
    for j in range(1,W+1):
        if w > j:
            dp[i+1][j] = dp[i][j]
        else:
            dp[i+1][j] = max(dp[i][j],dp[i][j-w]+v)
print(dp[-1][-1])

Buggy submission (verdict: Runtime Error):
N,W = map(int,input().split())
wv = list(list(map(int,input().split()))for i in range(N))
dp = [[0]*(W+1) for i in range(N+1)]

for i in range(N):
    w,v = wv[i]
    for j in range(1,W+1):
        if w > j:
            dp[i+1][j] = dp[i][j]
        else:
            dp[i+1][j] = max(dp[i][j],dp[i][j-w]+v)
print(dp[-1][-1])
Problem p02657 (python)

Fixed submission:
a, b = map(int, input().split())

print(a*b)

Buggy submission (verdict: Runtime Error):
import math

n = int(input())

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

if is_prime(n):
    print(1)
else:
    count = 0
    nums = []
    while n != 1:
        for i in range(2, 10*12):
            v, m = divmod(n, i)
            if m == 0:
                if i in nums:
                    continue

                nums.append(i)
                n = v
                count += 1
            else:
                pass

    print(count)
Problem p02658 (python)

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

sum = 1
if 0 in nums:
    print(0)
else:
    for num in nums:
        sum *= num
        if sum > 10 ** 18:
            print(-1)
            break
    else:
        print(sum)

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

n = int(input())
nums = list(map(int, input().split()))
nums = np.array(nums)

if nums.prod() > 10 ** 18:
    print(-1)
else:
    print(nums.prod())
Problem p02708 (python)

Fixed submission:
def main():
    n, k = map(int, input().split())

    num = 10*100
    nums = [num + i for i in range(0, n+1)]

    # sums = []
    total = 0
    for i in range(k, n+2):
        _min = int((nums[0]+nums[i-1])*(nums[i-1]-nums[0]+1)/2)
        _max = int((nums[-i]+nums[-1])*(nums[-1]-nums[-i]+1)/2)

        total += _max - _min + 1

    print(total%(10**9+7))

if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
import itertools

main():
    n, k = map(int, input().split())

    num = 10*100
    nums = [num + i for i in range(0, n+1)]

    sums = []
    for i in range(k, n+2):
        for v in itertools.combinations(nums, i):
            sums.append(v)

    totals = []
    for s in sums:
        totals.append(sum(s))

    totals = set(totals)
    print(len(totals))

if __name__ == "__main__":
    main()
Problem p03086 (python)

Fixed submission:
s = input()
n = len(s)

ans = 0
for i in range(n):
    for j in range(i, n):
        if all("ACGT".count(l) for l in s[i:j + 1]):
            ans = max(ans, j - i + 1)

print(ans)

Buggy submission (verdict: Runtime Error):
string = input()

char = ["A", "C", "G", "T"]

count = 0
lengths = []
for s in string:
    if s in char:
        count += 1
    else:
        lengths.append(count)
        count = 0
else:
    print(max(lengths))
Problem p03102 (python)

Fixed submission:
import numpy as np

n, m, c = map(int, input().split())
b = list(map(int, input().split()))

b = np.array(b)

count = 0
for _ in range(n):
    a = list(map(int, input().split()))
    a = np.array(a)

    if np.dot(a, b) + c > 0:
        count += 1
else:
    print(count)

Buggy submission (verdict: Runtime Error):
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
pandas = "*"
numpy = "*"

[requires]
python_version = "3.7"
Problem p02582 (python)

Fixed submission:
a = input()
if "RRR" in a:
  print(3)
elif "RR" in a:
  print(2)
elif "R" in a:
  print(1)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
a = input()
if "RRR" in a:
  print(3)
elif "RR" in a:
  print(2)
elif "R" in a:
  print(1)
else:
  primt(0)

Buggy submission (verdict: Runtime Error):

a = input()
if "RRR" in a:
  print(3)
  elif "RR" in a:
      print(2)
  elif "R" in a:
      print(1)
  else:
      primt(0)

Buggy submission (verdict: Runtime Error):
str1 = input()
str2 = 'R'
str3 = 'RR'
str4 = 'RRR'
ans = 0
if str4 in str1
ans = 3
elif str3 in str1
ans = 2
elif str3 in str1
ans = 2
else
ans=0

print(ans)
Problem p02583 (python)

Fixed submission:
a = int(input())
b = list(map(int,input().split()))
b.sort()
d = 0
 
if a <= 2:
  print("0")
else :
  for i in range(len(b)):
    for j in range(i+1,len(b)):
      for k in range(j+1,len(b)):
        if b[i]+b[j] > b[k] and b[i] != b[j] and b[j] != b[k]:
          d += 1
  print(str(d))

Buggy submission (verdict: Runtime Error):
a = input()
b = list(map(int,input().split()))
c = b.sort()
d = 0

if a <= 2:
  print("0")
elif :
  for i in len(b):
    for j in (i+1,len(b)):
      for k in (k+1,len(b)):
        if c[i]+c[j] > c[k]:
          d += 1
  print(str(d))
Problem p02608 (python)

Fixed submission:
n = int(input())
ans = [0]*n

for i in range(1,101):
  for j in range(1,101):
    for k in range(1,101):
      l = i**2 + j**2 + k**2 + i*j + j*k + k*i
      if l <= n:
        ans[l-1] += 1
      
for m in range(n): 
  print(ans[m])

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = [0]*n
n1 = int(n/6)+1

for l in range(1,n+1):
  for i in range(1,n1):
    for j in range(1,n1):
      for k in range(1,n1):
        if i**2 + j**2 + k**2 + i*j + j*k + k*i == l:
          ans[(l-1)] += 1
        elif i**2 + j**2 + k**2 + i*j + j*k + k*i > l:
          break 
    if i**2 + j**2 + k**2 + i*j + j*k + k*i > l:
      break 
  if i**2 + j**2 + k**2 + i*j + j*k + k*i > l:
    break 

for l in range(1,n+1):      
   print(ans[(l-1)])
Problem p02612 (python)

Fixed submission:
money1 = int(input())
if money1 % 1000 != 0:
    money2 = 1000 - (money1 % 1000)
    print(str(money2))
else:
    money2 = 0
    print(str(money2))

Buggy submission (verdict: Runtime Error):
money1 = int(input())
if money1 % 1000 != 0:
    money2 = 1000 - (money1 % 1000)
   else:
    money2 = 0
print(str(money2))

Buggy submission (verdict: Runtime Error):
money1 = int(input())
money2 = money % 1000
print(money2)
Problem p02657 (python)

Fixed submission:
a,b = map(int,input().split())
print(str(a*b))

Buggy submission (verdict: Runtime Error):
a,b = int(input().split())
print(str(a*b))

Buggy submission (verdict: Runtime Error):

a,b = int(input().sqlit())
print(str(a*b))
Problem p02658 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
a.sort()
t = 1
 
for i in range(len(a)):
  t *= a[i]
  if t > 10**18:
    break
 
if t > 10**18 :
  print("-1")
else:
  print(str(t))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = map(int,input().split())
a.sort()
t = 1
 
for i in range(len(a)):
  t *= a[i]
  if t > 10**18:
    break

if t > 10**18 :
  print("-1")
else:
  print(str(t))

Buggy submission (verdict: Runtime Error):
n = int.input()
a = map(int,input().split())
t = 1

for i in a:
  t *= i

if t >10**18:
  print("-1")
else:
  print(str(t))

Buggy submission (verdict: Runtime Error):
n = int.input()
a = map(int,input().split())
t = 1

for i in a:
  t *= a[i]

print(str(t))
Problem p02681 (python)

Fixed submission:
a,b = [input() for i in range(2)]
 
if a == b[:-1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b = [input() for i in range(2)]

if a = b[:-1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = [input() for i in range(2)]
b = a[0]
c = a[1]
if b = c[:-1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
if a = b[:-1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
if a = b[:-1]:
  print("yes")
else:
  print("No")
Problem p02705 (python)

Fixed submission:
import math
a = int(input())
print(str(2*a*math.pi))

Buggy submission (verdict: Runtime Error):
import math
a = int(input())
print(str(2a*math.pi))

Buggy submission (verdict: Runtime Error):
import math
a = input()
print(str(2a*math.pi))
Problem p02741 (python)

Fixed submission:
k = int(input())
a = [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(a[k-1])

Buggy submission (verdict: Runtime Error):
k = int(input())
a = [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]
pritn(a[k])
Problem p02898 (python)

Fixed submission:
n,k = map(int,input().split())
h = list(map(int,input().split()))
h.sort()
ans = 0

for i in range(n):
  if h[i] >= k:
    ans = n-i
    break

print(ans)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(map(int,input().split()))
h.sort()

for i in range(n):
  if h[i] >= k:
    ans = n-i
    break

print(ans)
Problem p02677 (python)

Fixed submission:
import math
 
A,B,H,M=map(int,input().split())
x=abs(((60*H+M)*0.5)-(6*M))
y=A**2+B**2-2*A*B*math.cos(math.radians(x))
print(math.sqrt(y))

Buggy submission (verdict: Runtime Error):
import math
 
A,B,H,M=map(int,input().split())
x=abs(((60*H+M)*0.5)-(6*M))
if x>=180:
    x=x-180
y=(A**2)+(B**2)-2*A*B*math.cos(math.radians(x))
print((math.sqrt(y))

Buggy submission (verdict: Runtime Error):
import math
import decimal

a,b,h,m=map(float,input().split())
A=decimal.Decimal(a)
B=decimal.Decimal(b)
H=decimal.Decimal(h)
M=decimal.Decimal(m)
x=abs(((60*H+M)*0.5)-(6*M))
if x>=180:
    x=x-180
print(format((math.sqrt((A*A)+(B*B)-2*A*B*math.cos(math.radians(x)))),'.50f'))
Problem p03049 (python)

Fixed submission:
#Rs,Gs,Bs,Ns= input().split()
#R=int(Rs)
#G=int(Gs)
#B=int(Bs)
#N=int(Ns)
#ans=0
#sub_ans=0
#while(sub_ans>=N):

ans=0
f_a=0
b_b=0
a_b=0
str_list=[]
N= int(input())
for i in range(N):
    str=input()
    ans=ans+str.count("AB")
    if(str[-1]=="A"):
        f_a=f_a+1
    if(str[0]=="B"):
        b_b=b_b+1
    if(str[-1]=="A"and str[0]=="B"):
        a_b=a_b+1

if(f_a==N and b_b==N):
    ans=ans+N-1
elif((f_a==a_b)and(b_b==a_b)and(f_a!=0)):
    ans=ans+f_a-1
elif(f_a< b_b):
    ans=ans+f_a
else:
    ans=ans+b_b

#print(f_a)
#print(b_b)
print(ans)

Buggy submission (verdict: Runtime Error):
ans=0
f_a=0
b_b=0
a_b=0
str_list=[]
N= int(input())
for i in range(N):
    str=input()
    ans=ans+str.count("AB")
    if(str[-1]=="A"):
        f_a=f_a+1
    if(str[0]=="B"):
        b_b=b_b+1
    if(str[-1]=="A"and str[0]=="B"):
        a_b=a_b+1


if(f_a==N and b_b==N):
    ans=ans+n-1
elif((f_a==a_b)and(b_b==a_b)):
    ans=ans+n-1
elif(f_a< b_b):
    ans=ans+f_a
else:
    ans=ans+b_b

#print(f_a)
#print(b_b)
print(ans)

Buggy submission (verdict: Runtime Error):
ans=0
f_a=0
b_b=0
str_list=[]
N= int(input())
for i in range(N):
    str=input()
    ans=ans+str.count("AB")
    if(str[-1]=="A"):
        f_a=f_a+1
    if(str[0]=="B"):
        b_b=b_b+1

if(f_a==N and b_b==N):
    ans=ans+n-1
elif(f_a<= b_b):
    ans=ans+f_a
else:
    ans=ans+b_b

print(ans)
Problem p03227 (python)

Fixed submission:
N= input()
nlen=len(N)
if nlen==3:
    CN=N[2]+N[1]+N[0]
    print (CN)
else:
    print (N)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = []
flag=0
ans=0
anslist=[]
se=0
for i in range(N):
    A.append(int(input()))
A.sort()
if N%2==0:
    anslist.append(A[-1])
    del A[-1]
else:
    anslist.append(A[0])
    del A[0]
    se=1
try:
    if se==0:
        while True:
            if flag==0:
                for i in range(2):
                    anslist.append(A[0])
                    anslist.reverse()
                    del A[0]
                flag=1
            else:
                for i in range(2):
                    anslist.append(A[-1])
                    anslist.reverse()
                    del A[-1]
                flag=0
    else:
        while True:
            if flag!=0:
                for i in range(2):
                    anslist.append(A[0])
                    anslist.reverse()
                    del A[0]
                flag=1
            else:
                for i in range(2):
                    anslist.append(A[-1])
                    anslist.reverse()
                    del A[-1]
                flag=0
 
 
except Exception as e:
    #print (anslist)
    flag=0
    while N-1>flag:
        ans=abs(anslist[flag]-anslist[flag+1])+ans
        flag=flag+1
    
    print(ans)
Problem p03260 (python)

Fixed submission:
ls = raw_input().split()
l=[0,0]
l[0]=int(ls[0])
l[1]=int(ls[1])

if (l[0]%2==0)or(l[1]%2==0):
    print "No"
else:
    print "Yes"

Buggy submission (verdict: Runtime Error):
import fractions
l = map(int, raw_input().split())
toshisuu= l[0]
starttoshi= l[1]
mathlist=[0]
toshilist = map(int, raw_input().split())
ans=100000000000000000000
das=0
for i in toshilist:
    counts=abs(i-starttoshi)
    if das==0:
        mathlist[0]=counts
        das=1
    else:
        mathlist.append(counts)
mathlist.sort(reverse = True)
# print mathlist
print fractions.gcd(mathlist[0], mathlist[1])

Buggy submission (verdict: Runtime Error):
from fractions import Fraction
l = map(int, raw_input().split())
toshisuu= l[0]
starttoshi= l[1]
mathlist=[0]
toshilist = map(int, raw_input().split())
ans=100000000000000000000
das=0
for i in toshilist:
    counts=abs(i-starttoshi)
    if das==0:
        mathlist[0]=counts
        das=1
    else:
        mathlist.append(counts)
mathlist.sort(reverse = True)
# print mathlist
print gcd(mathlist[0], mathlist[1])
Problem p03284 (python)

Fixed submission:
# -*- coding: utf-8 -*-
n=raw_input().split()
ina=int(n[0])
ika=int(n[1])
ans=ina%ika
if ans==0:
    print"0"
else:
    print"1"

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n=raw_input().split()
ina=int(n[0])
ika=int(k[1])
ans=ina%ika
if ans==0:
    print"0"
else:
    print"1"

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n=raw_input()
k=raw_input()
ans=n%k
if ans==0:
    print"0"
else:
    print"1"

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n=raw_input()
k=raw_input()
inans=int(n)
ikans=int(k)
ans=inans%ikans
if ans==0:
    print"0"
else:
    print"1"

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n=raw_input()
k=raw_input()
inans=int(n)
ikans=int(k)
ans=inans%ikans
if ans==0:
    print"0"
else:
    print"1"
Problem p03285 (python)

Fixed submission:
# -*- coding: utf-8 -*-
n=raw_input()
ina=int(n)
des=0
for x in range(26):
    for y in range(16):
        ans=4*x+7*y
        if ans==ina:
            des=des+1
if des>0:
    print "Yes"
else:
    print"No"

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
n=raw_input().
ina=int(n)
des=0
for x in range(26):
    for y in range(16):
        ans=4*x+7*y
        if ans==ina:
            des=des+1
if des>0:
    print "Yes"
else:
    print"No"
Problem p03288 (python)

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

a = raw_input()
r=int(a)
if r<=1199:
    print'ABC'
elif r<=2799:
    print'ARC'
else:
    print'AGC'

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

r = raw_input()
r=r-0x30
if r<=1199:
    print'ABC'
elif r<=2799:
    print'ARC'
else:
    print'AGC'

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

a = raw_input()
if a<1200:
    print"ABC"
else:
    if a<2800:
    print"ARC"
    else:
        print"AGC"
Problem p02706 (python)

Fixed submission:
# py abc163b.py
n,m = map(int,input().split())
val = sum(list(map(int,input().split())))
if val>n:
	print(-1)
else:
	print(n-val)

Buggy submission (verdict: Runtime Error):
# py abc163b.py
n,m = map(int,input().split())
val = sum(list(map(int,input().split())))
if val>m:
	print(-1)
else
	print(m-val)