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

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

ans = 0
c = 0
for i in range(n-1):
    if h[i] >= h[i+1]:
        c += 1
    else:
        ans = max(ans, c)
        c = 0
print(max(ans, c))

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
h.reverse()
i=0
for i in range(n):
  if h[i]<h[i+1]:
    i+=1
  
print(i)

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
h.reverse()
i=0
while h[i]<h[i+1]:
  i+=1
  
print(i+1)
Problem p02927 (python)

Fixed submission:
n,m=input().split()
if int(m)>=10:
    ans=0
    for i in range(4,int(n)+1):
      for j in range(2,int(m[0])):
        for k in range(2,10):
          if i==j*k:
            ans+=1
    for i in range(4,int(n)+1):
      for j in range(2,int(m[1])+1):
          if i==j*int(m[0]):
            ans+=1
    print(ans)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
n,m=input().split()
ans=0
for i in range(4,int(n)+1):
  for j in range(2,int(m[0])):
    for k in range(10):
      if i==j*k:
        ans+=1
for i in range(4,int(n)+1):
  for j in range(2,int(m[1])+1):
      if i==j*int(m[0]):
        ans+=1
print(ans)
Problem p02934 (python)

Fixed submission:
n = int(input())
an = list(map(int, input().split()))
i=0
k=0
 
 

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)

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

  
while n>i:
  k+=1/an[i]
  i+=1
  
print(1/k)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[int(input()) for i in range(n)]
i=0
k=0
 
 

  
while n>i:
  k+=1/s[i]
  i+1
  
print(1/k)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[input() for i in range(n)]
i=0
k=0
 
 

  
while n>i:
  k+=1/s[i]
  i+1
  
print(1/k)

Buggy submission (verdict: Runtime Error):
n=int(input())

i=1
k=0

while n>=i:
  f[i]=int(input())
  i+=1
  
while n>=i:
  k+=1/f[i]
  i+1
  
print(1/k)
Problem p03068 (python)

Fixed submission:
n=int(input())
l=list(input())
m=int(input())
for i in range(len(l)):
  if l[i]!=l[m-1]:
    l[i]="*"
print("".join(l))

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(input())
m=int(input())
for i in range(len(l)):
	if l[i]!=l[m-1]:
    	l[i]="*"
print("".join(l))
Problem p03211 (python)

Fixed submission:
s = input()
m = []
for i in range(len(s)-2):
	m.append(abs(753-int(s[i:i+3])))
print(min(m))

Buggy submission (verdict: Runtime Error):
s=int(input())
c=abs(753-(s[0]+s[1]+s[2]))

for i in range(1,len(n)-2):
  sum=s[i]+s[i+1]+s[i+2]
  d=abs(753-sum)
  e=min(c,d)
  
print(e)
Problem p03425 (python)

Fixed submission:
n=int(input())
s=[]
for i in range(n):
  s.append(input())
m=0
a=0 
r=0
c=0
h=0
for j in range(n):
  if s[j][0]=="M":
    m+=1
  elif s[j][0]=="A":
    a+=1
  elif s[j][0]=="R":
    r+=1
  elif s[j][0]=="C":
    c+=1
  elif s[j][0]=="H":
    h+=1
    
ans=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*c*h+a*r*h+r*c*h

print(ans)

Buggy submission (verdict: Runtime Error):
m=0
a=0 
r=0
c=0
h=0
for j in range(n):
  if s[j][0]=="M":
    m+=1
  elif s[j][0]=="A":
    a+=1
  elif s[j][0]=="R":
    r+=1
  elif s[j][0]=="C":
    c+=1
  elif s[j][0]=="H":
    h+=1
    
ans=m*a*r+m*a*c+m*a*h+m*r*c+m*r*h+m*c*h+a*r*c+a*c*h+a*r*h+r*c*h

print(ans)
Problem p03448 (python)

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
X=int(input())


x=X/50

count=0

for i in range(a+1):
  for l in range(b+1):
    if 0<=x-i*10-l*2<=c:
      count+=1
      
print(count)

Buggy submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
X=int(input())

a=A/50
b=B/50
c=C/50
x=X/50

count=0

for i in range(a+1):
  for l in range(b+1):
    if 0<=x-a*10-b*2<=c:
      count+=1
      
print(count)
Problem p03457 (python)

Fixed submission:
n=int(input())
t=0
x=0
y=0
for i in range(n):
  g,h,j=map(int,input().split())
  if (g-t)%2==(abs(h-x)+abs(j-y))%2 and (abs(h-x)+abs(j-y))<=(g-t):
    t=g
    x=h
    y=j
  else:
    print("No")
    exit()

print("Yes")

Buggy submission (verdict: Runtime Error):
n=int(input())
t=0
x=0
y=0
for i in range(n):
  g,h,j=map(int,input().split())
  if (g-t)%2==(abs(h-x)+abs(j-y)%2:
               print("Yes")
  else:
               print("No")
Problem p03471 (python)

Fixed submission:
n,x=map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
    if x==10000*i+5000*j+1000*(n-i-j):
      print(i,j,n-i-j)
      exit()
    
    
print("-1 -1 -1")

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
    if x==10000*i+5000*j+1000*(n-i-j):
      h=[i,j,n-i-j]
      a=h.replace(","," ")
      print(a)
      exit()
    
    
print("-1 -1 -1")
Problem p03473 (python)

Fixed submission:
n=int(input())
print(48-n)

Buggy submission (verdict: Runtime Error):
q=int(input())
for i in range(q):
  a,b=map(int,input().split())
  h=0
  for j in range(a,b+1):
    for v in range(2,round(j**0.5)):
      if j%v==0:
        for k in range(2,round(((j+1)/2)**0.5)):
          if j%k==0:
            h+=1
          else:
            pass
      else:
        pass
      
  print(h)
Problem p03476 (python)

Fixed submission:
Q = int(input())
lr_list = [list(map(int, input().split())) for _ in range(Q)]

max_val = max([lr[1] for lr in lr_list])

# エラトステネスの篩
num_list = list(range(max_val + 1))
for num in num_list[2:max_val // 2 + 1]:
    if num > 0:
        for i in range(num*2, max_val+1, num):
            num_list[i] = -1

prime_num_set = set([num for num in num_list if num>0][1:])

# 累積和
sum_list = [0, 0, 0]
for i in range(3, max_val+1):
    if i in prime_num_set and (i+1)//2 in prime_num_set:
        sum_list.append(sum_list[-1]+1)
    else:
        sum_list.append(sum_list[-1])

for l, r in lr_list:
    print(sum_list[r] - sum_list[l-1])

Buggy submission (verdict: Runtime Error):
q=int(input())
for i in range(q):
  a,b=map(int,input().split())
  h=0
  for j in range(a,b+1):
    for v in range(2,j):
      if j%v==0:
        for k in range(2,(j+1)/2):
          if j%k==0:
            h+=1
          else:
            pass
      else:
        pass
      
  print(h)
Problem p03493 (python)

Fixed submission:
h=input()
g=0
for i in range(3):
  if h[i]=="1":
    g+=1
print(g)

Buggy submission (verdict: Runtime Error):
h=int(input())
g=0
for i in range(3):
  if h[i]==1:
    g+=1
print(g)

Buggy submission (verdict: Runtime Error):
h=int(input())
g=0
for i in range(3):
  if h[i]==1:
    i+=1
print(g)
Problem p03494 (python)

Fixed submission:
n=int(input())
k=10000000000000000000000000000000000000000
a=list(map(int,input().split()))
for i in range(n):
  j=0
  while a[i]%2==0:
    a[i]=a[i]/2
    j+=1
  k=min(j,k)
  
print(k)

Buggy submission (verdict: Runtime Error):
n=int(input())
k=100000000000000000000000000000000000000000
for i in range(n):
  j=0
  a=int(input())
  while a%2==0:
    a=a/2
    j+=1
  k=min(j,k)
  
print(k)

Buggy submission (verdict: Runtime Error):
n=int(input())
k=100000000000000000000000000000000000000000
for i in range(n):
  j=0
  a=int(input())
  while a%2==0:
    a=a/2
    j+=1
  min(j,k)
  
print(k)
Problem p03544 (python)

Fixed submission:
n=int(input())
l=[0]*(n+1)
l[0]=2
l[1]=1

for i in range(2,n+1):
  l[i]=l[i-1]+l[i-2]
print(l[n])

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[0]*n+1
l[0]=2
l[1]=1

for i in range(2,n+2):
  l[i]=l[i-1]+l[i-2]
print(l[n+1])
Problem p03609 (python)

Fixed submission:
x,t=map(int,input().split())
if x-t>0:
  print(x-t)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
N = int(input())
P = list(map(int,input().split()))
ans = 0
for i in range(N - 1):
  if P[i] == i+1:
    P[i],P[i+1] = P[i+1],P[i]
    ans += 1
if P[-1] == N:
  ans += 1
print(ans)
Problem p03624 (python)

Fixed submission:
x=input()
s=["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"]
for i in s:
  if x.count(i)==0:
    print(i)
    exit()
print("None")

Buggy submission (verdict: Runtime Error):
x=input()
s=[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]
for i in s:
  if x.count(i)==0:
    print(i)
    exit()
Problem p03636 (python)

Fixed submission:
n=input()
print(n[0]+str(len(n)-2)+n[-1])

Buggy submission (verdict: Runtime Error):
n=input()
print(n[0]+(len(n)-2)+n[-1])
Problem p03638 (python)

Fixed submission:
H, W = map(int, input().split())
N = int(input())
a = list(map(int, input().split()))

b = []
for i in range(N):
    b.extend([i + 1] * a[i])

for i in range(H):
    row = b[i * W:(i + 1) * W]
    if i % 2 == 1:
        row.reverse()
    print(' '.join([str(c) for c in row]))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
j=0
k=0
l=0
for i in a:
  if i%4==0:
    l+=1
  elif i%2==0:
    k+=1
  else:
    j+=1
if l<=j :
  print("Yes")
else:
  print("No")
Problem p03645 (python)

Fixed submission:
n,m=map(int,input().split())
s=[[] for i in range(n)]
for i in range(m):
  a,b=map(int,input().split())
  s[a-1].append(b)
for j in s[0]:
  if n in s[j-1]:
    print("POSSIBLE")
    exit()
print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
s=[]
for i in range(m):
  d=list(map(int,input().split()))
  s.append(d)
for j in range(n-1):
  for k in range(j,n):
    if (s[j][0]==1 and s[j][1]==s[k][0] and s[k][1]==n) or (s[k][0]==1 and s[k][1]==s[j][0] and s[j][1]==n):
      print("POSSIBLE")
      exit()
print("IMPOSSIBLE")
Problem p03658 (python)

Fixed submission:
n,k=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
a.reverse()
print(sum(a[0:k]))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
a=list(map(int,input().split()))
a.sort()
a.reverse()
print(sum(0,k+1))
Problem p03680 (python)

Fixed submission:
n=int(input())
s=[]
ans=0
for i in range(n):
  a=int(input())
  s.append(a)
k=s[0]
for j in range(n+1):
  if k==2:
    ans+=1
    print(ans)
    exit()
  else:
    ans+=1
    k=s[k-1]
print(-1)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=[]
k=s[0]
ans=0
for i in range(n):
  a=int(input())
  s.append(a)
for j in range(n+1):
  if s[k]==2:
    ans+=1
    print(ans)
    exit()
  else:
    ans+=1
    k=s[s[k]]
print(-1)
Problem p03681 (python)

Fixed submission:
import math
n,m=map(int,input().split())
if n==m+1 or m==n+1:
  print((math.factorial(n)*math.factorial(m))%(10**9+7))
elif n==m:
  print(((math.factorial(n)*math.factorial(m))*2)%(10**9+7))
else:
  print(0)

Buggy submission (verdict: Runtime Error):
import math
n,m=map(int,input().split())
if n=m+1 or m=n+1:
  print((math.factorial(n)*math.factorial(m))%(10**9+7))
elif n=m:
  print(((math.factorial(n)*math.factorial(m))*2)%(10**9+7))
else:
  print(0)
Problem p03712 (python)

Fixed submission:
from collections import deque
h,w=map(int,input().split())
print("#"*(w+2))
for i in range(h):
  d=input()
  print("#"+d+"#")
print("#"*(w+2))

Buggy submission (verdict: Runtime Error):
h,w=map(int,input().split())
print("#"*(w+2))
for i in range(h):
  d=input()
  d.insert("#",0)
  d.append("#")
  print(d)
print("#"*(w+2))
Problem p03719 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a<=c<=b:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
a = []
M = 0
for i in range(N):
  a.append(list(map(int,input().split())))
a.sort()
print(a)
for i in range(N):
    K = K-a[i][1]
    if K <= 0:
        print(a[i][0])
        break
Problem p03720 (python)

Fixed submission:
n,m=map(int,input().split())
l=[]
for i in range(m):
  a,b=map(int,input().split())
  l.append(a)
  l.append(b)
  
for j in range(1,n+1):
  print(l.count(j))

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
l=[]
g=0
for i in range(m):
  a,b=map(int,input().split())
  a.append(l)
  b.append(l)
  
for j in range(1,n+1):
  g+=l.count(j)
  
print(g)

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
l=[]
g=0
for i in range(n):
  a,b=map(int,input().split())
  a.append(l)
  b.append(l)
  
for j in range(1,n+1):
  g+=l.count(j)
  
print(g)
Problem p03731 (python)

Fixed submission:
n,t=map(int,input().split())
a=list(map(int,input().split()))
j=t
for i in range(1,n):
  if a[i]-a[i-1]>t:
    j+=t
  else:
    j+=a[i]-a[i-1]
    
print(j)

Buggy submission (verdict: Runtime Error):
n,t=map(int,input().split())
a=list(map(int,input().split()))
j=t
for i in range(1,n+1):
  if a[i]>t:
    j+=t
  else:
    j+=a[i]
    
print(j)
Problem p03737 (python)

Fixed submission:
a,b,c=input().split()
g=[a[0].upper(),b[0].upper(),c[0].upper()]
print("".join(g))

Buggy submission (verdict: Runtime Error):
x, y =map(int,input().split())
 
print("Alice") if abs(x - y) >= 2 else print("Brown")
Problem p03760 (python)

Fixed submission:
a=input()
b=input()
n=[]
for i in range(len(a)):
  n.append(a[i])
  if i<=len(b)-1:
    n.append(b[i])
print("".join(n))

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
n=[]
for i in range(len(a)):
  n.append(a[i])
  if i<=len(b):
    n.append(b[i])
print("".join(n))

Buggy submission (verdict: Runtime Error):
a=input()
b=input()
n=[]
for i in range(len(a)):
  n.append(a[i])
  n.append(b[i])
print("".join(n))
Problem p03773 (python)

Fixed submission:
a,b=map(int,input().split())
print((a+b)%24)

Buggy submission (verdict: Runtime Error):
a.b=map(int,input().split())
print((a+b)%24)

Buggy submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
v=list(map(int,input().split()))
v.sort()
v.reverse()
ave=0
for i in range(a):
  ave+=v[i]
  
print(ave/a)

l=0
for j in range(a,b):
  if v[a-1]==v[j]:
    l+=1
    
p=v.count(v[a-1])

from math import factorial
a=factorial(p) / factorial(p-l) / factorial(l)
print(a)
Problem p03777 (python)

Fixed submission:
a,b=input().split()
if a=="H":
  print(b)
else:
  if b=="H":
    print("D")
  else:
    print("H")

Buggy submission (verdict: Runtime Error):
a,b=input().split()
if a=="H":
  print(b):
else:
  if b=="H":
    print("D")
  else:
    print("H")
Problem p03813 (python)

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

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

# input
s = input()

# solve
for i in range(len(s)):
    if s[i] == 'A':
        a = i
        break

for i in reversed(range(len(s))):
    if s[i] == 'Z':
        z = i
        break

# output
print(z - a + 1)

Buggy submission (verdict: Runtime Error):

 s = str(input())
 

 for i in range(len(s)):
    if s[i] == 'A':
        a = i
        break
 
 for i in reversed(range(len(s))):
    if s[i] == 'Z':
        z = i
        break
 

 print(z - a + 1)
Problem p03814 (python)

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

# input
s = input()

# solve
for i in range(len(s)):
    if s[i] == 'A':
        a = i
        break

for i in reversed(range(len(s))):
    if s[i] == 'Z':
        z = i
        break

# output
print(z - a + 1)

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

# input
s = input()

# solve
for f in range(len(s)):
    if s[i] == 'A':
        a = i
        break

for f in reversed(range(len(s))):
    if s[i] == 'Z':
        z = i
        break

# output
print(z - a + 1)

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

 for i in range(len(s)):
    if s[i] == 'A':
        a = i
        break
 
 for i in reversed(range(len(s))):
    if s[i] == 'Z':
        z = i
        break
 

 print(z - a + 1)
Problem p03829 (python)

Fixed submission:
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
ans=0
for i in range(n-1):
  if (x[i+1]-x[i])*a>=b:
    ans+=b
  else:
    ans+=(x[i+1]-x[i])*a
print(ans)

Buggy submission (verdict: Runtime Error):
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
ans=0
for i in range(n):
  if (x[i+1]-x[i])*a>=b:
    ans+=b
  else:
    ans+=(x[i+1]-x[i])*a
print(ans)
Problem p03844 (python)

Fixed submission:
a,c,b=input().split()
if c=="+":
  print(int(a)+int(b))
else:
  print(int(a)-int(b))

Buggy submission (verdict: Runtime Error):
a,c,b=map(int,input().split())
if c=="+":
  print(a+b)
else:
  print(a-b)
Problem p03852 (python)

Fixed submission:
l=input()
if l=="a" or l=="e" or l=="i" or l=="o" or l=="u":
  print("vowel")
else:
  print("consonant")

Buggy submission (verdict: Runtime Error):
s= input()
u= s[::-1]
 
k=["resare","esare","remaerd","maerd"]
 
l=u.replace("resare","")
d=l.replace("esare","")
h=d.replace("remaerd","")
w=h.replace("maerd","")
  
print(w)    
if w="":
  print("Yes")
  
else:
  print("No")
Problem p03854 (python)

Fixed submission:
s= input()
u= s[::-1]
 
k=["resare","esare","remaerd","maerd"]
 
l=u.replace("resare","")
d=l.replace("esare","")
h=d.replace("remaerd","")
w=h.replace("maerd","")
  
    
if w:
  print("NO")
  
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
s = input()
u=s[::-1]

k=[maerd,remaerd,esare,resare]

for i in k:
  if u.find(k):
    s.strip(k)
    
if u==[]:
  print("Yes")
  
else:
  print("No")
Problem p03860 (python)

Fixed submission:
n=input().split()
print(n[0][0]+n[1][0]+n[2][0])

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

num= range(a,b)

d =0

for c in num:
  if c%x == 0:
    d+=1
  else:
    continue

print(d)
Problem p03943 (python)

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

if a==b+c or b==a+c or c==a+b:
  print("Yes")
  
else:
  print("No")

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

if a==b+c or b==a+c or c==a+b:
  print("Yes")
  
else:
  print("No")
Problem p03963 (python)

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

s=k*(k-1)**(n-1)

print(s)

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

s=k*(k-1)**(n-1)

print(s)
Problem p03964 (python)

Fixed submission:
N = int(input())
x, y = 1, 1
for i in range(N):
    a, b = map(int, input().split())
    n = max((x-1 + a) // a, (y - 1 +b) // b)
    x = n * a
    y = n * b
print(x + y)

Buggy submission (verdict: Runtime Error):
n=int(input())

t=[0]*n
a=[0]*n

for i in range(n):
    t,a=map(int,input().split()) 
  
  
  
for i in range(n-1):
  while (t[i]>t[i+1]) or (a[i]>a[i+1]):
    for k in range(1,100000000000000000000000000000000):
      t[i+1]*=k
      a[i+1]*=k
      
print(a[n]+t[n])
Problem p03997 (python)

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

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

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

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

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

print((a+B)*h/2)
Problem p03998 (python)

Fixed submission:

SA = input()
SB = input()
SC = input()
turn = "a"
while min(len(SA), len(SB), len(SC)) >= 0:
    if turn == "a":
        if len(SA) == 0:
            print("A")
            break
        else:
            turn = SA[0]
            SA = SA[1:]
    elif turn == "b":
        if len(SB) == 0:
            print("B")
            break
        else:
            turn = SB[0]
            SB = SB[1:]
    else:
        if len(SC) == 0:
            print("C")
            break
        else:
            turn = SC[0]
            SC = SC[1:]

Buggy submission (verdict: Runtime Error):
sa=input()
sb=input()
sc=input()
print(sa[0])
while True:
  k="a"
  if k=="a":
    if sa==[]:
      print("A")
      exit()
    else:
      k=sa[0]
      sa=sa[1:]
  if k=="b":
    if sb==[]:
      print("B")
      exit()
    else:
      k=sb[0]
      sb=sb[1:]
  if k=="c":
    if sc==[]:
      print("C")
      exit()
    else:
      k=sc[0]
      sc=sc[1:]
Problem p04011 (python)

Fixed submission:
n = int(input())
k = int(input())
x= int(input())
y= int(input())

if n>k:
  print(k*x+(n-k)*y)

else:
  print(n*x)

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

if n>k:
  print(k*x+(n-k)*y)

else:
  print(n*x)

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

if n>k:
  print(k*x+(n-k)*y)

else:
  print(k*x)

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

if n>=k:
  print(k*x+(n-k)*y)

else:
  print(k*x)

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

if n>=k:
  print(round(k*x+(n-k)*y))

else:
  print(round(k*x))

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

if n>k:
  print(round(k*x+(n-k)*y))

else:
  print(round(k*x))

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

if n>k:
  print(round(k*x+(n-k)*y)
        
else:
        print(round(k*x)
Problem p04029 (python)

Fixed submission:
n = int(input())

print(round(n*(n+1)/2))

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

print(n*(n+1)/2)
Problem p04043 (python)

Fixed submission:
  
  # 文節の入力(整数として扱う)
a, b, c = map(int, input().split())
# まず長さが7の文節があるか確認
if a == 7 and b == 5 and c == 5:
	print("YES")
elif a == 5 and b == 7 and c == 5:
	print("YES")
elif a == 5 and b == 5 and c == 7:
	print("YES")
else:
	print("NO")

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

if (a == 7 and b ==5 and c == 5)or(a == 5 and b == 7 and c == 5)
or(a==5 and b==5 and c==7):
  print("YES")
  
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
# まず長さが7の文節があるか確認
if (a == 7 and b ==5 and c == 5)or(a == 5 and b == 7 and c == 5)
or(a==5 and b==5 and c==7):
	print("YES")
  
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
# まず長さが7の文節があるか確認
if (a == 7  b == 5 c == 5)or(a == 5 b == 7 c == 5)or(a==5 b==5 c==7):
	print("YES")

else:
	print("NO")

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

if a=5 b=5 c=7 or a=5 b=7 c=5 or a=7 b=5 c=5:
  print("YES")
  
else:
  print("NO")
Problem p02657 (python)

Fixed submission:
a=input()
a=a.split()
print(int(a[0])*int(a[1]))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=a*b
print(c)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(a*b)
Problem p02657 (python)

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

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

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=a*b
print(c)
Problem p02657 (python)

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

print(N*M)

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

# スペース区切りの整数の入力
N, *d = map(int, open(0).read().split())

if 0 in d:
  print(0)
  return
  
for O in d:
	A = A * O
	#print(O)
	if A > 1000000000000000000:
		A = -1
		break

print(A)
Problem p02657 (python)

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

print(a*b)

Buggy submission (verdict: Runtime Error):
def main():
  
	n = int(input())
	a = list(map(int,input().split()))
	uppest = pow(10 , 18)

	ans = 1

	if 0 in a:
  		print (0)
  		return

	for s in a:
	  	ans *= s
  		if ans > uppest:
    			print(-1)
    			return
  
	print(ans)

main()

Buggy submission (verdict: Runtime Error):
A,B = input()
C = A * B
print(C);

Buggy submission (verdict: Runtime Error):
A,B = input()
C = A * B
print(A*B);

Buggy submission (verdict: Runtime Error):
A = input()
B = input()

print(A * B)
Problem p02780 (python)

Fixed submission:
N, K = map(int, input().split())
P    = list(map(int, input().split()))

q = sum(P[:K])
m = q

for k in range(N-K+1):
    if k > 0:
        q = q - P[k-1] + P[K-1+k]
    if m < q:
        m = q

print((m+K)/2)

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

q = sum(P[:K])
m = q

for k in range(K):
    if k > 0:
        q = q - P[k-1] + P[K-1+k]
    if m < q:
        m = q

print((m+K)/2)
Problem p02947 (python)

Fixed submission:
import math

from collections import Counter


def func(i):
    if i >= 1:
        return math.factorial(i)
    else:
        return 1


N = int(input())

S = [''.join(sorted(list(input()))) for i in range(N)]

print(sum([func(i) // func(i-2) // 2 for i in Counter(S).values()]))

Buggy submission (verdict: Runtime Error):
import math

from collections import Counter


N = int(input())

S = [''.join(sorted(list(input()))) for i in range(N)]

print(sum([math.factorial(i) // math.factorial(i-2) // 2 for i in Counter(S).values()]))