Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
i=2
ans=[1]
while(i**2 <= n ):
  j=2
  while( i**(j+1) <=n ):
    j+=1
  ans.append( i**j)

print( max(ans) )
  

Fixed submission:
n=int(input())
i=2
ans=[1]
while(i**2 <= n ):
  j=2
  while( i**(j+1) <=n ):
    j+=1
  ans.append( i**j)
  i+=1

print( max(ans) )
Buggy python submission (verdict: Runtime Error):
class Union_find:
    def __init__(self,n):
        self.group=[i for i in range(n)]
    
    def root(self,x):
        if(self.group[x]==x):
            return x
        else:
            tmp=self.root(self.group[x])
            self.group[x]=tmp
            return tmp
    
    def make(self,x,y):
        self.group[self.root(x)]=y
    
    def judge(self,x,y):
        if(self.root(x)==self.root(y)):
            return True
        else:
            return False


n,m=map(int,input().split())
T=Union_find(n+1)
P=list(map(int,input().split()))

for _ in range(m):
    
    x,y=map(int,input().split())
    T.make(x,y)


ans=0

for i in range(n):
    if(T.judge(P[i],i+1)):
        ans+=1

print(ans)

Fixed submission:
class Union_find:
    def __init__(self,n):
        self.group=[i for i in range(n)]
    
    def root(self,x):
        if(self.group[x]==x):
            return x
        else:
            tmp=self.root(self.group[x])
            self.group[x]=tmp
            return tmp
    
    def make(self,x,y):
        self.group[self.root(x)]=self.root(y)
    
    def judge(self,x,y):
        if(self.root(x)==self.root(y)):
            return True
        else:
            return False


n,m=map(int,input().split())
T=Union_find(n+1)
P=list(map(int,input().split()))

for _ in range(m):
    
    x,y=map(int,input().split())
    T.make(x,y)


ans=0

for i in range(n):
    if(T.judge(P[i],i+1)):
        ans+=1

print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
A=list(map(int,input().split()))
A.sort()

a=A[-1]/2
tmp=A[-1]
ans=0
for i in range(n):
    if(abs(a-A[i]) < tmp):
        tmp=abs(a-A[i])
        ans=A[i]

print("{} {}".format(A[-1],ans))

Fixed submission:
a,b,c=map(int,input().split())
if(a<=c and c<=a+b):
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
print(min([a,b]) + min([c,d]))

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
print(min([a,b]) + min([c,d]))
Buggy python submission (verdict: Runtime Error):
H,W,D=map(int,input().split())
data=[]
for i in range(1,H+1):
    tmp=list(map(int,input().split()))
    for j in range(1,W+1):
        data.append([i,j,tmp[j-1]])

data.sort(key=lambda x:x[2])

ruiseki=[]
for i in range(D):
    tmp=[0]
    j=i+D
    while(j<H*W):
        tmp.append( abs(data[j][0]-data[j-D][0]) +abs(data[j][1]-data[j-D][1]) +tmp[-1])
        j+=D
    ruiseki.append(tmp)

Q=int(input())
for _ in range(Q):
    l,r=map(int,input().split())
    ind=l%D-1
    print(ruiseki[ind][r//D] - ruiseki[ind][l//D])

Fixed submission:
H,W,D=map(int,input().split())
data=[]
for i in range(1,H+1):
    tmp=list(map(int,input().split()))
    for j in range(1,W+1):
        data.append([i,j,tmp[j-1]])

data.sort(key=lambda x:x[2])

ruiseki=[]
for i in range(D):
    tmp=[0]
    j=i+D
    while(j<H*W):
        tmp.append( abs(data[j][0]-data[j-D][0]) +abs(data[j][1]-data[j-D][1]) +tmp[-1])
        j+=D
    ruiseki.append(tmp)

Q=int(input())
for _ in range(Q):
    l,r=map(int,input().split())
    ind=l%D-1
    if(ind==-1):
        l-=D
        r-=D
    print(ruiseki[ind][r//D] - ruiseki[ind][l//D])
Buggy python submission (verdict: Runtime Error):
import sys

def DFS(graph,start,visited):
    visited[start]=1
    start_num=graph[start][0]

    for edge in graph[start][1]:
        if(visited[edge[0]]==0):
            graph[edge[0]][0]=start_num+edge[1]
            if(DFS(graph,edge[0],visited)==0):
                return 0
        else:
            if(start_num+edge[1]!=graph[edge[0]][0]):
                return 0
    
    return 1
            






n,m=map(int,input().split())
visited={}
for i in range(n):
    visited[i+1]=0

graph={}
for i in range(1,n+1):
    graph[i]=[0,[]]
graph[1][0]=0

for i in range(m):
    l,r,d=map(int,input().split())
    graph[l][1].append([r,d])
    graph[r][1].append([l,-1*d])

for i in range(1,n+1):
    if(visited[i]==0):
        if(DFS(graph,i,visited)==0):
            print("No")
            sys.exit()


print("Yes")

Fixed submission:
import sys
sys.setrecursionlimit(1000000)

def DFS(start):
    global graph
    global zahyou

    start_num=zahyou[start]

    for w,d in graph[start]:
        if(zahyou[w]==None):
            zahyou[w]=start_num + d
            if( not DFS(w)):
                return False
        else:
            if(start_num + d != zahyou[w]):
                return False
    
    return True
            


n,m=map(int,input().split())
graph=[[] for _ in range(n)]

zahyou=[None]*n
for i in range(m):
    l,r,d=map(int,input().split())
    graph[l-1].append((r-1,d))
    graph[r-1].append((l-1,-1*d))

flag=True
for i in range(n):
    if(zahyou[i]==None):
        zahyou[i]=0
        flag&=DFS(i)
        if( not flag):
            break

if(flag):
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import sys
s=input()
len_s=len(s)
if(len_s==1):
    print(1)
    sys.exit()


if(len_s%2==1):
    l=len_s//2
    r=l
else:
    r=len_s//2
    l=r-1

saisyo=s[l]
if(s[l]==s[r]):
    while(saisyo==s[l-1] and saisyo==s[r+1]):
        l-=1
        r+=1
        if(l==0):
            break
else:
    r=l

print( (len_s + r-l +1)//2)

Fixed submission:
import sys
s=input()
len_s=len(s)
if(len_s==1):
    print(1)
    sys.exit()


if(len_s%2==1):
    l=len_s//2
    r=l
else:
    r=len_s//2
    l=r-1

saisyo=s[l]
if(s[l]==s[r]):
    while(0<l and saisyo==s[l-1] and saisyo==s[r+1]):
        l-=1
        r+=1

else:
    r=l

print( (len_s + r-l +1)//2)

Buggy python submission (verdict: Runtime Error):
s=input()
len_s=len(s)

if(len_s%2==1):
    l=len_s//2
    r=l
else:
    r=len_s//2
    l=r-1

saisyo=s[l]
if(s[l]==s[r]):
    while(saisyo==s[l-1] and saisyo==s[r+1]):
        l-=1
        r+=1
        if(l<0):
            break
else:
    r=l

print( (len_s + r-l +1)//2)

Fixed submission:
import sys
s=input()
len_s=len(s)
if(len_s==1):
    print(1)
    sys.exit()


if(len_s%2==1):
    l=len_s//2
    r=l
else:
    r=len_s//2
    l=r-1

saisyo=s[l]
if(s[l]==s[r]):
    while(0<l and saisyo==s[l-1] and saisyo==s[r+1]):
        l-=1
        r+=1

else:
    r=l

print( (len_s + r-l +1)//2)

Buggy python submission (verdict: Runtime Error):
s=input()
len_s=len(s)

if(len_s%2==1):
    l=len_s//2
    r=l
else:
    r=len_s//2
    l=r-1

saisyo=s[l]
if(s[l]==s[r]):
    while(saisyo==s[l-1] and saisyo==s[r+1] and 0<=l-1):
        l-=1
        r+=1
else:
    r=l

print( (len_s + r-l +1)//2)


Fixed submission:
import sys
s=input()
len_s=len(s)
if(len_s==1):
    print(1)
    sys.exit()


if(len_s%2==1):
    l=len_s//2
    r=l
else:
    r=len_s//2
    l=r-1

saisyo=s[l]
if(s[l]==s[r]):
    while(0<l and saisyo==s[l-1] and saisyo==s[r+1]):
        l-=1
        r+=1

else:
    r=l

print( (len_s + r-l +1)//2)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
_list=[0]
for i in range(n):
  _list.append(int(input()))

tmp=1
count=0
while(1):
  tmp=_list[tmp]
  count+=1
  if(tmp==2):
    print(count)
    break
  if(tmp==1):
    print(-1)
    break

Fixed submission:
n=int(input())
_list=[0]
for i in range(n):
  _list.append(int(input()))

tmp=1
count=0
while(1):
  tmp=_list[tmp]
  count+=1
  if(tmp==2):
    print(count)
    break
  if(tmp==1 or n<count):
    print(-1)
    break
Buggy python submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define itrfor(itr,A) for(auto itr = A.begin(); itr !=A.end();itr++)
typedef long long llong;
char moji[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
char moji2[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
char moji3[10]={'0','1','2','3','4','5','6','7','8','9'};
#define Sort(a) sort(a.begin(),a.end());
#define Reverse(a) reverse(a.begin(),a.end());
#define print(a) cout << a << endl;


int main(){
  int x;
  cin >> x;
  if(x<1200) cout << "ABC" << endl;
  if(1200<=x) cout << "ARC" << endl;

Fixed submission:
x=int(input())
if(x < 1200):
  print("ABC")
else:
  print("ARC")
Buggy python submission (verdict: Runtime Error):
s=input()
print("{} {} {}".format( s[0,5], s[6,13],s[14,19] ) )

Fixed submission:
s=input()
print("{} {} {}".format( s[0:5], s[6:13],s[14:19] ) )

Buggy python submission (verdict: Runtime Error):
s=list(input()
print("{} {} {}".format( s[0,5], s[6,13],s[14,19] ) )

Fixed submission:
s=input()
print("{} {} {}".format( s[0:5], s[6:13],s[14:19] ) )

Buggy python submission (verdict: Runtime Error):
s=input()
print(f"{} {} {}".format( s[0,5], s[6,13],s[14,19] ) )

Fixed submission:
s=input()
print("{} {} {}".format( s[0:5], s[6:13],s[14:19] ) )
Buggy python submission (verdict: Runtime Error):
a,b,x=map(int,input().split())
first=a-a%x+x
if(first==a+x):
  first=a
last=b-b%x

print(last//x - first//x +1

Fixed submission:
a,b,x=map(int,input().split())
first=a-a%x+x
if(first==a+x):
  first=a
last=b-b%x

print(last//x - first//x +1)
Buggy python submission (verdict: Runtime Error):
A=list(map(int,input().split()))
if( sum(A) == 2*max(A) ) print("Yes")
else print( "No" )

Fixed submission:
A=list(map(int,input().split()))
if( sum(A) == 2*max(A) ):
  print("Yes")
else:
  print( "No" )
Buggy python submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
if(a==b and b==c):
  print(1)
else if( a!=b and b!=c and c!=a):
  print(3)
else:
  print(2)

Fixed submission:
a,b,c = map(int,input().split())
if(a==b and b==c):
  print(1)
elif( a!=b and b!=c and c!=a):
  print(3)
else:
  print(2)

Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
print(K*((K-1)**(N-1)))

Fixed submission:
a,b,c = map(int,input().split())
if(a==b and b==c):
  print(1)
elif( a!=b and b!=c and c!=a):
  print(3)
else:
  print(2)
Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
print(K*((K-1)^^(N-1)))

Fixed submission:
N,K=map(int,input().split())
print(K*((K-1)**(N-1)))
Buggy python submission (verdict: Runtime Error):
a,b,h=map(int,input().split())
print( (a+b)*h/2 )

Fixed submission:
a=int(input())
b=int(input())
h=int(input())
print( int((a+b)*h/2) )
Buggy python submission (verdict: Runtime Error):
n,k,x,y=map(int,input().split())
x_day = min( [n,k] )
y_day = max( [0,n-k])
print( x*x_day + y*y_day )

Fixed submission:
n=int(input())
k=int(input())
x=int(input())
y=int(input())
x_day = min( [n,k] )
y_day = max( [0,n-k])
print( x*x_day + y*y_day )
Buggy python submission (verdict: Runtime Error):
a=int(input(""))
b=int(input(""))
if a%2==1 and b%2==1:
    print("Odd\n")
else:
    print("Even\n")

Fixed submission:
s=raw_input().split()
a=int(s[0]);
b=int(s[1]);
if a*b%2==0:
   print "Even"
else:
   print "Odd"

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if a%2==1 and b%2==1:
    print("Odd\n")
else:
    print("Even\n")

Fixed submission:
s=raw_input().split()
a=int(s[0]);
b=int(s[1]);
if a*b%2==0:
   print "Even"
else:
   print "Odd"
Buggy python submission (verdict: Runtime Error):
import re
d='A?KIHA?BA?RA?$'
s=raw_input()
print['NO','YES'][re.match(d,s)!=None]

Fixed submission:
S = input()
OK = False
if S=='KIHBR':
    OK = True
elif S=='KIHBRA':
    OK = True
elif S=='KIHBAR':
    OK = True
elif S=='KIHBARA':
    OK = True
elif S=='KIHABR':
    OK = True
elif S=='KIHABRA':
    OK = True
elif S=='KIHABAR':
    OK = True
elif S=='KIHABARA':
    OK = True
elif S=='AKIHBR':
    OK = True
elif S=='AKIHBRA':
    OK = True
elif S=='AKIHBAR':
    OK = True
elif S=='AKIHBARA':
    OK = True
elif S=='AKIHABR':
    OK = True
elif S=='AKIHABRA':
    OK = True
elif S=='AKIHABAR':
    OK = True
elif S=='AKIHABARA':
    OK = True
print('YES' if OK else 'NO')

Buggy python submission (verdict: Runtime Error):
import re
p='A?KIHA?BA?RA?$'
s=raw_input()
print['NO', 'YES'][re.match(p,s)!=None]

Fixed submission:
S = input()
OK = False
if S=='KIHBR':
    OK = True
elif S=='KIHBRA':
    OK = True
elif S=='KIHBAR':
    OK = True
elif S=='KIHBARA':
    OK = True
elif S=='KIHABR':
    OK = True
elif S=='KIHABRA':
    OK = True
elif S=='KIHABAR':
    OK = True
elif S=='KIHABARA':
    OK = True
elif S=='AKIHBR':
    OK = True
elif S=='AKIHBRA':
    OK = True
elif S=='AKIHBAR':
    OK = True
elif S=='AKIHBARA':
    OK = True
elif S=='AKIHABR':
    OK = True
elif S=='AKIHABRA':
    OK = True
elif S=='AKIHABAR':
    OK = True
elif S=='AKIHABARA':
    OK = True
print('YES' if OK else 'NO')
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(max(a-b,0))

Fixed submission:
a, b = map(int, raw_input().split())
print max(a - b, 0)

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
print(max(a-b,0))

Fixed submission:
a, b = map(int, raw_input().split())
print max(a - b, 0)
Buggy python submission (verdict: Runtime Error):
a,b,c = input().split()
if a[-1]==b[0] and b[-1]==c[0]:
  print("YES")
else:
  print("NO")


Fixed submission:
from operator import itemgetter
import bisect
from itertools import accumulate
N, W = map(int, input().split())
WV = [list(map(int, input().split())) for _ in range(N)]
WV.sort(key=itemgetter(0, 1))
w, v = zip(*WV)
w0 = w[0]
w1 = w0 + 1
w2 = w1 + 1
w3 = w2 + 1
i0 = bisect.bisect_left(w, w0)
i1 = bisect.bisect_left(w, w1)
i2 = bisect.bisect_left(w, w2)
i3 = bisect.bisect_left(w, w3)
v0 = sorted(v[i0:i1], reverse=True)
v1 = sorted(v[i1:i2], reverse=True)
v2 = sorted(v[i2:i3], reverse=True)
v3 = sorted(v[i3:], reverse=True)
a0 = list(accumulate(v0)) + [0]
a1 = list(accumulate(v1)) + [0]
a2 = list(accumulate(v2)) + [0]
a3 = list(accumulate(v3)) + [0]
n0 = 1 + len(v0)
n1 = 1 + len(v1)
n2 = 1 + len(v2)
n3 = 1 + len(v3)

ans = 0
for i0 in range(n0):
    for i1 in range(n1):
        for i2 in range(n2):
            for i3 in range(n3):
                if i0*w0 + i1*w1 + i2*w2 + i3*w3 <= W:
                    ans = max(ans, a0[i0-1]+a1[i1-1]+a2[i2-1]+a3[i3-1])
print(ans)
Buggy python submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
long long a,b,x,s,e;
int main()
{
    cin>>a>>b>>x;
    if(a%x==0)
	{
		s=a/x;
	}
    else
	{
		s=a/x+1;
	}
    e=b/x;
    cout<<e-s+1;
    return 0;//求过！！！！！！！！！！！ 
}

Fixed submission:
a,b,c=map(int,input().split())
if a%c==0:
 print((b-a)//c+1)
else:
 print((b-(a//c+1)*c)//c+1)

Buggy python submission (verdict: Runtime Error):
a, b, x = map(int, input().split())
b += x-1-(b % x)
if a % x:
    a += x-(a % x)
print(max(b-a+1, 0)


Fixed submission:
a,b,c=map(int,input().split())
if a%c==0:
 print((b-a)//c+1)
else:
 print((b-(a//c+1)*c)//c+1)
Buggy python submission (verdict: Runtime Error):
a = list(input())
if a[0] == a[-1]:
    if len(a) % 2 == 1:
        print('Second')
    else:
        print('First')
else:
    if len(s) % 2 == 1: 
        print('First')
    else:
        print('Second')

Fixed submission:
s=input()
if(s[0]==s[len(s)-1]):
    if(len(s) & 1):
        print('Second')
    else:
        print('First')
else:
    if(len(s) & 1):
        print('First')
    else:
        print('Second')
Buggy python submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;
strint s1, s2;
int leng;
int main()
{
    cin >> s1;
    for(int i = s1.size() - 1; i >= 0; i--)
        s2[leng++] = s1[i];
    for(int i = 0; i < leng; i++)
    {
        if(s1[i]=='b') s2[i]='d;
        else if (s1[i] == 'd') s2[i] = 'b';
        else if (s1[i] == 'p') s2[i] = 'q';
        else if (s1[i] == 'q') s2[i] = 'p';
    }
    if(!strcmp(s1,s2)) puts("Yes");
    else puts("No");
    return 0;
}

Fixed submission:
mp={'b':'d','d':'b','p':'q','q':'p'};a=list(input());b=list(a[::-1]);b=[mp[x] for x in b];print("Yes" if a==b else "No");
Buggy python submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;

int main(){
	
	string a;
	cin>>a;
	int la = a.length();
	bool c=false,f=false;
	for(int i=0;i<la;i++){
		if(a[i] == 'C')c = true;
		if(a[i]=='F' && c)f=true; 
	}
	if(c&&f)cout<<"Yes";
	else cout<<"No";
	
}


Fixed submission:
s=input();pd=0
for i in range(0,len(s)):
    if s[i]=='C':
        pd=1
    if s[i]=='F'and pd==1:
        print('Yes')
        pd=2
        break
if pd!=2:
    print('No')

Buggy python submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
int main() 
{
    char a[10010];
    bool c, f;
    fgets(a,10010,stdin);
    for(int i=1;i<=strlen(a);i++) 
    {
        if(a[i]=='C') 
        {
            for(int j=i+1;j<=strlen(a)-i;j++)
            {
                if(a[j]=='F')
                {
                    printf("Yes\n");
                    return 0;
                }
            }
        }
    }
    printf("No\n");
    return 0;
}

Fixed submission:
s=input();pd=0
for i in range(0,len(s)):
    if s[i]=='C':
        pd=1
    if s[i]=='F'and pd==1:
        print('Yes')
        pd=2
        break
if pd!=2:
    print('No')

Buggy python submission (verdict: Runtime Error):
strstart = input()
wzc = 0
wzf = 0
for i in strstart:
    i2 += 1
    if i == 'C':
        wzc = i2
    if i == 'F':
        wzf = i2
if wzc < wzf:
    print('YES')
else:
    print('NO')

Fixed submission:
s=input();pd=0
for i in range(0,len(s)):
    if s[i]=='C':
        pd=1
    if s[i]=='F'and pd==1:
        print('Yes')
        pd=2
        break
if pd!=2:
    print('No')

Buggy python submission (verdict: Runtime Error):
strstart = input()
wzc = 0
wzf = 0
for i in strstart:
    i2 += 1
    if i == 'c':
        wzc = i2
    if i == 'F':
        wzf = i2
        break
if wzc < wzf:
    print('YES')
else:
    print('NO')

Fixed submission:
s=input();pd=0
for i in range(0,len(s)):
    if s[i]=='C':
        pd=1
    if s[i]=='F'and pd==1:
        print('Yes')
        pd=2
        break
if pd!=2:
    print('No')

Buggy python submission (verdict: Runtime Error):
strstart = input()
for i in strstart:
    if i == 'C':
        wzc = i
        break
for i in strstart:
    if i == 'F':
        wzf = i
        break
if wzc < wzf:
    print('YES')
else:
    print('NO')

Fixed submission:
s=input();pd=0
for i in range(0,len(s)):
    if s[i]=='C':
        pd=1
    if s[i]=='F'and pd==1:
        print('Yes')
        pd=2
        break
if pd!=2:
    print('No')

Buggy python submission (verdict: Runtime Error):
def main()
    s = input()
    f = False
    if s.count('C') == 0 or s.count('F') == 0:
        print('NO')
        return
    for i in range(len(s)):
        if s[i] == 'C':
            for j in range(i, len(s)):
                if s[j] == 'F':
                    print('Yes')
                    f = True
                    break
            if f == False:
                print('No')
main()

Fixed submission:
s=input();pd=0
for i in range(0,len(s)):
    if s[i]=='C':
        pd=1
    if s[i]=='F'and pd==1:
        print('Yes')
        pd=2
        break
if pd!=2:
    print('No')
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print((a+b)*h/2)

Fixed submission:
print((int(input()) + int(input())) * int(input()) // 2)
Buggy python submission (verdict: Runtime Error):
s=input();k=[]
for i in range(0,len(s)):
    if s[i]!='B':
        k.append(int(s[i]))
    else:
        del k[-1]
for j in range(0,len(s)):
    print(k[j],end='')
print('')

Fixed submission:
s=input();k=[]
for i in range(0,len(s)):
    if s[i]!='B':
        k.append(int(s[i]))
    else:
        if k!=[]:
            del k[-1]
for j in range(0,len(k)):
    print(k[j],end='')
print('')
Buggy python submission (verdict: Runtime Error):
a=int(input())
if a/100==a%100/10 and a/100=a%10:
  print "Yes"
else:
  print "No"

Fixed submission:
s = input()
if s[:1] == s[2:]:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
s = input().split()

if　(int(s[0]) + int(s[1])>=10):
    print('error')
    
else :
    print(int(s[0]) + int(s[1]))

Fixed submission:
s = input().split()

if(int(s[0]) + int(s[1])>=10):
    print('error')    
else :
    print(int(s[0]) + int(s[1]))
Buggy python submission (verdict: Runtime Error):
s=input().split();n,a,b=int(s[0]),int(s[1]),int(s[2])
if a>b:
    print(0)
elif n=1:
    if a==b:
        print(1)
    else:
        print(0)
else:
    print((a-b)*(n-2)+1)

Fixed submission:
n,a,b=map(int,input().split())
if n>1 and b>=a or n==1 and a==b: 
    print ((n-2)*(b-a)+1);
else:
    print ("0");

Buggy python submission (verdict: Runtime Error):
n=input().slipt()
print(int(n[2]*(n[0]-2)-(n[1]*n[0]-2)+1))

Fixed submission:
n,a,b=map(int,input().split())
if n>1 and b>=a or n==1 and a==b: 
    print ((n-2)*(b-a)+1);
else:
    print ("0");

Buggy python submission (verdict: Runtime Error):
n=input()
a=input()
b=input()
print(int(b*(n-2)-(a*n-2)+1))

Fixed submission:
n,a,b=map(int,input().split())
if n>1 and b>=a or n==1 and a==b: 
    print ((n-2)*(b-a)+1);
else:
    print ("0");
Buggy python submission (verdict: Runtime Error):
l=list(str(input()).split(" "))
if l[0]-l[1]==l[1]-l[2]:
    print("YES")
else:
    print("NO")

Fixed submission:
s=input().split()
if(int(s[0])-int(s[1])==int(s[1])-int(s[2])):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
long double a,b,x;
long double ans,temp;
int main()
{
    cin>>a>>b>>x;
    if(a%x==0)
	{
		ans=a/x;
	}
    else
	{
		ans=a/x+1;
	}
    temp=b/x;
    cout<<temp-ans+1;
    return 0;
}

Fixed submission:
s=str(input())
s=s.split(' ')
a=eval(s[0])
b=eval(s[1])
x=eval(s[2])
if(a%x==0):
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
Buggy python submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;
char s1[100100], s2[100100];
int leng;
int main()
{
    cin >> s1;
    for(int i = strlen(s1) - 1; i >= 0; i--)
        s2[leng++] = s1[i];
    for(int i = 0; i < leng; i++)
    {
        if(s2[i]=='b') s2[i] = 'd';
        else if (s2[i] == 'd') s2[i] = 'b';
        else if (s2[i] == 'p') s2[i] = 'q';
        else if (s2[i] == 'q') s2[i] = 'p';
    }
    if(strcmp(s1, s2) == 0) puts("Yes");
    else puts("No");
    return 0;
}

Fixed submission:
dict={'b':'d','d':'b','p':'q','q':'p'}
s= input()
t=''.join(map(lambda x: dict[x],list(s[::-1])))
if s==t:
    print("Yes")
else :
    print("No")
Buggy python submission (verdict: Runtime Error):
#include<cstring>
#include<cstdio>
#include<iostream>
using namespace std;
int main()
{
    ////find函数返回类型 size_type
    string s,r;
    string::size_type position;
    //find 函数 返回jk 在s 中的下标位置
    cin>>s;
    position = s.find('C');
    if (position == s.npos)  //如果没找到，返回一个特别的标志c++中用npos表示，我这里npos取值是4294967295，
    {
        cout<<"No";
        return 0;
    }
   	position = s.find('F');
   	if (position == s.npos) {
   		cout<<"No";
   		return 0;
	   }
	cout<<"Yes";
}

Fixed submission:
def main():
    s = input()
    if s.count('C') == 0 or s.count('F') == 0:
        print('No')
        return
    l = len(s)
    s = s[s.find('C'):]
    if s.count('F') == 0:
        print('No')
    else:
        print('Yes')
main()

Buggy python submission (verdict: Runtime Error):
print<>=~/C.*F/?Yes:No,$/

Fixed submission:
def main():
    s = input()
    if s.count('C') == 0 or s.count('F') == 0:
        print('No')
        return
    l = len(s)
    s = s[s.find('C'):]
    if s.count('F') == 0:
        print('No')
    else:
        print('Yes')
main()
Buggy python submission (verdict: Time Limit Exceeded):
a, b = [int(i) for i in input().split()]
if 0 <= a and 0 >= b:
    print('Zero')
    exit()
if a > 0:
    print('Positive')
    exit()
c = b
while a != b:
    c *= a
    a += 1
print('Positive' if c > 0 else 'Zero' if c == 0 else 'Negative')


Fixed submission:
a, b = map(int, raw_input().split())
if a * b < 0:
    print 'Zero'
elif a + b < 0 and abs(a - b) & 1 == 0:
    print 'Negative'
else:
    print 'Positive'