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

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 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)

Buggy 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)

Buggy 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)
Problem p03813 (python)

Fixed submission:
x=int(input())
if(x < 1200):
  print("ABC")
else:
  print("ARC")

Buggy 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;
Problem p03861 (python)

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 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
Problem p03943 (python)

Fixed submission:
A=list(map(int,input().split()))
if( sum(A) == 2*max(A) ):
  print("Yes")
else:
  print( "No" )

Buggy submission (verdict: Runtime Error):
A=list(map(int,input().split()))
if( sum(A) == 2*max(A) ) print("Yes")
else print( "No" )
Problem p03962 (python)

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 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)

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

Fixed submission:
N,K=map(int,input().split())
print(K*((K-1)**(N-1)))

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

Fixed submission:
a=int(input())
b=int(input())
h=int(input())
print( int((a+b)*h/2) )

Buggy submission (verdict: Runtime Error):
a,b,h=map(int,input().split())
print( (a+b)*h/2 )
Problem p04011 (python)

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 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 )
Problem p03455 (python)

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 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")

Buggy 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")
Problem p03523 (python)

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 submission (verdict: Runtime Error):
import re
d='A?KIHA?BA?RA?$'
s=raw_input()
print['NO','YES'][re.match(d,s)!=None]

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

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

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

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

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 submission (verdict: Runtime Error):
a,b,c = input().split()
if a[-1]==b[0] and b[-1]==c[0]:
  print("YES")
else:
  print("NO")
Problem p03861 (python)

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 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;//求过！！！！！！！！！！！ 
}

Buggy 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)
Problem p03863 (python)

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 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')
Problem p03889 (python)

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 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;
}
Problem p03957 (python)

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 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";
	
}

Buggy 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;
}

Buggy 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')

Buggy 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')

Buggy 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')

Buggy 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()
Problem p03997 (python)

Fixed submission:
print((int(input()) + int(input())) * int(input()) // 2)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
print((a+b)*h/2)
Problem p04030 (python)

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 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('')
Problem p03697 (python)

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

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

Buggy 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]))
Problem p03759 (python)

Fixed submission:
s=input().split()
if(int(s[0])-int(s[1])==int(s[1])-int(s[2])):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
l=list(str(input()).split(" "))
if l[0]-l[1]==l[1]-l[2]:
    print("YES")
else:
    print("NO")
Problem p03861 (python)

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 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;
}
Problem p03889 (python)

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 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;
}
Problem p03957 (python)

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 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";
}

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

Fixed submission:
n, m = map(int, input().split())
print((n-1) * (m-1))

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

b=input()

print (a-1)*(b-1)
Problem p03889 (python)

Fixed submission:
s=input()
d={'b':'d','d':'b','p':'q','q':'p'}
if len(s)%2!=0:
    print("No")
else:
    flag=True
    for idx in range(len(s)//2):
        if d[s[idx]]!=s[-idx-1]:
            print("No")
            flag=False
            break
    if flag:
        print("Yes")

Buggy submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;
string 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;
}
Problem p03957 (python)

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

Buggy submission (verdict: Runtime Error):
s = input()
c = False
f = False
for i in s:
    if (i=='C') c = True
    if (i=='F') f = True
    if (c==True and f==True) print("Yes")
if (not(c==True and f==True)) print("No")

Buggy submission (verdict: Runtime Error):
// luogu-judger-enable-o2
a = input()
if a.find("C")!=-1 and a.find("F")!=-1 and a.find("C")<a.find("F"):
    print("Yes")
else:
    print("No")

Buggy 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')

Buggy submission (verdict: Runtime Error):
#AT2084
s = list(input())
a = []
for i in s:
    if i == 'C' or i == 'F':
        a.append(i)
if a[0] == 'C' and a[1] == 'F' and len(a) == 2:
    print('Yes')
else:
    print('No')

Buggy 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')

Buggy submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;
int main(){
	char c[65000];
	int i,j=0,l;
	cin>>c;
	l=strlen(c);
	for(i=0;i<l;i++){
		if(c[i]=='C'){
			j=1;
		}
		if(c[i]=='F'){
			if(j==1){
				cout<<"YES";
				return 0;
			}
		} 
	}
	cout<<"NO";
	return 0;
}
Problem p02687 (python)

Fixed submission:
S = str(input())
if S == 'ABC':
  print('ARC')
else:
  print('ABC')

Buggy submission (verdict: Runtime Error):
S = str(input())
if S == 'ABC':
  return 'ARC'
else:
  return 'ABC'

Buggy submission (verdict: Runtime Error):
if S == 'ABC':
  return 'ARC'
else:
  return 'ABC'

Buggy submission (verdict: Runtime Error):
if S = 'ABC':
  return 'ARC'
else:
  return 'ABC'
Problem p03035 (python)

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

if a >= 13:
    print(int(b))
elif a <= 12 and a >= 6:
    print(int(b/2))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n ,m = map(int, input().split())
result = set()
first = True
for i in range(m):
    l, r = map(int, input().split())
    tmp = set()
    for i in range(l, r + 1):
        tmp.add(i)
    if first:
        result = tmp
        # print("tmp {}".format(tmp))
        first = False
    else:
        result = result.intersection(tmp)
        # print("result {} tmp {}".format(result, tmp))

print(len(result))
Problem p03037 (python)

Fixed submission:
n ,m = map(int, input().split())
L = []
R = []
for i in range(m):
    l, r = map(int, input().split())
    L.append(l)
    R.append(r)
if max(L) <= min(R):
    print(min(R) - max(L) + 1)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n ,m = map(int, input().split())
result = set()
first = True
for i in range(m):
    l, r = map(int, input().split())
    tmp = set()
    for i in range(l, r + 1):
        tmp.add(i)
    if first:
        result = tmp
        # print("tmp {}".format(tmp))
        first = False
    else:
        result = result.intersection(tmp)
        # print("result {} tmp {}".format(result, tmp))

print(len(result))n ,m = map(int, input().split())
result = set()
first = True
for i in range(m):
    l, r = map(int, input().split())
    tmp = set()
    for i in range(l, r + 1):
        tmp.add(i)
    if first:
        result = tmp
        first = False
    else:
        result = result.intersection(tmp)
print(len(result))
Problem p03047 (python)

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

print(n - k + 1)

Buggy submission (verdict: Runtime Error):
n=int(input())
string_list=[input() for i in range(n)]
new_list = {}
target_chr = "AB"
count = 0
left_b_count = 0
right_a_count = 0
none_count = 0
for string in string_list:
    if string.count(target_chr) > 0 and (string[0] != "B" or string[-1] != "A"):
        count += string.count(target_chr)
        none_count += 1
        continue
    if string[0] == "B":
        left_b_count +=1
        count += string.count(target_chr)
        none_count += 1
        continue
    if string[-1] == "A":
        right_a_count += 1
        count += string.count(target_chr)
        none_count += 1
        continue

if left_b_count > right_a_count:
    if none_count == n:
        print(count + right_a_count)
    else:
        print(count + right_a_count + 1)
else:
    print(count + left_b_count)

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

print(n - k + 1)
Problem p03061 (python)

Fixed submission:
from fractions import gcd

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

L = [0]
for i in range(n):
    L.append(gcd(L[i], A[i]))

R = [0]
for i in range(n-1, -1, -1):
    R.append(gcd(R[(n-1)-i],A[i]))
R.reverse()

M = []

for i in range(n):
    M.append(gcd(L[i],R[i+1]))
    
print(max(M))

Buggy submission (verdict: Runtime Error):
import math

n = int(input())
A = list(map(int, input().split()))
M = []
for i in range(n):
    target_index = i
    if target_index == 0:
        target = A[1]
    else:
        target = A[0]
    for index, number in enumerate(A):
        if index == target_index:
            continue
        target = math.gcd(target, number)
    M.append(target)
print(max(M))
Problem p03085 (python)

Fixed submission:
# -*- coding: utf-8 -*-
input_val = str(input())

if input_val == "A":
  print("T")
elif input_val == "T":
  print("A")
elif input_val == "G":
  print("C")
elif input_val == "C":
  print("G")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
NQ = input().split(" ")
S = str(input())
N = int(NQ[0])
Q = int(NQ[1])
result_list = []
l = 0
r = 0
lr = ""
for i in range(0, Q):
  lr = input().split(" ")
  l = int(lr[0])
  r = int(lr[1])
  subStr_S = str(S[l-1:r]).replace("G", "").replace("T", "")
  result_list.append(subStr_S.count("AC"))

[print(result) for result in result_list]
Problem p03324 (python)

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

divide = []

if d == 0:
    for i in range(1, 100):
        divide.append(i)    
    divide.append(101)
elif d == 1:
    for i in range(100, 10000, 100):
        divide.append(i)
    divide.append(10100)
    
else:
    for i in range(10000, 1000000, 10000):
        divide.append(i)
    divide.append(1010000)
print(divide[n - 1])

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

divide = []

if d == 0:
    for i in range(1, 101):
        divide.append(i)
elif d == 1:
    for i in range(100, 10000, 100):
        divide.append(i)
else:
    for i in range(10000, 100000000, 10000):
        divide.append(i)

print(divide[n - 1])
Problem p04012 (python)

Fixed submission:
w = str(input())

w_list = list(w)

str_list = [chr(i) for i in range(97, 97+26)]

count = 0

for char in str_list:
	if w_list.count(char)%2 == 0:
		count +=1
	else:
		print("No")
		break
	if count == 26:
		print("Yes")

Buggy submission (verdict: Runtime Error):
w = str(input())

w_list = list(w)

str_list = [chr(i) for i in range(97, 97+26)]

count = 0

for i in str_list:
	if w_list.count(str_list[i])%2 == 0:
		count +=1
	else:
		print("NO")
		break

if count == 26:
	print("YES")
Problem p04044 (python)

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

char_list = []

for dummy in range(N):
    S = str(input())
    char_list.append(S)

char_list = sorted(char_list)
answer = ""
for char in char_list:
    answer += char

print(answer)

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())

char_list= []
for dummy in range(N):
    char_list.append(str(input())

answer = ""
for char in sorted(char_list):
    answer += char

print(answer)
Problem p02687 (python)

Fixed submission:
contest = input()

if contest == "ABC":
  print("ARC")
else:
  print("ABC")

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

if contest = "ABC":
  print("ARC")
else:
  print("ABC")
Problem p02687 (python)

Fixed submission:
S = input()

if(S == "ABC"):
	print("ARC")
elif(S == "ARC"):
	print("ABC")

Buggy submission (verdict: Runtime Error):
#S = input()

if(S == "ABC"):
	print("ARC")
elif(S == "ARC"):
	print("ABC")

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

if(S == ABC):
	print("ARC")
elif(S == ARC):
	print("ABC")

Buggy submission (verdict: Runtime Error):
if(S == ABC):
	print("ARC")
elif(S == ARC):
	print("ABC")

Buggy submission (verdict: Runtime Error):
if(S == ABC){
	print("ARC")
}
else if(S == ARC){
	print("ABC")
}

Buggy submission (verdict: Runtime Error):
if(S == ABC){
	print("ARC")
}
else if(S == ARC){
	print("ABC");
}
Problem p03260 (python)

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

d = a * b
if d % 2 == 0:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
a, b = int(input())

d = a * b
if d % 2 == 0:
    print('Yes')
else:
    print('No')
Problem p03385 (python)

Fixed submission:
S = input()

A = S.count('a')
B = S.count('b')
C = S.count('c')

if (A == 1) and (B == 1) and (C == 1):
    print('Yes')
else:
    print('No')

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

A = S.count('a')
B = S.count('b')
C = S.count('c')

if (A == 1) and (B == 1) and (c == 1):
    print('Yes')
else:
    print('No')