Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=[]
A=0

for i in range(N):
  d=''.join(sorted(str(input())))
  if d in L:
    A+=L.count(d)
  L.append(d)

print(A)

Fixed submission:
n = int(input())
s = [''.join(sorted(input())) for _ in range(n)]
d = {}
ans = 0
for string in s:
    if string in d:
        ans += d[string]
        d[string]+=1
    else:
        d[string]=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
L=[]
A=0

for i in range(N):
  d=sorted(str(input()))
  if d in L:
    A+=L.count(d)
  L.append(d)

print(A)

Fixed submission:
n = int(input())
s = [''.join(sorted(input())) for _ in range(n)]
d = {}
ans = 0
for string in s:
    if string in d:
        ans += d[string]
        d[string]+=1
    else:
        d[string]=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def Stair(x):
  y=1
  for z in range(1,x+1):
    y*=z
  return y
N=int(input())
L=[]

for i in range(N):
  L.append(sorted(str(input())))

K=[]
C=[]

for j in range(N):
  if L[j] not in K:
    K.append(L[j])
    C.append(1)
  else:
    C[K.index(L[j])]+=1

A=0
for k in range(len(K)):
  if C[k]>1:
    if C[k]==2:
      A+=1
    else:
      A+=Stair(C[k])/(2*Stair(C[k]-2))

print(int(A))

Fixed submission:
n = int(input())
s = [''.join(sorted(input())) for _ in range(n)]
d = {}
ans = 0
for string in s:
    if string in d:
        ans += d[string]
        d[string]+=1
    else:
        d[string]=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def Stair(x):
  y=1
  for z in range(1,x+1):
    y*=z
  return y
N=int(input())
L=[]

for i in range(N):
  L.append(sorted(str(input())))

K=[]
C=[]

for j in range(N):
  if L[j] not in K:
    K.append(L[j])
    C.append(1)
  else:
    C[K.index(L[j])]+=1

A=0
for k in range(len(K)):
  if C[k]>1:
    if C[k]==2:
      A+=1
    else:
      A+=Stair(C[k])/(2*Stair(C[k]-2))

print(int(A))

Fixed submission:
n = int(input())
s = [''.join(sorted(input())) for _ in range(n)]
d = {}
ans = 0
for string in s:
    if string in d:
        ans += d[string]
        d[string]+=1
    else:
        d[string]=1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math
N=int(input())
L=[]

for i in range(N):
  L.append(sorted(str(input())))

K=[]
C=[]

for j in range(N):
  if L[j] not in K:
    K.append(L[j])
    C.append(1)
  else:
    C[K.index(L[j])]+=1

A=0
for k in range(len(K)):
  if C[k]>1:
    if C[k]==2:
      A+=1
    else:
      A+=math.factorial(C[k])/(2*math.factorial(C[k]-2))

print(int(A))

Fixed submission:
n = int(input())
s = [''.join(sorted(input())) for _ in range(n)]
d = {}
ans = 0
for string in s:
    if string in d:
        ans += d[string]
        d[string]+=1
    else:
        d[string]=1
print(ans)
Buggy python submission (verdict: Runtime Error):
L,R=map(int, input().split())
if R//2019-L//2019>0:
  print(((2019//L*2019)*((2019//L*2019)+1))%2019)
else:
  print((L*(L+1))%2019)

Fixed submission:
L, R = map(int, input().split())
if R-L >= 2018:
    print(0)
else:
    ans = 2019
    for i in range(L, R):
        for j in range(i + 1, R + 1):
            ans = min(ans, i*j % 2019)
    
    print(ans)
Buggy python submission (verdict: Runtime Error):
S=str(input())
L=[]
for S in range(4):
  L.append(S)
L.sort()

print('Yes' if L[0]==S[1] and S[2]==S[3] else 'No')

Fixed submission:
S=str(input())
a=0
for i in S:
  if S.count(i)==2:
    a+=1
    
print('Yes' if a==4 else 'No')
Buggy python submission (verdict: Runtime Error):
S=str(input())

if 0<int(S[0]+S[1])<=12 and 0<int(S[2]+S[3])<=12:
  print('AMBIGUOUS');exit()
elif S[0]+S[1]=='00':
  print('NA');exit()
elif (S[0]+S[1]<=12 or S[2]+S[3]=='00') and int(S[0]+S[1])>12:
  print('YYMM');exit()
else:
  print('MMYY');exit()

Fixed submission:
S=str(input())
A=int(S[0]+S[1])
B=int(S[2]+S[3])

if 0<A<=12 and 0<B<=12:
  print('AMBIGUOUS');exit()
elif (A>12 or A==0) and 0<B<=12:
  print('YYMM');exit()
elif 0<A<=12 and (B>12 or B==0):
  print('MMYY');exit()
else:
  print('NA');exit()

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

if 0<int(S[0]+S[1])<=12 and 0<int(S[2]+S[3])<=12:
  print('AMBIGUOUS');exit()
elif S[0]+S[1]=='00':
  print('NA');exit()
elif  (S[0]+S[1]<=12 and S[2]+S[3]=='00') or int(S[0]+S[1])>12:
  print('YYMM');exit()
else:
  print('MMYY');exit()

Fixed submission:
S=str(input())
A=int(S[0]+S[1])
B=int(S[2]+S[3])

if 0<A<=12 and 0<B<=12:
  print('AMBIGUOUS');exit()
elif (A>12 or A==0) and 0<B<=12:
  print('YYMM');exit()
elif 0<A<=12 and (B>12 or B==0):
  print('MMYY');exit()
else:
  print('NA');exit()
Buggy python submission (verdict: Time Limit Exceeded):
R,G,B,n=map(int, input().split())
cnt=0
for r in range(n+1):
    for g in range(n+1):
        b=(n-r*R-g*G)/B
        #print(r,g,b)
        if b>=0:
            if b==int(b):
                cnt+=1

print(cnt)

Fixed submission:
R,G,B,n=map(int, input().split())
cnt=0
for r in range(n+1):
    for g in range(n+1):
        b=(n-r*R-g*G)/B
        #print(r,g,b)
        if b>=0:
            if b==int(b):
                cnt+=1

print(cnt)
Buggy python submission (verdict: Runtime Error):
A,B,T=map(int, float(input()))
print(int((T+0.5)//A*B))

Fixed submission:
A,B,T=(map(float, input().split())) 
print(int((T+0.5)//A*B))

Buggy python submission (verdict: Runtime Error):
A,B,T=map(int, float(input()))
print((T+0.5)//A*B)

Fixed submission:
A,B,T=(map(float, input().split())) 
print(int((T+0.5)//A*B))
Buggy python submission (verdict: Runtime Error):
N=input()
S=input()
K=int(input())
W=S[K-1]
for i in range(N):
  if S[i]!=W:
    S=S.replace(S[i],'*')
print(S)

Fixed submission:
N=int(input())
S=str(input())
K=int(input())
W=S[K-1]
for i in range(N):
  if S[i]!=W:
    S=S.replace(S[i],'*')
print(S)

Buggy python submission (verdict: Runtime Error):
N=input()
S=input()
K=int(input())
W=S[K-1]
for i in range(N):
  print(i)
  if S[i]!=W:
    S=S.replace(S[i],'*')
print(S)

Fixed submission:
N=int(input())
S=str(input())
K=int(input())
W=S[K-1]
for i in range(N):
  if S[i]!=W:
    S=S.replace(S[i],'*')
print(S)
Buggy python submission (verdict: Runtime Error):
N=input()
H=list(map(int, input().split()))
Hi=0;a=0
for i in range(N):
  if int(H[i])>Hi:
    Hi=int(H[i])
    a+=1
  elif int(H[i])==Hi:
    a+=1
print(a)

Fixed submission:
N=int(input())
H=list(map(int, input().split()))
Hi=0;a=0
for i in range(N):
  if int(H[i])>Hi:
    Hi=int(H[i])
    a+=1
  elif int(H[i])==Hi:
    a+=1
print(a)

Buggy python submission (verdict: Runtime Error):
n=input()
H=list(map(int, input().split()))
Hi=0;a=0
for i in range(N):
  if int(H[i])>Hi:
    Hi=int(H[i])
    a+=1
  elif int(H[i])==Hi:
    a+=1
print(a)

Fixed submission:
N=int(input())
H=list(map(int, input().split()))
Hi=0;a=0
for i in range(N):
  if int(H[i])>Hi:
    Hi=int(H[i])
    a+=1
  elif int(H[i])==Hi:
    a+=1
print(a)

Buggy python submission (verdict: Runtime Error):
n=input()
H=list(map(int, input().split()))
Hi=0;a=0
for i in range(N):
  if H[i]>Hi:
    Hi=H[i]
    a+=1
  elif H[i]=Hi:
    a+=1
print(a)

Fixed submission:
N=int(input())
H=list(map(int, input().split()))
Hi=0;a=0
for i in range(N):
  if int(H[i])>Hi:
    Hi=int(H[i])
    a+=1
  elif int(H[i])==Hi:
    a+=1
print(a)
Buggy python submission (verdict: Runtime Error):
import math
a=int(input());b=int(input());c=int(input());d=int(input());e=int(input())

N=math.ceil(a/10)*10+math.ceil(b/10)*10+math.ceil(c/10)*10+math.ceil(d/10)*10+math.ceil(e/10)*10
X=[a%10,b%10,c%10,d%10,e%10]
X.remove([i for i, x in enumerate(X) if x == 0])
if a==b==c==d==e:
  print(N-min(X))
else:
  print(N-(10-min(X)))

Fixed submission:
import math
a=int(input());b=int(input());c=int(input());d=int(input());e=int(input())

N=math.ceil(a/10)*10+math.ceil(b/10)*10+math.ceil(c/10)*10+math.ceil(d/10)*10+math.ceil(e/10)*10
X=[a%10,b%10,c%10,d%10,e%10]
n=0
while(n!=5):
  if X[n]==0:
    X[n]=10
  n+=1

else:
  print(N-(10-min(X)))

Buggy python submission (verdict: Runtime Error):
a,b,c,d,e=int(input())
print(a)

Fixed submission:
import math
a=int(input());b=int(input());c=int(input());d=int(input());e=int(input())

N=math.ceil(a/10)*10+math.ceil(b/10)*10+math.ceil(c/10)*10+math.ceil(d/10)*10+math.ceil(e/10)*10
X=[a%10,b%10,c%10,d%10,e%10]
n=0
while(n!=5):
  if X[n]==0:
    X[n]=10
  n+=1

else:
  print(N-(10-min(X)))

Buggy python submission (verdict: Runtime Error):
a,b,c,d,e=int(input())

Fixed submission:
import math
a=int(input());b=int(input());c=int(input());d=int(input());e=int(input())

N=math.ceil(a/10)*10+math.ceil(b/10)*10+math.ceil(c/10)*10+math.ceil(d/10)*10+math.ceil(e/10)*10
X=[a%10,b%10,c%10,d%10,e%10]
n=0
while(n!=5):
  if X[n]==0:
    X[n]=10
  n+=1

else:
  print(N-(10-min(X)))
Buggy python submission (verdict: Runtime Error):
n=input();a=input();b=input();c=input();d=input();e=input()
turn=1
turn+=n//a+1
if n%a==0 and n!=a:
  A=n/a
elif n==a:
  A=n
else:
  A=n%a
turn+=A//b+1
if A%b==0 and A!=b:
  B=A/b
elif A==b:
  B=A
else:
  B=A%b
turn+=B//c+1
if B%c==0 and B!=c:
  C=B/c
elif B==c:
  C=B
else:
  C=B%c
turn+=C//d+1
if C%d==0 and C!=d:
  D=C/d
elif C==d:
  D=C
else:
  D=C%d
turn+=D//e+1
print(turn)

Fixed submission:
N = int(input())
cnt = int()
A=[]
for i in range(5):
    A.append(int(input()))
A.sort()
print(-(-N//min(A))+4)

Buggy python submission (verdict: Runtime Error):
n=input();a=input();b=input();c=input();d=input();e=input()
turn=1
turn+=n//a+1
if n%a==0 and n!=a:
  A=n/a
elif n==a:
  A=n
else:
  A=n%a
turn+=A//b+1
if A%b==0 and n!=b:
  B=A/b
elif A==b:
  B=A
else:
  B=A%b
turn+=B//c+1
if B%c==0 and n!=c:
  C=B/c
elif B==c:
  C=B
else:
  C=B%c
turn+=C//d+1
if C%d==0 and n!=d:
  D=C/d
elif C==d:
  D=C
else:
  D=C%d
turn+=D//e+1
print(turn)

Fixed submission:
N = int(input())
cnt = int()
A=[]
for i in range(5):
    A.append(int(input()))
A.sort()
print(-(-N//min(A))+4)

Buggy python submission (verdict: Runtime Error):
n=input();a=input();b=input();c=input();d=input();e=input()
turn=1
turn+=n//a+1
turn+=n%a//b+1
turn+=n%a%b//c+1
turn+=n%a%b%c//d+1
turn+=n%a%b%c%d//e+1
print(turn)

Fixed submission:
N = int(input())
cnt = int()
A=[]
for i in range(5):
    A.append(int(input()))
A.sort()
print(-(-N//min(A))+4)

Buggy python submission (verdict: Runtime Error):
N,A,B,C,D,E=input().split()

Fixed submission:
N = int(input())
cnt = int()
A=[]
for i in range(5):
    A.append(int(input()))
A.sort()
print(-(-N//min(A))+4)
Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int, input().split())
S = str(input())
for i in range(Q):
    l, r = map(int, input().split())
    cnt = int()
    tmp = S[l-1:r]
    # print(tmp)
    for j in range(r-l):
        if tmp[j:j+2] == 'AC':
            cnt += 1

    print(cnt)


Fixed submission:
N, Q = map(int, input().split())
S = str(input())
L = [0]  # ruisekiwa
for i in range(1, len(S)):
    if S[i-1:i+1] == 'AC':
        L.append(L[i-1]+1)
    else:
        L.append(L[i-1])

for i in range(Q):
    l, r = map(int, input().split())
    print(L[r-1]-L[l-1])
Buggy python submission (verdict: Runtime Error):
print((H-h)*(W-w))

Fixed submission:
H,W=input().split()
h,w=input().split()

x=int(H)-int(h)
y=int(W)-int(w)
print(x*y)
Buggy python submission (verdict: Runtime Error):
N,M,C=map(int, input().split())
B=list(map(int, input().split()))
A=[list(map(int, input().split())) for n in range(N)]

def Sof(a):
  d=C
  for m in range(M):
    d+=a[m]*b[m]
  return d > 0

co=0
for i in range(N):
  if(Sof(A[i])):
    co+=1

print(co)

Fixed submission:
N,M,C=map(int, input().split())
B=list(map(int, input().split()))
A=[list(map(int, input().split())) for n in range(N)]

def Sof(a):
  d=C
  for m in range(M):
    d+=a[m]*B[m]
  return d > 0

co=0
for i in range(N):
  if(Sof(A[i])):
    co+=1

print(co)
Buggy python submission (verdict: Time Limit Exceeded):
def process():
    global S
    global cnt
    p = 0
    for i in range(len(S)-1):
        if S[i:i+2] == '01' or S[i:i+2] == '10':
            S=S[:i]+S[i+2:]
            p+=2
            
    cnt += p
    if p == 0:
        print(cnt)
    else:
        process()

S = str(input())
cnt = int()
process()


Fixed submission:
from collections import Counter
S = input()
l = list()
for i in S:
    l.append(i)
c = Counter(l)
print(min(c['0'], c['1'])*2)
Buggy python submission (verdict: Runtime Error):
N=int(input())
ans=0

for i in range(N):
  x,u=input().split()
  if u=='BTC':
    ans+=x*380000
  else:
    ans+=x

print(ans)

  
  

Fixed submission:
N=int(input())
ans=0

for i in range(N):
  x,u=input().split()
  if u=='BTC':
    ans+=float(x)*380000
  else:
    ans+=int(x)

print(ans)
Buggy python submission (verdict: Runtime Error):
a,b=input()
if b%a==0:
  print(a+b)
else:
  print(b-a)

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

Buggy python submission (verdict: Runtime Error):
a,b=input().split()
if b%a==0:
  print(a+b)
else:
  print(b-a)

Fixed submission:
a,b=map(int, input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)
Buggy python submission (verdict: Runtime Error):
N,M=map(int, input().split())
List=[0]*M

for i in range(N):
  K=input().split()
  for k in range(K):
    List[int(k[K])-1]+=1
    
print(List.count(N))

Fixed submission:
N,M = map(int,input().split())
list_a = [0]*M
for i in range(N):
    k = input().split()
    for K in range(1,int(k[0])+1):
        list_a[int(k[K])-1] += 1
 
print(list_a.count(N))
Buggy python submission (verdict: Runtime Error):
S=str(input())
for i in range(len(S)-3):
  a=max(int(S[i]+S[i+1]+S[i+2]),a)
  
print(abs(753-a))

Fixed submission:
S=str(input())
a=99999
for i in range(len(S)-2):
  a=min(abs(753-int(S[i]+S[i+1]+S[i+2])),a)
  
print(a)
Buggy python submission (verdict: Runtime Error):
N=int(input())
if N=1:
  print('Hello World')
else:
  A=int(input())
  B=int(input())
  print(A+B)

Fixed submission:
N=int(input())
if N==1:
  print('Hello World')
else:
  A=int(input())
  B=int(input())
  print(A+B)
Buggy python submission (verdict: Runtime Error):
N=int(input())

A=''
for i in range(3):
  if N[i]==1:
    A=A+'9'
  else:
    A=A+'1'

print(int(A))

Fixed submission:
N=str(input())

A=''
for i in range(3):
  if N[i]=='9':
    A=A+'1'
  else:
    A=A+'9'

print(int(A))
Buggy python submission (verdict: Runtime Error):
from math import gcd
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

N, X=map(int, input().split())
x=list(map(int, input().split()))
y=list()

for i in x:
    y.append(abs(X-i))

#print(y)
print(gcd_list(y))

Fixed submission:
from fractions import gcd
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

N, X=map(int, input().split())
x=list(map(int, input().split()))
y=list()

for i in x:
    y.append(abs(X-i))

#print(y)
print(gcd_list(y))
Buggy python submission (verdict: Runtime Error):
N,i=map(int, input().split())
print(L-i+1)

Fixed submission:
N,i=map(int, input().split())
print(N-i+1)
Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
print(K*bool(N%K!==0)-N%K)

Fixed submission:
N,K=map(int,input().split())
print(0 if N%K==0 else 1)
Buggy python submission (verdict: Runtime Error):
L=list(map(int, input().split()))
X=sorted([abs(L[3]-L[1]),abs(L[1]-L[2]),abs(L[2]-L[3])])
print(X[0]+X[1])

Fixed submission:
L=list(map(int, input().split()))
X=sorted([abs(L[2]-L[0]),abs(L[0]-L[1]),abs(L[1]-L[2])])
print(X[0]+X[1])
Buggy python submission (verdict: Runtime Error):
a,b,c,d=input().split()
if abs(a-c)<=d:
  print('Yes')
elif abs(a-b)<=d and abs(b-c)<=d:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c,d=map(int, input().split())
if abs(a-c)<=d:
  print('Yes')
elif abs(a-b)<=d and abs(b-c)<=d:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
a,b,c,d=input().split()
if abs(a-b)<=d and abs(b-c)<=d:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c,d=map(int, input().split())
if abs(a-c)<=d:
  print('Yes')
elif abs(a-b)<=d and abs(b-c)<=d:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
X=input();A=input();B=input()
print(X-A-(X-A)//B)

Fixed submission:
X=int(input());A=int(input());B=int(input())
print(X-A-B*((X-A)//B))
Buggy python submission (verdict: Runtime Error):
N=int(input())
S={}
for i in range(N):
  S.add(int(input()))
  
print(len(S))

Fixed submission:
N=int(input())
S=set()
for i in range(N):
  S.add(int(input()))
  
print(len(S))
Buggy python submission (verdict: Runtime Error):
a,b=map(int, input().split())
print(math.ceil((a+B)/2))

Fixed submission:
import math
a,b=map(int, input().split())
print(math.ceil((a+b)/2))
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
a = Counter(list(map(int, input().split())))
cnt = 0
for i in range(len(a)):
    k,v=a.most_common()[i][0],a.most_common()[i][1]
    if v-k < 0:
        cnt += v
    else:
        cnt += v-k
print(cnt)


Fixed submission:
from collections import Counter
n = int(input())
a = Counter(list(map(int, input().split())))
cnt = 0
for k, v in Counter(a).items():
    if k > v:
        cnt += v
    else:
        cnt += (v-k)
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n = int(input())
a = Counter(list(map(int, input().split())))
cnt = 0
for i in range(len(a)):
    if a.most_common()[i][1]-a.most_common()[i][0] < 0:
        cnt += a.most_common()[i][1]
    else:
        cnt += a.most_common()[i][1]-a.most_common()[i][0]
print(cnt)


Fixed submission:
from collections import Counter
n = int(input())
a = Counter(list(map(int, input().split())))
cnt = 0
for k, v in Counter(a).items():
    if k > v:
        cnt += v
    else:
        cnt += (v-k)
print(cnt)
Buggy python submission (verdict: Runtime Error):
N=input();A=input()
print(N*N-A)

Fixed submission:
N=int(input());A=int(input())
print(N*N-A)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
A = list(map(str, input().split()))
B = list()
cycle = n % 2
for a in A:
    if cycle % 2 == 1:
        B.insert(0, a)
    else:
        B.append(a)
    cycle += 1
print(' '.join(B))


Fixed submission:
from collections import deque
n = int(input())
A = deque(map(str, input().split()))
B = deque()
cycle = n % 2
for a in A:
    if cycle % 2 == 1:
        B.appendleft(a)
    else:
        B.append(a)
    cycle += 1
print(' '.join(B))
Buggy python submission (verdict: Runtime Error):
A,B,C=int(input().split())
if A<=C and B>C:
  print('Yes')
else:
  print('No')

Fixed submission:
A,B,C=map(int,input().split())
if A<=C and C<=B:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
A,B,C=int(input().split())
if A=<C and B=>C:
  print('YES')
else:
  print('NO')


Fixed submission:
A,B,C=map(int,input().split())
if A<=C and C<=B:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
A,B,C=int(input().split())
if A=<C and B=>C:
  print('YES')
else:
  print('NO')


Fixed submission:
A,B,C=map(int,input().split())
if A<=C and C<=B:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
A,B,C=int(input().split())
if A<=C and B>=C:
  print('YES')
else:
  print('NO')


Fixed submission:
A,B,C=map(int,input().split())
if A<=C and C<=B:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
a,b=map(int, input().split())

if b=='H':
  if a=='H':
    print('H')
  else:
    print('D')
else:
  if a=='H':
    print('D')
  else:
    print('H')

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

if b=='H':
  if a=='H':
    print('H')
  else:
    print('D')
else:
  if a=='H':
    print('D')
  else:
    print('H')

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

if b=='H':
  if a=='H':
    print('H')
  else:
    print('D')
else:
  if a=='H':
    print('D')
  else:
    print('H')

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

if b=='H':
  if a=='H':
    print('H')
  else:
    print('D')
else:
  if a=='H':
    print('D')
  else:
    print('H')

Buggy python submission (verdict: Runtime Error):
a,b=map(int, input().split())
if d=='H':
  if a=='H':
    print('H')
  else:
    print('D')
else:
  if a=='H':
    print('D')
  else:
    print('H')

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

if b=='H':
  if a=='H':
    print('H')
  else:
    print('D')
else:
  if a=='H':
    print('D')
  else:
    print('H')
Buggy python submission (verdict: Runtime Error):
print(input()-(input()//15)*200)

Fixed submission:
x=int(input())*800
print(x-x//12000*200)

Buggy python submission (verdict: Runtime Error):
print(input()-input()//15*200)

Fixed submission:
x=int(input())*800
print(x-x//12000*200)
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A==1 or B==1:
  if A==B:
    print('Draw')
  elif A=1:
    print('Alice')
  else:
    print('Bob')
elif A>B:
  print('Alice')
elif A<B:
  print('Bob')
else:
  print('Draw')

Fixed submission:
A,B=map(int,input().split())
if A==1 or B==1:
  if A==B:
    print('Draw')
  elif A==1:
    print('Alice')
  else:
    print('Bob')
elif A>B:
  print('Alice')
elif A<B:
  print('Bob')
else:
  print('Draw')
Buggy python submission (verdict: Runtime Error):
if input()<=1200:
  print('ABC')
else:
  print('ARC')

Fixed submission:
if int(input())<1200:
  print('ABC')
else:
  print('ARC')
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(str, input().split())
if a*b>=c*d:
  print(a*b)
else:
  print(c*d)

Fixed submission:
a,b,c,d=map(int, input().split())
print(a*b*int(a*b>=c*d)+c*d*int(a*b<c*d))

Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(str, input().split())
print(a*b*int(a*b>=c*d)+c*d*int(a*b<c*d))

Fixed submission:
a,b,c,d=map(int, input().split())
print(a*b*int(a*b>=c*d)+c*d*int(a*b<c*d))
Buggy python submission (verdict: Runtime Error):
a=int(input());b=str(input());c=int(input())

if b=='+':
  print(a+c)
else:
  print(a-c)
  

Fixed submission:
a,b,c=input().split(' ')

if b=='+':
  print(int(a)+int(c))
else:
  print(int(a)-int(c))

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

if b=='+':
  print(a+c)
else:
  print(a-c)
  

Fixed submission:
a,b,c=input().split(' ')

if b=='+':
  print(int(a)+int(c))
else:
  print(int(a)-int(c))

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

if b=='+':
  print(a+c)
else:
  print(a-c)
  

Fixed submission:
a,b,c=input().split(' ')

if b=='+':
  print(int(a)+int(c))
else:
  print(int(a)-int(c))

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

if c=='+':
  print(a+c)
else:
  print(a-c)
  

Fixed submission:
a,b,c=input().split(' ')

if b=='+':
  print(int(a)+int(c))
else:
  print(int(a)-int(c))
Buggy python submission (verdict: Runtime Error):
s=str(input())
count=0
for i in range(len(s)):
  if count==0 and s[i]==C:
    count+=1
  elif count==1 and s[i]==F:
    count+=1
    print('Yes');exit()
    
print('No')

Fixed submission:
s=str(input())
count=0
for i in range(len(s)):
  if count==0 and s[i]=='C':
    count+=1
  elif count==1 and s[i]=='F':
    count+=1
    print('Yes');exit()
    
print('No')
Buggy python submission (verdict: Runtime Error):
a=input();b=input();h=input()

print((a+b)*h//2)

Fixed submission:
a=int(input());b=int(input());h=int(input())

print((a+b)*h//2)

Buggy python submission (verdict: Runtime Error):
a=input();b=input();h=input()

print((a+b)/2*h)

Fixed submission:
a=int(input());b=int(input());h=int(input())

print((a+b)*h//2)
Buggy python submission (verdict: Runtime Error):
N=input()
ans=0
for i in range(N):
  ans+=N
print(ans)

Fixed submission:
N=int(input())
ans=0
for i in range(N):
  ans+=i+1
print(ans)