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

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

def f(x):
  x.sort()
  if x[0]==0:
    return 0

  x.sort(reverse=True)
  
  ans=1
  
  for i in a:
    ans=ans*i

    if ans>10**18:
      return -1
      
  return ans
  


print(f(a))

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

def f(x):
  x.sort()
  if x[0]==0:
    return 0

  x.sort(reversed=True)
  
  ans=1
  
  for i in a:
    ans=ans*i

    if ans>10**18:
      return -1
      
    if n==0:
      return ans
  


print(f(a))
Problem p02697 (python)

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

x=list(range(1,N+1,1))

if N%2==1:
    for i in range(M):
        print(x.pop(0),x.pop(-1))
        
else:
    x_f=x[1:int(N/2+1)]
    x_l=x[int(N/2+1):]
    
    count=0
    
    for i in range(M):
        if len(x_f)>1:
            print(x_f.pop(0),x_f.pop(-1))
            count+=1
            
        if count==M:
            break
        
        if len(x_l)>1:
            print(x_l.pop(0),x_l.pop(-1))
            count+=1
            
        if count==M:
            break

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

x=list(range(1,N+1,1))

for i in range(3):
    print(x.pop(0),x.pop(-1))
Problem p02706 (python)

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

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

if N-sum(A)>=0:
    print(N-sum(A))
    
else:
    print('-1')

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

A=[int(input())for i in range(M)]

print(N-sum(A))
Problem p02813 (python)

Fixed submission:
import math

n=int(input())
p=list(map(int,input().split()))
q=list(map(int,input().split()))


def fun(x):
    
    count=0
    
    for k in range(len(x)-1):
        count+=math.factorial(len(x)-1)*sum(i<x[0] for i in x)
        del x[0]
        
    return count+1

a=fun(p)
b=fun(q)

print(abs(a-b))

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


def fun(x):
    
    count=0
    
    for k in range(len(x)-1):
        count+=math.factorial(len(x)-1)*sum(i<x[0] for i in x)
        del x[0]
        
    return count+1

a=fun(p)
b=fun(q)

print(abs(a-b))

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


def fun(x):
    
    count=0
    
    for k in range(len(x)-1):
        count+=math.factorial(len(x)-1)*sum(i<x[0] for i in x)
        del x[0]
        
    return count+1

a=fun(p)
b=fun(q)

print(abs(a-b))
Problem p03545 (python)

Fixed submission:
import numpy as np

nyuryoku=input()

s=[int(i) for i in nyuryoku]

s_array=np.array(s)

if np.sum(s_array)==7:
    Ans=['+'+str(i) for i in s]
    Ans[0]=str(s[0])
    print(''.join(Ans)+'=7')
    
else:
    for i in range(3):
        if np.sum(s_array)-2*s_array[i+1]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[i+1]='-'+str(s[i+1])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[1]-2*s_array[2]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[2]='-'+str(s[2])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[2]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[2]='-'+str(s[2])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break
        
        elif np.sum(s_array)-2*s_array[1]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[1]-2*s_array[2]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[2]='-'+str(s[2])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break

Buggy submission (verdict: Runtime Error):
import numpy as np

s=list(map(int,input().split()))

s_array=np.array(s)

if np.sum(s_array)==7:
    Ans=['+'+str(i) for i in s]
    Ans[0]=str(s[0])
    print(''.join(Ans)+'=7')
    
else:
    for i in range(3):
        if np.sum(s_array)-2*s_array[i+1]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[i+1]='-'+str(s[i+1])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[1]-2*s_array[2]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[2]='-'+str(s[2])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[2]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[2]='-'+str(s[2])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break
        
        elif np.sum(s_array)-2*s_array[1]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break
            
        elif np.sum(s_array)-2*s_array[1]-2*s_array[2]-2*s_array[3]==7:
            Ans=['+'+str(i) for i in s]
            Ans[0]=str(s[0])
            Ans[1]='-'+str(s[1])
            Ans[2]='-'+str(s[2])
            Ans[3]='-'+str(s[3])
            print(''.join(Ans)+'=7')
            break
Problem p02658 (python)

Fixed submission:
#coding: utf-8
times= int(input())
nums= list(map(int, input().split()))
a= 1
if 0 in nums:
  print(0)
  exit()
for i in nums:
  a*= i
  if a > 10**18:
    print('-1')
    exit()
else:
  print(a)

Buggy submission (verdict: Runtime Error):
#coding: utf-8
times= int(input())
a= 1
if 0 in times:
  print(0)
for i in list(map(int, input().split())):
  a*= i
  if a > 10**18:
    print('-1')
else:
  print(a)
Problem p02657 (python)

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

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

Buggy submission (verdict: Runtime Error):
def main()
A=input()
B=input()
x=int(A)
y=int(B)
print(x*y)

Buggy submission (verdict: Runtime Error):
A=input()
B=input()
x=int(A)
y=int(B)
print(x*y)

Buggy submission (verdict: Runtime Error):
A=input()
B=input()
x=int(A)
y=int(B)
print(x*y)

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

print(x*y)
Problem p02657 (python)

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

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

for i in range(a):
  if i != 0:
    c = c * b[i]
  else:
    c = b[i]

if c > 10 ** 18:
  print(-1)
else:
  print(c)

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

for i in range(a):
  if i != 0:
    c = c * b[i]
  else:
    c = b[i]

if c > 10 ** 18:
  print(-1)
else:
  print(c)
Problem p02995 (python)

Fixed submission:
# coding: utf-8
# Your code here!
import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
    
a, b, c, d = map(int,input().split())
def cal(i, j, k):
    return i // j + i // k - i // lcm(j, k)

if a % c == 0 or a % d == 0:
    print(b - a - (cal(b, c, d) - cal(a, c, d)))
else:
    print(b - a - (cal(b, c, d) - cal(a, c, d)) + 1)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
    
a, b, c, d = map(int,input().split())
def cal(i, j, k):
    return i // j + i // k - i // lcm(j, k)

if a % c == 0 or a % d == 0:
    print(b - a - (cal(b, c, d) - cal(a, c, d)))
else:
    print(b - a - (cal(b, c, d) - cal(a, c, d)) + 1)

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

A, B, C, D = map(int, input().split())
subst = abs(A - B)
num1 = subst // C + 1
num2 = subst // D + 1
num3 = subst // (C * D // math.gcd(C, D)) + 1

print(subst - num1 - num2 + num3 + 1)

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

A, B, C, D = map(int, input().split())
subst = abs(A - B)
num1 , num2, num3 = (subst // C + 1), (subst // D + 1), (subst // (C * D // math.gcd(C, D))) + 1

print(subst - num1 - num2 + num3 + 1)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
import math
 
A, B, C, D = map(int, input().split())
sub = abs(A - B)
num1 , num2, num3 = (sub // C + 1), (sub // D + 1), (sub // (C * D // math.gcd(C, D))) + 1
        
print(sub - num1 - num2 + num3 + 1)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
import numpy as np
import math

A, B, C, D = map(int, input().split())
sub = abs(A - B)
num1 , num2, num3 = (sub // C + 1), (sub // D + 1), (sub // (C * D // math.gcd(C, D))) + 1
print(num1, num2, num3)
        
print(sub - num1 - num2 + num3 + 1)
Problem p03061 (python)

Fixed submission:
# coding: utf-8
# Your code here!
import fractions

N = int(input())
arr = list(map(int, input().split()))
L = [0]
R = [0]
B = []

for i in range(N):
    L.append(fractions.gcd(arr[i], L[i]))
    R.append(fractions.gcd(arr[N - i - 1], R[i]))
for i in range(N):
    B.append(fractions.gcd(L[i],R[N - i - 1]))
print(max(B))

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
import fractions

N = int(input())
arr = list(map(int, input().split()))
L = [0]
R = [0]
B = []

for i in range(N):
    L.append(fractions.gcd(arr[i], L[i]))
    R.append(fractions.gcd(arr[N - i - 1], R[i]))
for i in range(N):
    B.append(math.gcd(L[i],R[N - i - 1]))
print(max(B))
Problem p03352 (python)

Fixed submission:
# coding: utf-8
# Your code here!
import math

X = int(input())

for i in range(X, 0, -1):
    for j in range(math.floor(math.sqrt(X)), 0, -1):
        for k in range(10):
            if pow(j, k) == i:
                print(pow(j, k))
                exit()

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

def prime_factor(n):
    ass = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            ass.append(i)
            n = n // i
    if n != 1:
        ass.append(n)
    return ass

X = int(input())
i = X

while True:
    if len(prime_factor(i)) >= 2 and len(set(prime_factor(i))) == 1: 
        print(i)
        exit()
    else:
        i -= 1
Problem p03425 (python)

Fixed submission:
# coding: utf-8
# Your code here!
import sys
input = sys.stdin.readline

n = int(input())
t = [0] * n
for i in range(n):
    t[i] =input()[0]
t2 = [t.count(i) for i in ["M","A","R","C","H"]]
ans = 0
for i in range(5):
    for j in range(5):
        if j == i:
            break
        for k in range(5):
            if k == j:
                break
            ans += t2[i] * t2[j] * t2[k]
print(ans)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
import math
from collections import Counter

def P(n, r):
    return math.factorial(n)//math.factorial(n-r)

def C(n, r):
    return P(n, r)//math.factorial(r)

N = int(input())
arr = [input() for i in range(N)]
mar_arr = [j for j in arr if j[0] == "M" or j[0] == "A" or j[0] == "R" or j[0] == "C" or j[0] == "H"]
ini_arr = [k[0] for k in mar_arr]
dic = Counter(ini_arr)
key_num = len(dic)
val_num = sum(v for v in dic.values())
if key_num < 3:
    print(0)
else:
    total = C(len(ini_arr), 3)
    for i in dic.values():
        if i == 2:
            total -= C(num - i, 1)
        elif i >= 3:
            total -= C(i, 2) * C(num - i, 1)  + C(i, 3)
    print(total)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
import math
from collections import Counter

def P(n, r):
    return math.factorial(n)//math.factorial(n-r)

def C(n, r):
    return P(n, r)//math.factorial(r)

N = int(input())
arr = [input() for i in range(N)]
mar_arr = [j for j in arr if j[0] == "M" or j[0] == "A" or j[0] == "R" or j[0] == "C" or j[0] == "H"]
ini_arr = [k[0] for k in mar_arr]
dic = Counter(ini_arr)
key_num = len(dic)
val_num = sum(v for v in dic.values())
if key_num <= 3:
    print(0)
else:
    total = C(len(ini_arr), 3)
    for i in dic.values():
        if i == 2:
            total -= C(num - i, 1)
        elif i >= 3:
            total -= C(i, 2) * C(num - i, 1)  + C(i, 3)
    print(total)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
import math
from collections import Counter

def P(n, r):
    return math.factorial(n)//math.factorial(n-r)

def C(n, r):
    return P(n, r)//math.factorial(r)

N = int(input())
arr = [input() for i in range(N)]
mar_arr = [j for j in arr if j[0] == "M" or j[0] == "A" or j[0] == "R" or j[0] == "C" or j[0] == "H"]
ini_arr = [arr[k][0] for k in range(N) if arr[k][0] == "M" or arr[k][0] == "A" or arr[k][0] == "R" or arr[k][0] == "C" or arr[k][0] == "H"]
dic = Counter(ini_arr)
num = sum(v for v in dic.values())
if num <= 2:
    print(0)
else:
    total = C(len(ini_arr), 3)
    for i in dic.values():
        if i == 2:
            total -= C(num - i, 1)
        elif i >= 3:
            total -= C(i, 2) * C(num - i, 1)  + C(i, 3)
    print(total)
Problem p03544 (python)

Fixed submission:
# coding: utf-8
# Your code here!
#動的計画法

N = int(input())
Ni_2 = 2
Ni_1 = 1
Ni = 1
Ni_dummy = 0

for i in range(2, N + 1):
    Ni = Ni_1 + Ni_2
    Ni_2 = Ni_1
    Ni_1 = Ni
print(Ni)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
#動的計画法

N = int(input())
Ni_2 = 2
Ni_1 = 1

for i in range(2, N + 1):
    Ni = Ni_1 + Ni_2
    Ni_2 = Ni_1
    Ni_1 = Ni
print(Ni)
Problem p03720 (python)

Fixed submission:
# coding: utf-8
# Your code here!

N, M = map(int, input().split())
arr = [0 for i in range(N)]

for i in range(M):
    A, B = map(int, input().split())
    arr[A - 1] += 1
    arr[B - 1] += 1
  
for j in arr:
    print (j)

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

N, M = map(int, input().split())
arr = [0 for i in range(N)]

for i in range(M):
    A, B = map(int, input().split())
    arr[A - 1] += 1
    arr[B - 1] += 1
  
for j in range(M):
    print(arr[j])

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

from collections import Counter

def flatten_2dim(array):
    return [item for sublist in array for item in sublist]
    
N, M = map(int, input().split())
arr = [[int(i) for i in input().split()] for j in range(M)]

dic = Counter(flatten_2dim(arr))
sort_dic = sorted(dic.items())

for i in range(M):
    print(sort_dic[i][1])

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
import collections

N, M = map(int, input().split())
cities = [list(map(int, input().split())) for i in range(M)]
cities = sum(cities, [])

c_list = sorted(collections.Counter(cities).items())

for i in range(N):
    print(c_list[i][1])
Problem p04044 (python)

Fixed submission:
# coding: utf-8
# Your code here!

N, L = map(int, input().split())
arr = [input() for i in range(N)]
sort_arr = sorted(arr)
for i in range(len(sort_arr)):
    print(sort_arr[i], end = "")

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

N, L = map(int, input().split())
arr = [input() for i in range(N)]
sort_arr = sorted(arr)
for i in range(L):
    print(sort_arr[i], end = "")
Problem p03035 (python)

Fixed submission:
yo,ans=map(int, input().split())
if yo<13:
    if yo>5:
        print(ans//2)
    else:
        print(0)
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
yo,ans=map(int, input().split())
if yo<13:
    if yo>5:
        print(ans//)
    else:
        print(0)
else:
    print(ans)
Problem p03145 (python)

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

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

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
ans = 1

if 0 in A:
  ans = 0
  N = 0

for i in range(N):
  ans *= A[i]
  if ans > 10**18:
    ans = -1
    break

print(ans)

Buggy submission (verdict: Runtime Error):
import sys
N = int(input())
num_list = list(map(int, input().split()))
c = 1
if 0 in num_list:
    print(0)
    sys.exit(1)
    
for i in range(N):
        c = c * num_list[i]

if c <= 10 ** 18:
    print(c)
else:
    print(-1)
Problem p02675 (python)

Fixed submission:
N = input()
if N[-1] == "3":
    print("bon")
elif N[-1] == "0":
    print("pon")
elif N[-1] == "1":
    print("pon")
elif N[-1] == "6":
    print("pon")
elif N[-1] == "8":
    print("pon")
elif N[-1] == "2":
    print("hon")
elif N[-1] == "4":
    print("hon")
elif N[-1] == "5":
    print("hon")
elif N[-1] == "7":
    print("hon")
elif N[-1] == "9":
    print("hon")

Buggy submission (verdict: Runtime Error):
N = input()
if N[-1] == 3
    print("bon")
elif N[-1] == 0 or 1 or 6 or 8:
    print("pon")
else:
    print("hon")
Problem p03493 (python)

Fixed submission:
print(input().count("1"))

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())
counter = 0
if a ==1:
    counter += 1
if b ==1:
    counter += 1
if c ==1:
    counter += 1

print(counter)
Problem p02694 (python)

Fixed submission:
t_have = 100
t_need_achieve = int(input())
count_year = 0
while t_have < t_need_achieve:
    t_have += t_have // 100
    count_year += 1
print(count_year)

Buggy submission (verdict: Runtime Error):
K = int(input())
k = K
A,B = map(int, input().split())
for i in range(1, B+1):
    k *= i
    if k > a and k < b:
        print('OK')
        a = True
        break
if not a:
    print('NG')
Problem p02700 (python)

Fixed submission:
from math import ceil

h_t,s_t,h_a,s_a = list(map(int, input().split()))

bearable_t = ceil(h_t/s_a)
bearable_a = ceil(h_a/s_t)

print('Yes' if bearable_t >= bearable_a else 'No')

Buggy submission (verdict: Runtime Error):
from math import inf
A,B,C,D = map(int, input().split())
for i in range(inf):
    if i % 2 == 0:
        D -= A
        if D == 0:
            print('Yes')
            break
    else:
        B -= C
        if B == 0:
            print('No')
            break
Problem p02706 (python)

Fixed submission:
N,M = map(int,input().split())
lst = list(map(int,input().split()))
plus = 0
for a in lst:
    plus += a
if plus <= N:
    print(N-plus)
else:
    print('-1')

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
lst = list(map(int,input().split()))
plus = 0
for a in range(lst):
    plus += a
if plus <= N:
    print(N-plus)
else:
    print('-1')

Buggy submission (verdict: Runtime Error):
N = int(input())
M = int(input())
lst = []
for i in range(M):
    lst.append(int(input()))
plus = 0
for a in lst:
    plus += a
if plus <= N:
    print(N-plus)
else:
    print('-1')
Problem p02713 (python)

Fixed submission:
from math import gcd #or import math
K = int(input())#or K = int(input())+1
plus = 0

for i in range(1,K+1):# range(1,K)
    for a in range(1,K+1):# range(1,K)
        x = gcd(i,a) #or math.gcd(i,a)
        for j in range(1,K+1):# range(1,K)
            plus += gcd(x,j) #or math.gcd(x,j)
            
print(plus)

Buggy submission (verdict: Runtime Error):
from math import gcd
K = int(input())
plus = 0
for i in range(1, K+1):
	for a in range(1, K+1):
    	x = gcd(i, a)
    	for j in range(1, K+1):
            plus += gcd(x, j)
print(plus)
Problem p02717 (python)

Fixed submission:
X,Y,Z = map(int,input().split())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Buggy submission (verdict: Runtime Error):
X,Y,Z = map(int,input().split)
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Buggy submission (verdict: Runtime Error):
X,Y,Z = map(int,input().split)
X,Y,Z = Z,X,Y
print(X,Y,Z)

Buggy submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())
A,B,C = X,Y,Z
A,B,C = C,A,B
print(A,B,C)

Buggy submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())
X,Y,Z = Z,X,Y

Buggy submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())
M = X
X = Y
Y = M
M = X
X = Z
Z = M
print(X,Y,Z)

Buggy submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())
X,Y = Y,X
X,Z = Z,X
print(X,Y,Z)

Buggy submission (verdict: Runtime Error):
X = int(input())
Y = int(input())
Z = int(input())
X,Y,Z = Z,X,Y
Problem p02657 (python)

Fixed submission:
a, b = map(int,input().split())
def main(x,y):
    print(x*y)

main(a,b)

Buggy submission (verdict: Runtime Error):
def main(x,y):
    return x*y

main(A,B)

Buggy submission (verdict: Runtime Error):
def main():
    return A*B

main()

Buggy submission (verdict: Runtime Error):
A*B
Problem p02657 (python)

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

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

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

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

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

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

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())
c=a*b
print(c)
Problem p02657 (python)

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

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

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

Buggy submission (verdict: Runtime Error):
A = input("Please input 1st number: ")
B = input("Please input 2nd number: ")

if int(A) >= 1 and int(A) <= 100:
  if int(B) >= 1 and int(B) <= 100:
    C = int(A) * int(B)
    print("We have" + str(A) + " x " + str(B) + " = " + str(C) + ".")
  else:
    print("Please check Number B side")
else:
  print("Please check Number A side")

print("check end.")

Buggy submission (verdict: Runtime Error):
A = input("Please input 1st number: ")
B = input("Please input 2nd number: ")

if A <= 1 and A >= 100:
  if B <= 1 and B >= 100:
    C = A * B
    print("We have" + str(A) + " x " + str(B) + " = " + str(C) + ".")
  else:
    print("Please check Number B side (1 <= 100)")
else:
  print("Please check Number A side (1 <= 100)")

print("check end.")

Buggy submission (verdict: Runtime Error):
a = imput("please imput number 1st:")
b = imput("please imput number 2nd:")
c = a * b

if (1 <= a <= 100) and (1 <= b <= 100):
  print(c)
  else:
    print("check number again")
end
Problem p02818 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c=int(input())
if c>=a+b:
  print(0,0)
elif a+b>c>=a:
  print(0,b-c+a)
else:
  print(a-c,b)
Problem p02885 (python)

Fixed submission:
A,B =map(int,input().split())

if(A>B*2):
  aaa=A-B*2
  print(aaa)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
A,B =map(int.input().split())

if(A>B*2):
  aaa=A*B
  print(aaa)
else:
  print(0)
Problem p02909 (python)

Fixed submission:
s=input()

if s=="Sunny":
  print("Cloudy")
  
elif s=="Cloudy":
  print("Rainy")
  
else:
  print("Sunny")

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

if s=="Sunny":
  print("Cloudy")
  
elif S=="Cloudy":
  print("Rainy")
  
else:
  print("Sunny")
Problem p02917 (python)

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

x=b[0]+b[n-2]

i=1
while n-1>i:
  if b[i-1]<=b[i]:
    x+=b[i-1]
    i+=1
  else:
    x+=b[i]
    i+=1
    
print(x)

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

x=b[1]

i=0
while n-1>i:
  if b[i]<=b[i+1]:
    x+=b[i]
    i+=1
  else:
    x+=b[i+1]
    i+=1
    
print(x)

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

x=b[1]

i=0
while n-1>i:
  if b[i]<=b[i+1]:
    x+=b[i]
    i+=1
  else:
    x+=b[i+1]
    i+=1
    
print(x)

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

x=a[1]

i=0
while n>i:
  if b[i]<=b[i+1]:
    x+=b[i]
    i+=1
  else:
    x+=b[i+1]
    i+=1
    
print(x)