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

Fixed submission:
import collections
n,k = map(int,input().split())
a = list(map(int,input().split()))
list = [1]
i = 0
num = a[0]
for i in range(3*n):
    list.append(num)
    num = a[num-1]

cnt = collections.Counter(list)
onevalue = [k for k,v in cnt.items() if v == 1]
lstart = len(onevalue)
lroop = len(set(list))-lstart

if k <= lstart:
    num = a[0]
    for i in range(k-1):
        num = a[num-1]
    print(num)
    exit()
elif lstart == 0:
    k = (k-lstart)%lroop
    num = 1
    for i in range(k):
        num = a[num-1]
    print(num)
    exit()
else:
    k = (k-lstart)%lroop
    num = a[0]
    if lstart > 0:
        for i in range(lstart-1):
            num = a[num-1]
    for i in range(k):
        num = a[num-1]
    print(num)
    exit()

Buggy submission (verdict: Runtime Error):
import collections
n,k = map(int,input().split())
a = list(map(int,input().split()))
list = [1]
i = 0
num = a[0]
for i in range(3*n):
    if i == n:
        i = 0
    list.append(num)
    num = a[num-1]

cnt = collections.Counter(list)
lstart = len(cnt.most_common()[-1])
lroop = len(set(list))-lstart

if k <= lstart:
    num = a[0]
    for i in range(k-1):
        num = a[num-1]
    print(num)
    exit()
else:
    k = (k-lstart)%lroop
    num = a[0]
    for i in range(lstart-1):
        num = a[num-1]
    for i in range(k):
        num = a[num-1]
    print(num)
    exit()

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
a = list(map(int,input().split()))
num = [a[0]]
while True:
    for i in range(len(num)-1):
        if num[i] == num[-1]:
            break
    num.append(a[num[-1]])
index = index(a[-1])
lstart = len(a[:index-1])
lroop = len(a[index])
number = (k-lstart)%lroop
for i in range(lroop-1):
    number = a[number-1]
    print(number)
print(number)
Problem p02691 (python)

Fixed submission:
from collections import Counter
n = int(input())
ai = list(map(int,input().split()))
pl = []
mi = []
for i in range(n):
    pl.append(i+ai[i])
    mi.append(i-ai[i])
x = Counter(pl)
y = Counter(mi)
cnt = 0
for i in x.keys():
    cnt += x[i]*y[i]
print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
li = []
for i in range(n):
    if a[i] < 200000:
        li.append([a[i],i])
li.sort()
cnt = 0
for i in range(n-1):
    j = i+1
    while j <= n-1 and li[i][0] + li[j][0] < 200000:
        if abs(li[j][1]-li[i][1]) == li[i][0] + li[j][0]:
            cnt += 1
        j += 1
print(cnt)
Problem p02706 (python)

Fixed submission:
n,m = map(int,input().split())
a = list(map(int,input().split()))
sum = sum(a)
if n-sum >= 0:
	print(n-sum)
else:
	print(-1)

Buggy submission (verdict: Runtime Error):
n,m = map(int(input().split()))
a = list(map(int,input().split()))
sum = sum(a)
if n-sum >= 0:
	print(n-sum)
else:
	print(-1)
Problem p02731 (python)

Fixed submission:
l = int(input())
volume = (l/3)**3
print(volume)

Buggy submission (verdict: Runtime Error):
l = input()
volume = l/3**3
print(volume)
Problem p02803 (python)

Fixed submission:
import copy
h,w = map(int,input().split())

s = [['#' for _ in range(w+2)]]
for i in range(h):
    si = ['#']
    sij = list(input())
    si.extend(sij)
    si.append('#')
    s.append(si)
s.append(['#' for _ in range(w+2)])

def bfs(i,j):
    root = copy.deepcopy(s)
    q = []
    q.append([i,j])
    root[i][j] = 0
    while q:
        ij = q.pop(0)
        i = ij[0]
        j = ij[1]
        
        if root[i-1][j] == '.': #左
            q.append([i-1,j])
            root[i-1][j] = root[i][j] + 1
        if root[i+1][j] == '.': #右
            q.append([i+1,j])
            root[i+1][j] = root[i][j] + 1
        if root[i][j+1] == '.': #上
            q.append([i,j+1])
            root[i][j+1] = root[i][j] + 1
        if root[i][j-1] == '.': #下
            q.append([i,j-1])
            root[i][j-1] = root[i][j] + 1
    max = 0
    for i in range(1,h+1):
        for j in range(1,w+1):
            if root[i][j] != '#' and root[i][j] > max:
                max = root[i][j]
    return max

ans = -1
for i in range(1,h+1):
    for j in range(1,w+1):
        if s[i][j] == '.':
            k = bfs(i,j)
            if ans < k:
                ans = k
print(ans)

Buggy submission (verdict: Runtime Error):
import copy
h,w = map(int,input().split())

s = [['#' for _ in range(w+2)]]
for i in range(h):
    si = ['#']
    sij = list(input())
    si.extend(sij)
    si.append('#')
    s.append(si)
s.append(['#' for _ in range(w+2)])

def bfs(i,j):
    root = copy.deepcopy(s)
    q = []
    q.append([i,j])
    root[i][j] = 0
    while q:
        ij = q.pop(0)
        i = ij[0]
        j = ij[1]
        
        if root[i-1][j] == '.': #左
            q.append([i-1,j])
            root[i-1][j] = root[i][j] + 1
        if root[i+1][j] == '.': #右
            q.append([i+1,j])
            root[i+1][j] = root[i][j] + 1
        if root[i][j+1] == '.': #上
            q.append([i,j+1])
            root[i][j+1] = root[i][j] + 1
        if root[i][j-1] == '.': #下
            q.append([i,j-1])
            root[i][j-1] = root[i][j] + 1
    max = 0
    for i in range(1,h+1):
        for j in range(1,w+1):
            if root[i][j] != '#' and root[i][j] > max:
                max = root[i][j]
    return max

ans = -1
for i in range(1,h+1):
    for j in range(1,w+1):
        k = bfs(i,j)
        if ans < k:
            ans = k
print(ans)
Problem p02784 (python)

Fixed submission:
H, N = map(int, input().split())
A_list = []
for i in range(1, N+1):
    A_list.append("A_" + str(i))

A_list = map(int, input().split())
A_total = sum(A_list)

if A_total >= H:
    print("Yes")
else:
    print("No")

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

Damage = []
for i in range(1,N+1):
    Ai = map(int, input().split())
    Damage.append(Ai)
Total_Damage = sum(Damage)

if H <= Total_Damage:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
H, N = map(int, input().split())
A_list = []
for i in range(1, N+1):
    A_list.append("A_" + str(i))

A_list = int(input())
A_total = sum(A_list)

if A_total >= H:
    print("Yes")
else:
    print("No")

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

Damage = []
for i in range(1,N+1):
    Ai = int(input())
    Damage.append(Ai)
Total_Damage = sum(Damage)

if H <= Total_Damage:
    print("Yes")
else:
    print("No")

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


for i in range(1,N+1):
    Damage = []
    Ai = int(input())
    Damage.append(Ai)
Total_Damage = sum(Damage)

if H <= Total_Damage:
    print("Yes")
else:
    print("No")
Problem p02657 (python)

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

print(A * B)

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

Fixed submission:
import numpy as np
 
N, M = map(int, input().split())
A = []
A = map(int, input().split())
 
dif = N - sum(A)
 
if dif >= 0:
  print(dif)
else:
  print('-1')

Buggy submission (verdict: Runtime Error):
int a[10010];
int main(){
    int n,m;
    scanf("%d%d",&n,&m);
    for(int i=0;i<m;i++)scanf("%d",&a[i]);
    int s=0;
    for(int i=0;i<m;i++)s+=a[i];
    if(s>n){
        printf("-1\n");
    }else{
        printf("%d\n",n-s);
    }
}
Problem p03455 (python)

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

sum = a*b
if sum % 2 ==0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
a, b = [int(e) for e in raw_input().split()]
if a * b % 2 == 0:
  print 'Even'
else:
  print 'Odd'
Problem p02909 (python)

Fixed submission:
S = input()

if S == 'Sunny':
    print('Cloudy')

elif S == 'Cloudy':
    print('Rainy')

elif S =='Rainy':
    print('Sunny')

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

if S == 'Sunny':
    print('cloudy')

elif S == 'cloudy':
    print('Rainy')

elif:
    print('Sunny')

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

if S == 'Sunny':
    answer =('cloudy')

elif S == 'cloudy':
    answer =('Rainy')

elif S == 'Rainy':
    answer =('Sunny')

print=answer
Problem p03351 (python)

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 submission (verdict: Runtime Error):
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 submission (verdict: Runtime Error):
a,b,c,d = map(int,input(),split())

if abs(a-b) <= d:
    print('Yes')

elif abs(a-b) <= d and abs(b-c) <= d:
    print('Yes')

else:
    print('No')

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

if abs(a-b) <= d:
    print('YES')

elif abs(a-b) <= d and abs(b-c) <= d:
    print('YES')

else:
    print('NO')
Problem p02657 (python)

Fixed submission:
#   a169
#  値 A × B を整数として出力せよ。

#   入力（スペース区切りの2整数を受け取る）
a, b = map(int, input().split())
#   print(a, b)

#   処理
answer = a * b

#   出力
print(answer)

Buggy submission (verdict: Runtime Error):
   a169
#  値 A × B を整数として出力せよ。

#   入力（スペース区切りの2整数を受け取る）
a, b = map(int, input().split())
#   print(a, b)

#   処理
answer = a * b

#   出力
print(answer)
Problem p02784 (python)

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

if sum(A) >= H:
    print("Yes")
else:
    print("No")

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

if sum(A) => H:
    print("Yes")
else:
    print("No")
Problem p03085 (python)

Fixed submission:
b = str(input())

if b == "A":
    print("T")
if b == "T":
    print("A")
if b == "C":
    print("G")
if b == "G":
    print("C")

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

if b == A:
    print("T")
if b == T:
    print("A")
if b == C:
    print("G")
if b == G:
    print("C")
Problem p03351 (python)

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

x = abs(a - b)
y = abs(b - c)
z = abs(a - c)

if d >= z:
    print("Yes")
elif d >= x and d >= y:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
if d >= z:
    print("Yse")
elif d >= x and d >= y:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
if z =< d:
    print("Yse")
elif x =< d and y =< d:
    print("Yes")
else:
    print("No")
Problem p03597 (python)

Fixed submission:
N = int(input())
A = int(input())

print(N ** 2 - A)

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

print(N**2 - A)

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

print(N**2 - A)

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

print(N ** 2 - A)

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

print(N ** 2 - A)
Problem p03795 (python)

Fixed submission:
N = int(input())
x = N * 800
y = N // 15 * 200
print(x - y)

Buggy submission (verdict: Runtime Error):
x = N * 800
y = (N // 15) * 200
print(x - y)
Problem p03844 (python)

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

if op == "+":
    print(A + B)
if op == "-":
    print(A - B)

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

if op == "+":
    print(A + B)
if op == "-":
    print(A - B)

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

if op == "+":
    print(A + B)
if op == "-":
    print(A - B)
Problem p02657 (python)

Fixed submission:
# 169A
#　1．入力をちゃんと受け取ること
# ex:「2 5」=>a=2,b=5と変数を作成する
# スペース区切りの入力を整数として受け取る例
a, b = map(int, input().split())
# print(a)
# print(b)

# 2．目的通りの計算をする
# ex:2つの整数AとBの掛け算をやる
answer = a * b

# 3.計算結果を出力する
print(answer)

Buggy submission (verdict: Runtime Error):
 169A

#　1．入力をちゃんと受け取ること
# ex:「2 5」=>a=2,b=5と変数を作成する
# スペース区切りの入力を整数として受け取る例
a, b = map(int, input().split())
# print(a)
# print(b)

# 2．目的通りの計算をする
# ex:2つの整数AとBの掛け算をやる
answer = a * b

# 3.計算結果を出力する
print(answer)
Problem p02657 (python)

Fixed submission:
n,m=input().split()
print(int(n)*int(m))

Buggy submission (verdict: Runtime Error):
n,m=int(input().split())
print(n*m)
Problem p03399 (python)

Fixed submission:
# 092

# 1.値を正しく取得
a =int(input())
b =int(input())
c =int(input())
d =int(input())

# 2.正しく処理
if a > b :
    resalt1=int(b)
else :
    resalt1=int(a)

if c > d :
    resalt2=int(d)
else :
    resalt2=int(c)

print(resalt1 + resalt2)

Buggy submission (verdict: Runtime Error):
# 092

# 1.値を正しく取得
a, b, c, d = (int(x) for x in input().split())

# 2.正しく処理
gokei1 = a + b
gokei2 = a + c
gokei3 = a + d
gokei4 = b + c
gokei5 = b + d
gokei6 = c + d

resalt = [gokei1,gokei2,gokei3,gokei4,gokei5,gokei6]
print(min(resalt))
Problem p03826 (python)

Fixed submission:
# 052

# 1.値を正しく取得
a,b,c,d=(int(x) for x in input().split())

# 2.正しく処理

menseki1 = a * b
menseki2 = c * d

if menseki1 > menseki2:
    print(menseki1)

elif menseki1 < menseki2:
    print(menseki2)

else :
    print(menseki1)

Buggy submission (verdict: Runtime Error):
# 052

# 1.値を正しく取得
A = int(input())
B = int(input())
C = int(input())
D = int(input())

# 2.正しく処理

menseki1 = A * B
print(menseki1)
menseki2 = C * D
print(menseki2)

if menseki1 > menseki2:
    print(menseki1)

elif menseki1 < menseki2:
    print(menseki2)

else :
    print(menseki1)

Buggy submission (verdict: Runtime Error):
# 052

# 1.値を正しく取得
x1 = int(input())
y1 = int(input())
x2 = int(input())
y2 = int(input())

# 2.正しく処理

menseki1 = x1 * y1
print(menseki1)
menseki2 = x2 * y2
print(menseki2)

if menseki1 > menseki2:
    print(menseki1)

elif menseki1 < menseki2:
    print(menseki2)

else :
    print(menseki1)

Buggy submission (verdict: Runtime Error):
#052

#1.値を正しく取得
x1=int(input())
y1=int(input())
x2=int(input())
y2=int(input())

#2.正しく処理

menseki1 = x1 * y1
menseki2 = x2 * y2

if menseki1 >=menseki2  :
  print(menseki1)
  
else :
  print(menseki2)
Problem p02657 (python)

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

# 処理
answer = a * b

# 出力
print(answer)

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

Buggy submission (verdict: Runtime Error):
A,B=map(int,input(),split())
print(A*B)
Problem p02700 (python)

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

while True:
    C -= B
    A -= D

    if C <= 0:
        result = "Yes"
        break
    if A <= 0:
        result = "No"
        break

print(result)

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

int_A=int(A)
int_B=int(B)
int_C=int(C)
int_D=int(D)

while True:
    int_C-=int_B
    int_A-=int_D
    if int_C<=0:
        result="Yes"
        break
    if int_A<=0:
        result="No"
        break

print(result)

Buggy submission (verdict: Runtime Error):
A=input("高橋君のHP:")
B=input("高橋君のATK:")
C=input("青木君のHP:")
D=input("青木君のATK:")

int_A=int(A)
int_B=int(B)
int_C=int(C)
int_D=int(D)

while True:
    int_C-=int_B
    int_A-=int_D
    if int_C<=0:
        result="Yes"
        break
    if int_A<=0:
        result="No"
        break

print(result)

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

int_A=int(A)
int_B=int(B)
int_C=int(C)
int_D=int(D)

while True:
    int_C-=int_B
    int_A-=int_D
    if int_C<=0:
        result="YES"
        break
    if int_A<=0:
        result="NO"
        break

print(result)

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

int_A=int(A)
int_B=int(B)
int_C=int(C)
int_D=int(D)

while True:
    int_C-=int_B
    int_A-=int_D
    if int_C<=0:
        result="YES"
        break
    if int_A<=0:
        result="NO"
        break

print(result)

Buggy submission (verdict: Runtime Error):
A=input("高橋君のHP:")
B=input("高橋君のATK:")
C=input("青木君のHP:")
D=input("青木君のATK:")

int_A=int(A)
int_B=int(B)
int_C=int(C)
int_D=int(D)

while True:
    int_C-=int_B
    int_A-=int_D
    if int_C<=0:
        result="YES"
        break
    if int_A<=0:
        result="NO"
        break

print(result)
Problem p03085 (python)

Fixed submission:
b=input()

if b=='A':
    print('T')
elif b=='C':
    print('G')
elif b=='G':
    print('C')
else:
    print('A')

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

if b=='A':
    print('T')
elif b=='C':
    print('G')
elif b==('G')
    print('C')
else:
    print('A')
Problem p03351 (python)

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

Buggy submission (verdict: Runtime Error):
if d >= abs(a - c) or (d >= abs(a - b) and d >= abs(b - c)):
    print('Yes')
else:
    print('No')
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
answer = a * b
if answer % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
a,b=input(int())
if (a*b)%2==0:
    print("偶数")
else:
    print("奇数")
Problem p03795 (python)

Fixed submission:
import math

N=int(input())

x=800*N
y=(math.floor(N/15))*200

print(x-y)

Buggy submission (verdict: Runtime Error):
test
Problem p03351 (python)

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 submission (verdict: Runtime Error):
if abs(a - c) <= d:
    print('Yes')
elif abs(a - b) <= d and abs(b - c) <= d:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
if abs(a - c) <= d:
    print('Yes')
elif abs(a - b) <= d and abs(b - c) <= d:
    print('Yes')
else:
    print('No')
Problem p03351 (python)

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

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
 
if c - a <= d:
    print("Yes")
elif b - a <= d and c - b <= d:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
 
if c - a <= d:
    print("Yes")
elif b - a <= d and c - b <= d:
    print("Yes")
else:
    print("No"
Problem p03610 (python)

Fixed submission:
s = str(input())
 
for i in range(len(s)):
    if i % 2 == 0:
        print(s[i], end = '')

Buggy submission (verdict: Runtime Error):
s = input()
for i in range(0, len(s), 2):
  print(s[i], end = '')
s = input()
for i in range(0, len(s), 2):
  print(s[i], end = '')
Problem p02909 (python)

Fixed submission:
S = input()

if S == 'Sunny':
    print("Cloudy")

elif S == 'Cloudy':
    print("Rainy")

elif S == 'Rainy':
    print("Sunny")

Buggy submission (verdict: Runtime Error):
today_weather = int()
 
if today_weather = ‘Sunny’:
    tomorrow_weather = "Cloudy"
 
elif today_weather = ‘Cloudy’:
    tomorrow_weather = "Rainy"
 
elif today_weather = ‘Rainy’:
    tomorrow_weather = "Suuny"
 
print(tomorrow_weather)

Buggy submission (verdict: Runtime Error):
today_weather = int()

if today_weather = ‘Sunny’:
    tomorrow_weather = ‘Cloudy’

elif today_weather = ‘Cloudy’:
    tomorrow_weather = ‘Rainy’

elif today_weather = ‘Rainy’:
    tomorrow_weather = ‘Suuny’

print(tomorrow_weather)
Problem p03136 (python)

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

if max(L) < (sum(L) - max(L)):
    print('Yes')
else:
    print('No')

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

if max(L) - (sum(L) - max(L)) < 0:
    print('Yes')
else:
    print('No')

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

if max(L) - (sum(L) - max(L)) < 0:
    print('Yes')
else:
    print('No')
Problem p03563 (python)

Fixed submission:
R = int(input())
G = int(input())

print(2 * G - R)

# 高橋君が取るべきレーティングをXと置くと　(R + X) / 2 = G となる。
# 式を変形すると　X = 2 * G - R となる。これが高橋君が取るべきレーティング。

Buggy submission (verdict: Runtime Error):
https://atcoder.jp/contests/abc076/submissions/16272116
Problem p04029 (python)

Fixed submission:
N = int(input())

answer = (N + 1 ) * N // 2

print(answer)

Buggy submission (verdict: Runtime Error):
N = int(input())
Print (N * (N + 1) // 2)
Problem p02687 (python)

Fixed submission:
s=input()

if (s=='ABC'):
    print('ARC')
else:
    print('ABC')

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

if (S=ABC):
    print('ARC')
else:
    print('ABC')
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
Problem p03423 (python)

Fixed submission:
N= int(input())

print(N//3)

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

if N=
Problem p03455 (python)

Fixed submission:
a, b = map(int,input().split())
if a * b % 2 == 0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
int main (){
int a ,b;
cin >>a > >b;
int c = a * b ;
if ( c %2 == 0) puts (" Even ");
else puts (" Odd ");
return 0;
Problem p02706 (python)

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

enjoy = N - sum(A)

if N >= sum(A):
    print(enjoy)

else:
    print('-1')

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

enjoy = N - sum(A)

if N >= sum(A):
    print(enjoy)

else:
    print('-1')
Problem p02993 (python)

Fixed submission:
s = list(input())

if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')

Buggy submission (verdict: Runtime Error):
a = range(1, 8 + 1)
    b = range(1, 8 + 1)
    c = range(1, 8 + 1)
    d = range(1, 8 + 1)

    if a == b or b == c or c == d:
        return ('Bad')
    else:
        return ('Good')
Problem p03385 (python)

Fixed submission:
s = list(input())
s.sort()
if s == ['a', 'b', 'c']:
    print('Yes')
else:
    print('No')

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

if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('No')
else:
    print('Yes')
Problem p03455 (python)

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

if (a * b) % 2 == 0:
    print('Even')
else:
    print('Odd')

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

if (a * b) % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
a = int(input())
a >= 1
b = int(input())
b <= 10000

if (a * b) % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
a = int(input())
a >= 1
b = int(input())
b <= 10000

if a * b % 2 == 0:
    print('Even')
else:
    print('Odd')

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

if a * b % 2 == 0:
    print('Even')
else:
    print('Odd')
Problem p03423 (python)

Fixed submission:
N = int(input())

x=N//3              #生徒の人数で割ったものがグループ数
                    #//で小数点以下を削除している
print(x)

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

if N>=3:  　　　　　   #生徒数が３人以上が必須条件
    print(int(N/3))　 #生徒数を最低条件の３人で割る
else:
    print(0)
Problem p03657 (python)

Fixed submission:
a, b = map(int, input().split())
# intは入力に対しての関数、出力ではない

if (a+b)%3 == 0:
    print("Possible")
elif a%3 == 0:
    print("Possible")
elif b%3 == 0:
    print("Possible")
else:
    print("Impossible")

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
# intは入力に対しての関数、出力ではない

if (a+b)%3 => 0:
    print("Possible")
elif a%3 => 0:
    print("Possible")
elif b%3 => 0:
    print("Possible")
else:
    print("Impossible")
Problem p02612 (python)

Fixed submission:
N=int(input())
if  N % 1000 == 0:
  print(0)
else:
    print(1000 - N % 1000)

Buggy submission (verdict: Runtime Error):
a=input()
b=int(a)
c=b%1000
if c=0:
  print(0)
  else print(c)

Buggy submission (verdict: Runtime Error):
if N%1000=0:
  print(0)
  else:
    print(1000-N%1000)

Buggy submission (verdict: Runtime Error):
y= N%1000
print(y)

Buggy submission (verdict: Runtime Error):
y= N%%1000
print(y)