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

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

for index in range(K, N):
    if A_LIST[index] > A_LIST[index - K]:
        print('Yes')
    else:
        print('No')

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


def combinations(k):
    result = []
    for a in range(k + 1):
        for b in range(k + 1):
            for c in range(k + 1):
                if a + b + c <= k:
                    result.append([a, b, c])

    return result


def magic(A, B, C, K):
    if A < B < C:
        return True

    for l in combinations(K):
        a, b, c = A, B, C
        a_count, b_count, c_count = l
        if a_count > 0:
            a *= 2 * a_count
        if b_count > 0:
            b *= 2 * b_count
        if c_count > 0:
            c *= 2 * c_count

        if a < b < c:
            return True

    return False


if (magic(A, B, C, K)):
    print('Yes')
else:
    print('No')
Problem p02801 (python)

Fixed submission:
print(chr(ord(input()) + 1))

Buggy submission (verdict: Runtime Error):
print(chr(ord(int(input())) + 1))
Problem p02885 (python)

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

print(max(0, A - 2 * B))

Buggy submission (verdict: Runtime Error):
A, B = map(int, input())
 
print(max([0, A - 2 * B]))

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

print(max(0, A - 2 * B))
Problem p02778 (python)

Fixed submission:
s = input()
print("x"*len(s))

Buggy submission (verdict: Runtime Error):
s = input()
print("x"*len(s)-2)

Buggy submission (verdict: Runtime Error):
s = input()
print("x"*len(s)-1)
Problem p02789 (python)

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

if N == M:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
P = []
counter = 0
input_string = input()
P = input_string.split()

for i in range(N):
    for j in range(N):
        if N == int(P[i]):
            counter = counter + 1
            if N != 1:
                N = N - 1
                break
            else: 
                break
        elif N < int(P[i]):
            break
        else:
            if N != 1:
                N = N - 1   

print(counter)
Problem p02555 (python)

Fixed submission:
S = int(input())
DP = [0] * (S + 1)
Mod = 10 ** 9 + 7

if S >= 3:
    DP[0] = 1
    DP[1] = 0
    DP[2] = 0
    for TS in range(3,S+1):
        DP[TS] = DP[TS-1] + DP[TS-3]
    print(DP[S] % Mod)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
import math

mod = 10 ** 9 + 7


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


def F(s):
    if s < 3:
        return 0
    elif s < 6:
        return 1
    else:
        ans = 1
        for i in range(6, s+1, 3):
            ans += C(s-i+1, s-i)
        return ans


s = int(input())
print(F(s) % mod)

Buggy submission (verdict: Runtime Error):
def F(n):
    if n < 3:
        return 0
    elif n < 6:
        return 1
    else:
        return F(n - 1) + F(n - 3)


s = int(input())
print(F(s) % (10 ** 9 + 7))

Buggy submission (verdict: Runtime Error):
def F(n):
    if n <1:
        return 1
    elif n < 3:
        return 0
    elif n < 6:
        return 1
    else:
        return F(n - 1) + F(n - 3)


s = int(input())
print(F(s) % (10 ** 9 + 7))

Buggy submission (verdict: Runtime Error):
def F(n):
    if n < 3:
        return 0
    elif n < 6:
        return 1
    else:
        return F(n - 2) + F(n - 3) + F(n - 4)
    
    
s = int(input())
print(F(s) % (10 ** 9 + 7))
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)
res = 1
check = 10**18
if 0 in a:
    print(0)
else:
    for i in range(n):
        res *= a[i]
        if res > check:
            res = -1
            break
    print(res)
Problem p02658 (python)

Fixed submission:
n = int(input())
ls = list(map(int, input().split()))
res = 1
if 0 in ls:
    res = 0
for x in ls:
    res *= x
    if res > 10**18:
        res = -1
        break
print(res)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)
res = 1
check = 10**18
if 0 in a:
    print(0)
else:
    for i in range(a):
        if res > check:
            res = -1
            break
        res *= a[i]
    print(res)
Problem p03455 (python)

Fixed submission:
l= list(map(int, input().split()))
if l[0]*l[1]%2 ==0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
l = input().split()
if l[0]*l[1]%2 ==0:
    print(Even)
    else:
    print(Odd)
Problem p03471 (python)

Fixed submission:
l = list(map(int,input().split()))
N = l[0]
Y = l[1]

l = list()

for i in range(N+1):
    a = i
    if (Y - 1000*N -9000*a) % 4000 == 0:
        b = (Y - 1000*N -9000*a) // 4000 
        c = N - a - b
        if a >= 0 and b >= 0 and c >= 0:
            l.append([a,b,c])
            break

if len(l) ==0:
    print("-1 -1 -1")
else:
    ans = l[0]
    print(ans[0],ans[1],ans[2])

Buggy submission (verdict: Runtime Error):
N,Y = map(int,input().split())
for i in range(N+1):
    if (Y - 1000*N -9000*i) % 4000 == 0:
        b = (Y - 1000*N -9000*i) // 4000 
        c = N - i - b
        if b >= 0 and c >= 0:
            print(a,b,c)
            exit()
print("-1 -1 -1")
Problem p03106 (python)

Fixed submission:
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

A, B, K = map(int, input().split(" "))

a_divisor = divisor(A)
b_divisor = divisor(B)

print(sorted(list(set(a_divisor) & set(b_divisor)), reverse=True)[K-1])

Buggy submission (verdict: Runtime Error):
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

A, B, K = map(int, input().split(" "))

a_divisor = divisor(A)
b_divisor = divisor(B)

print(sorted(list(set(a_divisor) & set(b_divisor)), reverse=True)[K])

Buggy submission (verdict: Runtime Error):
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

A, B, K = map(int, input().split(" "))

a_divisor = divisor(A)
b_divisor = divisor(B)

print(sorted(list(set(a_divisor) & set(b_divisor)), reverse=True)[1])
Problem p02899 (python)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
b=[0]*n
for i in range(n):
    b[a[i]-1]=str(i+1)

print(' '.join(b))

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(input())
ans=''
for i in range(1,n+1):
    ans+=str(a.index(str(i))+1)+' '

print(ans)
Problem p03076 (python)

Fixed submission:
a=[]
b=[]
for i in range(5):
    x=int(input())
    a.append(x)
    if x%10!=0:
        b.append(10-x%10)
if a[0]%10==0 and a[1]%10==0 and a[2]%10==0 and a[3]%10==0 and a[4]%10==0:
    print(sum(a))
else:
    b.sort()
    print(sum(a)+sum(b)-max(b))

Buggy submission (verdict: Runtime Error):
a=[]
b=[]
for i in range(5):
    x=int(input())
    a.append(x)
    if x%10!=0:
        b.append(10-x%10)
b.sort()
print(sum(a)+sum(b)-max(b))
Problem p03086 (python)

Fixed submission:
s=input()
a=0
A=[0]
for i in range(len(s)):
    if s[i]=='A' or s[i]=='T' or s[i]=='G' or s[i]=='C':
        a+=1
        A.append(a)
    else:
        a=0
print(max(A))

Buggy submission (verdict: Runtime Error):
s=input()
a=0
A=[]
for i in range(len(s)):
    if s[i]=='A' or s[i]=='T' or s[i]=='G' or s[i]=='C':
        a+=1
        A.append(a)
    else:
        a=0
print(max(A))

Buggy submission (verdict: Runtime Error):
s=input()
a=0
A=[]
for i in range(len(s)):
    if s[i]=='A' or s[i]=='T' or s[i]=='G' or s[i]=='C':
        a+=1
    else:
        A.append(a)
        a=0
print(max(A))
Problem p03244 (python)

Fixed submission:
n=int(input())
v=list(map(int,input().split()))
d1={}
d2={}
l1=[]
l2=[]
for i in range(n):
    num=v[i]
    if i%2==0:
        try:
            d1[num]+=1
        except:
            d1[num]=1
    else:
        try:
            d2[num]+=1
        except:
            d2[num]=1
for i in d1:
    l1.append([d1[i],i])
for i in d2:
    l2.append([d2[i],i])
l1.sort(reverse=True)
l2.sort(reverse=True)
ans=n
if l1[0][1]!=l2[0][1]:
    ans-=(l1[0][0]+l2[0][0])
elif len(l1)==1 and len(l2)==1:
    ans//=2
elif len(l1)==1:
    ans-=l2[1][0]
elif len(l2)==1:
    ans-=l1[1][0]
else:
    a=ans-l1[0][0]-l2[1][0]
    b=ans-l1[1][0]-l2[0][0]
    ans=min(a,b)
print(ans)

Buggy submission (verdict: Runtime Error):
from collections import deque
n=int(input())
v=list(map(int,input().split()))
d1={}
d2={}
l1=[]
l2=[]
for i in range(n):
    num=v[i]
    if i%2==0:
        try:
            d1[num]+=1
        except:
            d1[num]=1
    else:
        try:
            d2[num]+=1
        except:
            d2[num]=1
for i in d1:
    l1.append([d1[i],i])
for i in d2:
    l2.append([d2[i],i])
l1.sort(reverse=True)
l2.sort(reverse=True)
ans=n
if l1[0][1]!=l2[0][1]:
    ans-=(l1[0][0]+l2[0][0])
elif len(l1)==1 and len(l2)==1:
    ans//=2
elif len(l1)==1:
    ans-=l2[1][0]
elif len(l2)==1
    ans-=l1[1][0]
else:
    a=ans-l1[0][0]-l2[1][0]
    b=ans-l1[1][0]-l2[0][0]
    ans=min(a,b)
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
v=list(map(int,input().split()))
da={}
db={}
maxa=0
maxa2=0
maxb=0
maxb2=0
if n==v.count(v[0]):
    print(n//2)
else:
    for i in range(n):
        if i%2==0:
            try:
                da[v[i]]+=1
            except:
                da[v[i]]=1
            if da[v[i]]>maxa:
                maxa2=maxa
                maxa=v[i]
        else:
            try:
                db[v[i]]+=1
            except:
                db[v[i]]=1
            if db[v[i]]>maxb:
                maxb2=maxb
                maxb=v[i]
    if maxa!=maxb:
        print(n-da[maxa]-db[maxb])
    else:
        print(min(n-da[maxa]-db[maxb2],n-da[maxa2]-db[maxb]))
Problem p03324 (python)

Fixed submission:
d,n=map(int,input().split())
a=[]
for i in range(1,2*n* 100**d):
    if i% 100**d==0 and i % 100**(d+1)!=0:
        a.append(i)
print(a[n-1])

Buggy submission (verdict: Runtime Error):
d,n=map(int,input().split())
a=[]
if d!=0:
    print(100**d*n)
else:
    for i in range(1,n**3):
        if i!=100:
            a.append(i)
    print(a[n-1])
Problem p03377 (python)

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

if li[0]<=li[2] and li[0]+li[1]>=li[2]:
    print('YES')
else:
    print('NO')

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

m=max(a)/2
a.append(m)
a.sort()
ind=a.index(m)

if abs(m-a[ind-1])<abs(m-a[ind+1]):
    print(max(a),a[ind-1])
else:
    print(max(a),a[ind+1])
Problem p03711 (python)

Fixed submission:
x,y=map(int,input().split())
if x==1 or x==3 or x==5 or x== 7 or x==8 or x==12 or x==10:
    if y==1 or y==3 or y==5 or y==7 or y==8 or y==10 or y==12:
        print('Yes')
    else:
        print('No')
elif x==4 or x==6 or x==9 or x==11:
    if y==4 or y==6 or y==9 or y==11:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
x,y=map(int,input().split())
if x==1 or x==3 or x==5 or x== 7 or ==8 or x==12 or x==!0:
    if y==1 or y==3 or y==5 or y==7 or y==8 or y==10 or y==12:
        print('Yes')
    else:
        print('No')
elif x==4 or x==6 or x==9 or x==11:
    if y==4 or y==6 or y==9 or y==12:
        print('Yes')
    else:
        print('No')
else:
    print('No')
Problem p03962 (python)

Fixed submission:
a,b,c=map(int,input().split())
li=[a,b,c]
li.sort()

if a==b==c:
    print(1)

elif li[0]==li[1] or li[1]==li[2]:
    print(2)
else:
    print(3)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a==b==C:
    print(1)
elif a==b or b==c or c==a:
    print(2)
else:
    print(3)

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a==b==C:
    print(1)
elif a==b or b==c or c==a:
    print(2)
else:
    print(3)
Problem p03244 (python)

Fixed submission:
import collections

n = int(input())
a = [ int(x) for x in input().split() ]

def count_elem(x):
    coll = collections.Counter(x)
    return coll.most_common()

b = count_elem(a[::2])
c = count_elem(a[1::2])

if b[0][0] != c[0][0]:
    print(len(a) - b[0][1] - c[0][1])
else:
    if b[0][1] > c[0][1]:
        if len(c) > 1:
            print(len(a) - b[0][1] - c[1][1])
        else:
            print(len(a) - b[0][1])
    elif b[0][1] < c[0][1]:
        if len(b) > 1:
            print(len(a) - b[1][1] - c[0][1])
        else:
            print(len(a) - c[0][1])
    elif b[0][1] == c[0][1]:
        if len(a)/2 == b[0][1]:
            print(int(len(a)/2))
        else:
            if b[1][1] >= c[1][1]:
                print(len(a) - b[1][1] - c[0][1])
            else:
                print(len(a) - b[0][1] - c[1][1])

Buggy submission (verdict: Runtime Error):
import collections

n = int(input())
a = [ int(x) for x in input().split() ]

def count_elem(x):
    coll = collections.Counter(x)
    return coll.most_common()

b = count_elem(a[::2])
c = count_elem(a[1::2])

if b[0][0] != c[0][0]:
    print(len(a) - b[0][1] - c[0][1])
else:
    if b[0][1] > c[0][1]:
        if len(c) > 1:
            print(len(a) - b[0][1] - c[1][1])
        else:
            print(len(a) - b[0][1])
    elif b[0][1] < c[0][1]:
        if len(b) > 1:
            print(len(a) - b[1][1] - c[0][1])
        else:
            print(len(a) - c[0][1])
    elif b[0][1] == c[0][1]:
        if b[1][1] >= c[1][1]:
            print(len(a) - b[1][1] - c[0][1])
        else:
            print(len(a) - b[0][1] - c[1][1])
Problem p02791 (python)

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
ans = 0
list_a=[]
min = p[0]
for i in p:
  if min >= i:
    min = i
    ans += 1
print(ans)

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

class Node:
    def __init__(self, data): #コンストラクタ
        self.data = data #ノードがもつ数値
        self.left = None #左エッジ
        self.right = None #右エッジ


class BST:
    def __init__(self, number_list): #コンストラクタ
        self.root = None #ルートノード初期化
        for node in number_list: #数値を持つ配列から二分木を生成
            self.insert(node) #挿入メソッドを使ってノードを挿入する
    #挿入
    def insert(self, data):
        n = self.root
        if n == None:
            self.root = Node(data)
            return
        else:
            while True:
                entry = n.data
                if data < entry:
                    if n.left is None:
                        n.left = Node(data)
                        return
                    n = n.left
                elif data > entry:
                    if n.right is None:
                        n.right = Node(data)
                        return
                    n = n.right
                else:
                    n.data = data
                    return


	def count(self):
		ans = 0
		n = self.root
		while True:
		if n != None:
			ans += 1
			n = n.left
		return ans


tree = BST(p)
tree.count()
print(ans)
Problem p02898 (python)

Fixed submission:
n , k = map(int ,input().split())
h = list(map(int,input().split()))
ans = 0
for i in range(n):
  if h[i] >= k:
    ans += 1

print(ans)

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

print(ans)
Problem p02917 (python)

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

a = list()
ans = 0
a.append(b[0])

for i in range(n-2):
  j = min(b[i],b[i+1])
  a.append(j)

a.append(b[-1])

for i in range(n):
  ans += a[i]

print(ans)

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

a = list()
ans = 0
a.append(b[0])

for i in range(n-2):
  a.append(b[i])
  if(b[i+1]<b[i]):
    a.pop(i+1)
    a.append(b[i+2])

j = max(b[-1],b[-2])
a.append(j)

for i in range(n):
  ans += a[i]

print(ans)
Problem p02923 (python)

Fixed submission:
n = int(input())
h = list(map(int,input().split()))
count = 0
ans = []
for i in range(n):
  if i == n-1:
    ans.append(count)
    break
  if h[i] >= h[i+1]:
    count += 1
  else:
    ans.append(count)
    count = 0
print(max(ans))

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
count = 0
ans = []
for i in range(7):
  if i == n-1:
    ans.append(count)
    break
  if h[i] >= h[i+1]:
    count += 1
  else:
    ans.append(count)
    count = 0
print(max(ans))
Problem p03067 (python)

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

yoru = 1    
if a < c and b > c:
	yoru = 1
else:
	yoru = 0
if yoru == 1:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = list(input())
K = int(input())

for i in range(N):
  if S[i] != S[K-1]:
    S[i] = "*"
S_changed = "".join(S)
print(S_changed)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = list(input())
K = int(input())

for i in range(N):
	if S[i] != S[K-1]:
		S[i] = "*"
S_changed = "".join(S)
print(S_changed)

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

yoru = 1    ＃寄り道する
if a < c and b > c:
	yoru = 1
else:
	yoru = 0
if yoru == 1:
	print("Yes")
else:
	print("No")
Problem p03068 (python)

Fixed submission:
N = int(input())
S = list(input())
K = int(input())

for i in range(N):
	if S[i] != S[K-1]:
		S[i] = "*"
S_changed = "".join(S)
print(S_changed)

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

for i in range(N):
  if S[i] != S[K]:
    S[i] = str("*")
print(S)
Problem p03211 (python)

Fixed submission:
s = list(input())
ans = abs(753 - int(s[0] + s[1] + s[2]))
for i in range (len(s) - 2):
  num = s[i] + s[i+1] + s[i+2]
  if ans > abs(int(num)-753):
    ans = abs(int(num)-753)
print(ans)

Buggy submission (verdict: Runtime Error):
s = list(input())
ans = 753 - int(s[0] + s[1] + s[2])
for i in range (8):
  num = s[i] + s[i+1] + s[i+2]
  if ans > abs(int(num)-753):
    ans = abs(int(num)-753)
print(ans)
Problem p03544 (python)

Fixed submission:
n = int(input())
l = []
l.append(2)
l.append(1)
for i in range(2,87):
  l.append(l[i-1] + l[i-2])
print(l[n])

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
l.append(2)
l.append(1)
for i in range(2,86):
  l.append(l[i-1] + l[i-2])
print(l[n])
Problem p02677 (python)

Fixed submission:
import numpy as np
def input_one_number():
    return int(input())
 
def input_multiple_number():
    return map(int, input().split())
 
def input_multiple_number_as_list():
    return list(map(int, input().split()))

a,b,h,m=input_multiple_number()

rad=np.deg2rad(min(abs(h*30-m*5.5),360-(abs(h*30-m*5.5))))

ans=np.sqrt(pow(a,2)+pow(b,2)-2*a*b*np.cos(rad))
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
def input_one_number():
    return int(input())
 
def input_multiple_number():
    return map(int, input().split())
 
def input_multiple_number_as_list():
    return list(map(int, input().split()))

a,b,h,m=input_multiple_number()

rad=np.deg2rad(min(abs(h*30-m*5.5),360-(abs(h*30-m*5.5))))

ans=np.sqrt(pow(a,2)+pow(b,2)-2*a*b*np.cos(rad))
print(ans)
Problem p02811 (python)

Fixed submission:
k,x=map(int,input().split())
if k*500>=x:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
k,x=map(int,input())
if k*500>=x:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
k,x=map(int,input())
if k*500>=x:
    print('Yes')
else:
    print('No')
Problem p02817 (python)

Fixed submission:
li = list(input().split())
s=li[0]
t=li[1]

print(t+s)

Buggy submission (verdict: Runtime Error):
x=int(input())
li=[2]
p=2
i=0
prime=False
if x==2:
    print(2)
else:
    while p<x or prime==False:
        prime=True
        p+=1
        for i in range(len(li)):
            if p%li[i]==0:
                prime=False
        if prime:
            li.append(p)
   
    print(max(li))
Problem p02639 (python)

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

for i in range(len(l)):
    if (l[i] == 0):
        print(i+1)
        break

Buggy submission (verdict: Runtime Error):
X, N = map(int, input("").split(" "))
p = list(map(int,input().split()))
p.sort()
q = [i+1 for i in range(-2*X,2*X)]

ans = 0
diff = 100

for i in q:
    if (abs(X - i) < diff and (not i in p)):
        ans = i
        diff = abs(X-i)
print(ans)
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input())
L = list(map(int, input().split()))
L = np.array(L)

ans = L.prod()
if (ans > pow(10,18)):
    print(-1)
else:
    print(ans)
Problem p02553 (python)

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

Buggy submission (verdict: Runtime Error):
import java.util.*;
import java.io.*;
import java.lang.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        System.out.println( Math.max( (Math.max(a*c,a*d)),(Math.max(b*c,b*d)) ) );



    }
}
Problem p02613 (python)

Fixed submission:
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for x in range(N):
    ia = input()
    if ia == "AC":
        ac += 1
    elif ia == "WA":
        wa += 1
    elif ia == "TLE":
        tle += 1
    elif ia == "RE":
        re += 1
    else:
        break

print(f"""\
AC x {ac}
WA x {wa}
TLE x {tle}
RE x {re}""")

Buggy submission (verdict: Runtime Error):
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
while True:
    ia = input()
    if ia == "AC":
        ac += 1
    elif ia == "WA":
        wa += 1
    elif ia == "TLE":
        tle += 1
    elif ia == "RE":
        re += 1
    else:
        break

print(f"""\
AC x {ac}
WA x {wa}
TLE x {tle}
RE x {re}""")

Buggy submission (verdict: Runtime Error):
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
while True:
    ia = input()
    if ia == "AC":
        ac += 1
    elif ia == "WA":
        wa += 1
    elif ia == "TLE":
        tle += 1
    elif ia == "RE":
        re += 1
    else:
        break

print("AC x", ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)
Problem p02657 (python)

Fixed submission:
X = str(input())
em = 0
Return = []
for spam in range(len(X)):
    if X[spam] == " ":
        Return.append(int(X[em:spam]))
        em = spam+1
Return.append(int(X[em:]))
x = 1
for a in Return:
    x = x * a

print(x)

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

def __input__():
    X = str(input("―― "))
    em = 0
    Return = []
    error = False
    for spam in range(len(X)):
        if X[spam] == " ":
            Return.append(int(X[em:spam]))
            em = spam+1
    Return.append(X[em:])

l = __input__()
x = 1
for a in l:
  x *= a

print(x)