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

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

if n<10:
  print(r+100*(10-n))
  
else:
  print(r)

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

if n<10:
  print(r+100*(10-k))
  
else:
  print(r)
Problem p02817 (python)

Fixed submission:
s,t=map(str,input().split())

print(t+s)

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

if k<=a:
  print(str(a-k)+' '+str(b))
  
else:
  print(str(0)+' '+str(min(0,b-(k-a))))
Problem p02844 (python)

Fixed submission:
n=int(input())
s=list(input())
d={}
ans=0
for x in range(n-2):
  if s[x] not in d:
    d[s[x]]=0
    for y in range(x+1,n-1):
      if (s[x]+s[y]) not in d:
        d[(s[x]+s[y])]=0
        for z in range(y+1,n):
          if (s[x]+s[y]+s[z]) not in d:
            d[(s[x]+s[y]+s[z])]=0
            ans+=1
    
print(ans)

Buggy submission (verdict: Runtime Error):
n=list(input())
ans=0
for i in range(0,10):
  for x in range(len(n)):
    if s[x]==str(i):
      for j in range(0,10):
        for y in range(len(n)):
          if s[y]==str(j):
            for k in range(0,10):
              for z in range(len(n)):
                if s[z]==str(k):
                  ans+=1
                  
print(ans)
Problem p02845 (python)

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

ans=1

d={}

ch=0

mod=10**9+7

for i in range(n):
  if a[i]==0:
    if 0 not in d:
      d[0]=1
      ans*=3
    else:
      if d[0]==1:
        d[0]=2
        ans*=2
      elif d[0]==2:
        d[0]=3
      else:
        ch+=1
        break
      
  else:
    if a[i] not in d:
      d[a[i]]=1
      if a[i]-1 not in d:
        ch+=1
        break
      else:
        ans*=d[a[i]-1]
    else:
      if d[a[i]]==1:
        d[a[i]]=2
        if a[i]-1 not in d:
          ch+=1
          break
        else:
          if d[a[i]-1]>=2:
            ans*=d[a[i]-1]-1
          else:
            ch+=1
            break
      elif d[a[i]]==2:
        d[a[i]]=3
        if a[i]-1 not in d:
          ch+=1
          break
        else:
          if d[a[i]-1]>=3:
            ans*=1
          else:
            ch+=1
            break
      else:
        ch+=1
        break
        
  ans=(ans%mod)
  
if ch==0:
  print(ans)
else:
  print(0)

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

ans=1

d={}

ch=0

mod=10**9+7

for i in range(n):
  if a[i]==0:
    if 0 not in d:
      d[0]=1
      ans*=3
    else:
      if d[0]==1:
        d[0]=2
        ans*=2
      elif:
        d[0]=3
      else:
        ch+=1
        break
      
  else:
    if a[i] not in d:
      d[a[i]]=1
      if a[i]-1 not in d:
        ch+=1
        break
      else:
        ans*=d[a[i]-1]
    else:
      if d[a[i]]==1:
        d[a[i]]=2
        if a[i]-1 not in d:
          ch+=1
          break
        else:
          if d[a[i]-1]>=2:
            ans*=d[a[i]-1]-1
          else:
            ch+=1
            break
      elif:
        d[a[i]]=3
        if a[i]-1 not in d:
          ch+=1
          break
        else:
          if d[a[i]-1]>=3:
            ans*=1
          else:
            ch+=1
            break
      else:
        ch+=1
        break
        
  ans=(ans%mod)
  
if ch==0:
  print(ans)
else:
  print(0)

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

ans=1

d={}

mod=10**9+7

for i in range(n):
  if a[i]==0:
    if 0 not in d:
      d[0]=1
      ans*=3
    else:
      if d[0]==1:
        d[0]=2
        ans*=2
      else:
        d[0]=3
      
  else:
    if a[i] not in d:
      d[a[i]]=1
      ans*=d[a[i]-1]
    else:
      if d[a[i]]==1:
        d[a[i]]=2
        ans*=d[a[i]-1]-1
      else:
        d[a[i]]=3
        ans*=1
        
  ans=(ans%mod)
  
print(ans)

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

ans=1

d={}

mod=10**9+7

for i in range(n):
  if a[i]==0:
    if 0 not in d:
      d[0]=1
      ans*=3
    else:
      if d[0]==1:
        d[0]=2
        ans*=2
      else:
        d[0]=3
      
  else:
    if a[i] not in d:
      d[a[i]]=1
      ans*=d[a[i]-1]
    else:
      if d[a[i]]==1:
        d[a[i]]=2
        ans*=d[a[i]-1]-1
      else:
        d[a[i]]=3
        ans*=1
        
  ans%=mod
  
print(ans)
Problem p02885 (python)

Fixed submission:
import sys
stdin=sys.stdin

ip=lambda: int(sp())

lp=lambda:list(map(int,stdin.readline().split()))
sp=lambda:stdin.readline().rstrip()

a,b=lp()

print(max(0,a-2*b))

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

ip=lambda: int(sp())
lp=lambda:list(map(int,stdin.readline().split()))
sp=lambda:stdin.readline().rstrip()

a,b=ip()

print(max(0,a-2*b))
Problem p02900 (python)

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

d=math.gcd(a,b)

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
  
r=make_divisors(d)
l=len(r)
ans=1
w=[True]*l
if l>=2:
  for x in range(1,l):
    if w[x]==True:
      ans+=1
      for y in range(x,l):
        if r[y]%r[x]==0:
          w[y]=False
          
print(ans)

Buggy submission (verdict: Runtime Error):
import math

d=math.gcd(a,b)

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
  
r=make_divisors(d)
l=len(r)
ans=1
w=[True]*l
if l>=2:
  for x in range(1,l):
    if w[x]==True:
      ans+=1
      for y in range(x,l):
        if r[y]%r[x]==0:
          w[y]=False
          
print(ans)
Problem p02909 (python)

Fixed submission:
n=input()
if n=='Sunny':
  print('Cloudy')
elif n=='Cloudy':
  print('Rainy')
else:
  print('Sunny')

Buggy submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
ans=[-q]*n
for i in range(q):
  a=int(input())
  ans[a]+=1
print(sum(x > -k for x in ans))
  
print('Yes' if x > -k for x in ans else 'No')

Buggy submission (verdict: Runtime Error):
n=input()
if n='Sunny':
  print('Cloudy')
elif n='Cloudy':
  print('Rainy'):
else:
  print('Sunny')
Problem p02911 (python)

Fixed submission:
n,k,q=map(int,input().split())
ans=[-q]*n
for i in range(q):
  a=int(input())
  ans[a-1]+=1
  
for i in range(n):
  print('Yes' if ans[i] > -k else 'No')

Buggy submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
ans=[-q]*n
for i in range(q):
  a=int(input())
  ans[a]+=1
  
for i in range(n):
  print('Yes' if ans[i] > -k else 'No')

Buggy submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
ans=[-q]*n
for i in range(q):
  a=int(input())
  ans[a]+=1
  
print('Yes' if x > -k for x in ans else 'No')

Buggy submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
ans=[-q]*n
for i in range(q):
  a=int(input())
  ans[a]+=1
print(sum(x > -k for x in ans))

Buggy submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
ans=[-q]*n
for i in ragne(q):
  a=int(input())
  ans[a]+=1
print(count(x > -k for x in ans))
Problem p02923 (python)

Fixed submission:
m=int(input())
h=list(map(int,input().split()))
ans1=[]
ans=0
if m>1:
  
  for x in range(m-1):
    if h[x]<h[x+1]:
      ans1.append(ans)
      ans=0
    else:
      ans+=1
      ans1.append(ans)
    
  
    
  print(max(ans1))

else:
  print(0)

Buggy submission (verdict: Runtime Error):
m=int(input())
h=list(map(int,input().split()))
ans1=[]
ans=0
for x in range(m-1):
  if h[x]<h[x+1]:
    ans1.append(ans)
    ans=0
  else:
    ans+=1
    ans1.append(ans)
    
  
    
print(max(ans1))
Problem p02936 (python)

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

n,q=map(int,input().split())
ans=[0 for _ in range(n)]
gra=[[] for _ in range(n)]
visited=[0 for _ in range(n)]

for _ in range(n-1):
  a,b=map(int,input().split())
  gra[a-1].append(b-1)
  gra[b-1].append(a-1)
  
for _ in range(q):
  p,x=map(int,input().split())
  ans[p-1]+=x
  
def dfs(st):
  temp=gra[st]
  for i in temp:
    if visited[i]==0:
      visited[i]+=1
      ans[i]+=ans[st]
      dfs(i)
      
visited[0]+=1
dfs(0)

for h in range(n):
  ans[h]=str(ans[h])
  
print(' '.join(ans))

Buggy submission (verdict: Runtime Error):
n,q=map(int,input().split())
ans=[0 for _ in range(n)]
gra=[[] for _ in range(n)]
visited=[0 for _ in range(n)]
for _ in range(n-1):
  a,b=map(int,input().split())
  gra[a-1].append(b-1)
  gra[b-1].append(a-1)
  
for _ in range(q):
  p,x=map(int,input().split())
  ans[p-1]+=x
  
def dfs(st):
  temp=gra[st]
  for i in temp:
    if visited[i]==0:
      visited[i]+=1
      ans[i]+=ans[st]
      dfs(i)
      
visited[0]+=1
dfs(0)

for h in range(n):
  ans[h]=str(ans[h])
  
print(' '.join(ans))
Problem p02952 (python)

Fixed submission:
n=int(input())
a=list(range(1,n+1))
b=0
for i in range(n):
  if len(str(a[i]))%2==1:
    b+=1
print(b)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(range(n))
b=0
for i in range(n):
  if len(a[i])%2==1:
    b+=1
print(b)
Problem p02953 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=0
c=a.reverse()
d=0
for i in range(n-1):
  if a[i]-a[i+1]==-1:
    a[i+1]=a[i+1]-1
  elif a[i]-a[i+1]<=-2:
    b+=1
  else:
    d=d
    
if b==0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=sorted(a)
c=b[0]
d=b[n-1]
if d-c==0or1
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=sorted(a)
c=b[0]
d=b[n-1]
if d-c==0or1
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(int,input().split())
b=0
for i in range(n):
  if a[i]-a[i+1]>=2:
    b+=1
if b==0:
  print("Yes")
else:
  print("No")

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

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(for i in range(n))
b=0
for i in range(n):
  if a[i]-a[i+1]>=2:
    b+=1
if b==0:
  print("Yes")
else:
  print("No")
Problem p02958 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=0
for i in range(n):
  if a[i]==i+1:
    b+=0
  else:
    b+=1
if b==0 or b==2:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
b=0
for i in range(n):
  if a[i]==i:
    b+=0
  else:
    b+=1
if b==0or2:
  print("Yes")
else:
  print("No")
Problem p02971 (python)

Fixed submission:
##C
n=int(input())
a=list(int(input()) for i in range(n))
b=sorted(a)

for i in range(n):
    if a[i]==b[-1]:
        print(b[-2])
    else:
        print(b[-1])

Buggy submission (verdict: Runtime Error):
##C
n=input().int
a=list(int(input()) for i in range(n))
b=sorted(a)

for i in range(n):
    if a[i]==b[-1]:
        print(b[-2])
    else:
        print(b[-1])

Buggy submission (verdict: Runtime Error):
##C
n=input().int
a=list(int(input()) for i in range(n))
b=sorted(a,reverse=True)

for i in range(n):
    if a[i]==b[-1]:
        print(b[-2])
    else:
        print(b[-1])

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(int(input()) for i in range(n))
x=max(a)
b=a.remove(x)
c=max(b)
if a.count(max(a))==1:
  for y in range(n):
  	if a[y]==max(a):
  		
  		print(c)
  	else:
  		print(max(a))
else:
  for i in range(n):
    print(max(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(int(input()) for i in range(n))
b=a.remove(max(a))
c=max(b)
if a.count(max(a))==1:
  for y in range(n):
  	if a[y]==max(a):
  		
  		print(c)
  	else:
  		print(max(a))
else:
  for i in range(n):
    print(max(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(int(input()) for i in range(n))
if a.count(max(a))==1:
  for y in range(n):
  	if a[y]==max(a):
  		a.remove(a[y])
  		print(max(a))
  	else:
  		print(max(a))
else:
  for i in range(n):
    print(max(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(int(input()) for i in range(n))
for y in range(n):
  if a[y]==max(a):
  	a.remove(a[y])
  	print(max(a))
  else:
  	print(max(a))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(int(input()) for i in range(n-1))
if a[i]=max(a) for i in range(n-1):
  a.remove(a[i])
  print(max[a])
else:
  print(max[a])

Buggy submission (verdict: Runtime Error):
n=int(input())
a=
a=list(int(input()) for i in range(n-1))
if a[i]=max(a) for i in range(n-1):
  a.remove(a[i])
  print(max[a])
else:
  print(max[a])

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list[int(input()) for i in range(n-1)]
if a[i]=max(a) for i in range(n-1):
  a.remove(a[i])
  print(max[a])
else:
  print(max[a])
Problem p02972 (python)

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

ans=[0 for _ in range(n+1)]
t=[]
S=0

for i in range(n):
  b=n-i
  c=(n-i)*2
  ch=0
  while c<=n:
    ch+=ans[c]
    c+=b
    
  if ch%2==0:
    if a[b-1]==1:
      ans[b]+=1
      S+=1
      t.append(str(b))
  else:
    if a[b-1]==0:
      ans[b]+=1
      S+=1
      t.append(str(b))
      

print(S)
if S>0:
  
  print(' '.join(t))

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

ans=[0 for _ in range(n+1)]
t=''
S=0

for i in range(n):
  b=n-i
  c=(n-i)*2
  ch=0
  x=a[b]
  while c<=n:
    ch+=ans[c]
    c+=b
    
  if ch%2==0:
    if a[b-1]==1:
      ans[b]+=1
      S+=1
      t=str(b)+' '
  else:
    if a[b-1]!=1:
      ans[b]+=1
      S+=1
      t=str(b)+' '
      

print(S)
if S>0:
  
  print(t)
Problem p02983 (python)

Fixed submission:
##C
l,r=map(int,input().split())
c=(r-l)
d=2018
if c>=2018:
    print(0)
else:
    for i in range(l,r):
        for k in range(l+1,r+1):
            
            if (i*k)%2019<d:
                d=(i*k)%2019
    print(d)

Buggy submission (verdict: Runtime Error):
l,r=map(int,input().split())
c=r-l
if c>=2018:
    print(0)
else:
    for i in range(l,r-1):
        for k in range(l+1,r):
            d=2018
            if (i*k)%2019<d:
                d=(i*k)&2019
    print(d)

Buggy submission (verdict: Runtime Error):
l,r=map(int,input().split())
c=r-l
if c>=2018:
    print(0)
else:
    for i in range(l,r-1):
        for k in range(l+1,n):
            d=2018
            if (i*k)%2019<d:
                d=(i*k)&2019
    print(d)

Buggy submission (verdict: Runtime Error):
l,r=map(int,input().split())
c=r-l
if c>=2018:
    print(0)
else:
    for i in range(l,r-1):
        for k in range(l+1,n):
            c=2018
            if (i*k)%2019<c:
                c=(i*k)&2019
    print(c)
Problem p02988 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
c=0
for i in range(0,n-2):
  if a[i]<a[i+1] and a[i+1]<a[i+2]:
    c+=1
  elif a[i]>a[i+1] and a[i+1]>a[i+2]:
    c+=1
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
c=0
for i in range(1,n-1):
  if a[i]<a[i+1] and a[i+1]<a[i+2]:
    c+=1
  elif a[i]>a[i+1] and a[i+1]>a[i+2]:
    c+=1
print(c)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
c=0
for i in range(1,n-1):
  if a[i]<a[i+1] and a[i+1]<a[i+2]:
    c+=1
print(c)
Problem p02993 (python)

Fixed submission:
n=input()
if any(n[i]==n[i+1] for i in range(0,3)):
    print("Bad")
else:
    print("Good")

Buggy submission (verdict: Runtime Error):
n=imput()
if n[i]==n[i+1] for i in range(0,3):
    print("Bad")
else:
    print("Good")
Problem p03000 (python)

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

ans=1
d=0

for i in a:
  d+=i
  if d>x:
    break
  ans+=1
  
print(ans)

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
a=list(map(in,input().split()))

ans=1
d=0

for i in a:
  d+=i
  if d>x:
    break
  ans+=1
  
print(ans)
Problem p03026 (python)

Fixed submission:
from collections import deque
import sys

sys.setrecursionlimit(10**7)

n=int(input())
to=[[] for _ in range(n)]
eda=[]
for _ in range(n-1):
  a,b=map(int,input().split())
  to[a-1].append(b-1)
  to[b-1].append(a-1)
  eda.append([a-1,b-1])
  
c=list(map(int,input().split()))

c.sort(reverse=True)

cd=deque(c)
poi=[0 for _ in range(n)] 
vi=[-1 for _ in range(n)]

vi[0]+=1
def dfs(now):
  vi[now]+=1
  v=cd.popleft()
  poi[now]+=v
  for i in to[now]:
    if vi[i]==-1:
      dfs(i)
  
dfs(0)

ans=0

for u in eda:
  x,y=u
  ans+=min(poi[x],poi[y])
  
print(ans)
for u in range(n):
  poi[u]=str(poi[u])
  
print(' '.join(poi))

Buggy submission (verdict: Runtime Error):
from collections import deque

n=int(input())
to=[[] for _ in range(n)]
eda=[]
for _ in range(n-1):
  a,b=map(int,input().split())
  to[a-1].append(b-1)
  to[b-1].append(a-1)
  eda.append([a-1,b-1])
  
c=list(map(int,input().split()))

c.sort(reverse=True)

cd=deque(c)
poi=[0 for _ in range(n)] 
vi=[-1 for _ in range(n)]

vi[0]+=1
def dfs(now):
  vi[now]+=1
  v=cd.popleft()
  poi[now]+=v
  for i in to[now]:
    if vi[i]==-1:
      dfs(i)
  
dfs(0)

ans=0

for u in eda:
  x,y=u
  ans+=min(poi[x],poi[y])
  
print(ans)
for u in range(n):
  poi[u]=str(poi[u])
  
print(' '.join(poi))
Problem p03032 (python)

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

a=list(map(int,input().split()))
a_reverse=list(reversed(a))
b=sorted(a)
s=sum(a)

ans=[]

for i in range(k+1):
  if i>n:
    I=i-n
    for j in range(I): 
      if j<n:
        ans1=s-b[j]
    ans.append(ans1)
  elif i==n:
    ans.append(s)
  elif i==0:
    ans.append(0)
  else:
    for h in range(i+1):
      H=i-h
      c=[]
      for x in range(h):
        c.append(a[x])
      for y in range(H):
        c.append(a_reverse[y])
        
      c.sort()
      S=sum(c)
      for g in range(1,k-i+1):
        if g<=i:
          if c[g-1]<0:
            S-=c[g-1]

      ans.append(S)
      
print(max(ans))

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

a=list(map(int,input().split()))
a_reverse=list(reversed(a))
b=sorted(a)
s=sum(a)

ans=[]

for i in range(k+1):
  if i>n:
    I=i-n
    for j in range(I): 
      ans1=s-b[j]
    ans.append(ans1)
  elif i==n:
    ans.append(s)
  elif i==0:
    ans.append(0)
  else:
    for h in range(i+1):
      H=i-h
      c=[]
      for x in range(h):
        c.append(a[x])
      for y in range(H):
        c.append(a_reverse[y])
        
      c.sort()
      S=sum(c)
      for g in range(1,k-i+1):
        if g<=i:
          if c[g-1]<0:
            S-=c[g-1]

      ans.append(S)
      
print(max(ans))

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

a=list(map(int,input().split()))
a_reverse=list(reversed(a))
b=sorted(a)
s=sum(a)

ans=[]

for i in range(k+1):
  if i>n:
    I=i-n
    for j in range(I): 
      ans1=s-[j]
    ans.append(ans1)
  elif i==n:
    ans.append(s)
  elif i==0:
    ans.append(0)
  else:
    for h in range(i+1):
      H=i-h
      c=[]
      for x in range(h):
        c.append(a[x])
      for y in range(H):
        c.append(a_reverse[y])
        
      c.sort()
      S=sum(c)
      for g in range(1,k-i+1):
        if g<=i:
          if c[g-1]<0:
            S-=c[g-1]

      ans.append(S)
      
print(max(ans))
Problem p03071 (python)

Fixed submission:
a,b=map(int,input().split())
if a==b:
  print(2*a)
else:
  print(2*max(a,b)-1)

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a==b:
  print(2*a):
else:
  print(2*max(a,b)-1)
Problem p03085 (python)

Fixed submission:
s=input()
if s=='A':
  print('T')
elif s=='T':
  print('A')
elif s=='C':
  print('G')
else:
  print('C')

Buggy submission (verdict: Runtime Error):
s=input()
if s='A':
  print('T')
elif s='T':
  print('A')
elif s='C':
  print('G')
else:
  print('C')

Buggy submission (verdict: Runtime Error):
s=input()
if s='A':
  print('T')
elif s='T':
  print('A')
elif s='C':
  print('G')
else:
  print('C')
Problem p03109 (python)

Fixed submission:
n=input()
if int(n[5]+n[6]) >=5:
  print('TBD')
else:
  print('Heisei')

Buggy submission (verdict: Runtime Error):
n=input()
if int('n[5]+n[6]') >=5:
  print('TBD'):
else:
  print('Heisei')

Buggy submission (verdict: Runtime Error):
n=input()
if int(n[5]+n[6]) >=5:
  print('TBD'):
else:
  print('Heisei')
Problem p03206 (python)

Fixed submission:
d=int(input())
print('Christmas' if d==25 else 'Christmas Eve' if d==24 else 'Christmas Eve Eve' if d==23 else 'Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
a=[]
for i in range(n):
  a.append(int(input()))
b=sorted(a)
print(b[n-1]-b[n-k])

Buggy submission (verdict: Runtime Error):
d=int(input())
print('Christmas' if d==25 else 'Christmas Eve' if d==24 else 'Christmas Eve Eve' d==23 else 'Christmas Eve Eve Eve')

Buggy submission (verdict: Runtime Error):
d=int(input())
print('Christmas' if d==25 'Christmas Eve' elif d==24 'Christmas Eve Eve' else 'Christmas Eve Eve Eve')
Problem p03238 (python)

Fixed submission:
n=int(input())

if n==1:
  print('Hello World')
else:
  a=int(input())
  b=int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=int(input())
b=int(input())
if n==1:
  print('Hello World')
else:
  print(a+b)
Problem p03288 (python)

Fixed submission:
n=int(input())
print('ABC' if n < 1200 else 'ARC' if 1200 <= n < 2800 else 'AGC')

Buggy submission (verdict: Runtime Error):
n=int(nput())
print('ABC' if n < 1200 else 'ARC' if 1200 <= n < 2800 else 'AGC')

Buggy submission (verdict: Runtime Error):
n=input()
print('ABC' if n < 1200 else 'ARC' if 1200 <= n < 2800 else 'AGC')
Problem p03293 (python)

Fixed submission:
s=list(input())
t=list(input())

S=s+s
c=0

for i in range(len(s)):
  ch=0
  for j in range(len(s)):
    if S[i+j]==t[j]:
      ch+=1
  if ch==len(s):
    c+=1

if c>0:
  print('Yes')
  
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s=input()
t=input()

s.sort()
t.sort()

if t==s:
  print('Yes')
  
else:
  print('No')

Buggy submission (verdict: Runtime Error):
s=list(input())
t=list(input())

x=len(s)

ch1=0
ch=0

for i in range(x):
  if s[i]=t[x-1-i]:
    ch+=1

for j in range(x):
  if s[j]=t[j]:
    ch1+=1
    
print('Yes') if ch==x or ch1==x else print('No')

Buggy submission (verdict: Runtime Error):
s=list(input())
t=list(input())

x=len(s)

ch1=0
ch=0

for i in range(x):
  if s[i]=t[x-1-i]:
    ch+=1

for j in range(x):
  if s[j]=t[j]:
    ch1+=1
    
print('Yes' if ch==x or ch1==x else 'No' )

Buggy submission (verdict: Runtime Error):
s=list(input())
t=list(input())

x=len(s)

ch1=0
ch=0

for i in range(x):
  if s[i]=t[x-1-i]:
    ch+=1

for j in range(x):
  if s[j]=t[j]:
    ch1+=1
    
print('Yes' if ch==x or ch1==x :'No' else)

Buggy submission (verdict: Runtime Error):
s=list(input())
t=list(input())

x=len(s)

ch1=0
ch=0

for i in range(x):
  if s[i]=t[x-1-i]:
    ch+=1

for j in range(x):
  if s[j]=t[j]:
    ch1+=1
    
print('Yes' if ch==x or ch1==x else:'No')
Problem p03360 (python)

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

x=max(a,b,c)

print((a+b+c)-x+x*(2**k))

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

x=max(a,b,c)

print((a+b+c)-x+x*(2**k))
Problem p03371 (python)

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

m=max(x,y)
ans=10**9+7
for e in range(m+1):
  ans=min(ans,2*e*c+a*max(0,x-e)+b*max(0,y-e))
  
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,c,x,y=map(int,input().split())

m=max(x,y)
ans=10**9+7
for e in range(m+1):
  ans=min(ans,2*e*c+a*max(0,x-e)+b*(0,y-e))
  
print(ans)
Problem p03377 (python)

Fixed submission:
a,b,c=map(int,input().split())
print('YES' if a <= c <= a+b else 'NO')

Buggy submission (verdict: Runtime Error):
s=input()
print('YES' if int(s[0]) <= int(s[4]) <= int(s[0])+int(s[2]) else 'NO')