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

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

i=1
while True:
    ii=i * i
    if ab == ii:
        print("Yes")
        break

    if ii > ab:
        print("No")
        break
    i += 1

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

i=1
while True:
    ii=i * i
    if ab == ii:
        print("Yes")
        break

    if ii > ab:
        print("No")
        break
    i += 1

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

i=1
while True:
    ii=i * i
    if ab == ii:
        print("Yes")
        break

    if ii > ab:
        print("No")
    i += 1
Problem p03478 (python)

Fixed submission:
n, a, b = map(int, input().split())
ans = 0
for i in range(n+1):
    if a <= sum(list(map(int, list(str(i))))) <= b:
        ans += i
print(ans)

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

for i in range(n+1):
    if a <= sum(list(str(i))) <= b:
            ans += i
print(ans)
Problem p04043 (python)

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

if ABC[0]==5 and ABC[1]==5 and ABC[2]==7:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
n,l=[int(x) for x in input().split()]
b=[input() for x in range(n)]
b.sort()
print(''.join(b))

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

if len(A)=7 and len(B)=5 and len(C)=5 :
	print("YES")
else:
  	print("NO")
  
if len(A)=5 and len(B)=7 and len(C)=5 :
	print("YES")
else:
  	print("NO")
    
if len(A)=5 and len(B)=5 and len(C)=7 :
	print("YES")
else:
  	print("NO")
Problem p03838 (python)

Fixed submission:
input_nums = [int(c) for c in input().split(" ")]
x = input_nums[0]
y = input_nums[1]
ad = 0

if x > y:
  ad = 2
if (x < 0 and y > 0) or (x >= 0 and y <= 0):
  ad = 1
if x == y:
  ad = 0

x, y = abs(x), abs(y)

print(abs(x-y)+ad)

Buggy submission (verdict: Runtime Error):
input_nums = [int(c) for c in input().split(" ")]
x = input_nums[0]
y = input_nums[1]
ad = 0

if x = y:
  print(0)
  return

if x > y:
  ad = 2
if (x < 0 and y > 0) or (x >= 0 and y <= 0):
  ad = 1
  
x, y = abs(x), abs(y)

print(abs(x-y)+ad)
Problem p03937 (python)

Fixed submission:
input_nums = [int(c) for c in input().split(" ")]
h = input_nums[0]
w = input_nums[1]

count = 0

for i in range(h):
	for c in input():
		if c == "#":
			count += 1

if count == h+w-1:
	print("Possible")
else:
	print("Impossible")

Buggy submission (verdict: Runtime Error):
input_nums = [int(n) for n in input().slice(“ ”)]
h = input_nums[0]
w = input_nums[1]

count = 0

for i in range(h):
	for c in input():
		if c == “#”:
			count += 1

if count == h+w-1:
	print(“Possible”)
else:
	print(“Impossible”)
Problem p03448 (python)

Fixed submission:
A = input()
B = input()
C = input()
X = input()

A = int(A)
B = int(B)
C = int(C)
X = int(X)

res = int(0)

for x in range(A+1):
	for y in range(B+1):
		for z in range(C+1):
			total = int(500*x + 100*y + 50*z)
			if(total == X):
				res+=1
			
print(res)

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

res = int(0)

for x in range(A+1):
	for y in range(B+1):
		for z in range(C+1):
			total = int(500*x + 100*y + 50*z)
			if(total == X):
				res+=1
			
print(res)
Problem p03494 (python)

Fixed submission:
import numpy as np

a = int(input())
b = np.array([int(x) for x in input().split()])

if(a!=len(b)):
	print('the array size is different')
else:
	c = b%2
	d = b/2
	count = 0
	while sum(c)==0:
		count += 1
		c = d%2
		d = d/2
	print(count)

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

a = int(input())
b = np.array([int(x) for x in input().split()])

if(a!=len(b)):
	print('the array size is different')
else:
	c = b%2
	d = b/2
	while sum(c)==0:
		COUNTS = int(1)
		COUNTS += 1
		c = d%2
		d = d/2

print(COUNTS)
Problem p03693 (python)

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

A = 100*r + 10*g + b

if(A % 4 == 0):
	print("YES")
else:
	print("NO")

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

A = 100*r + 10*g + b

if(A % 4 == 0):
	print("YES")
else:
	print("NO")

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

A = 100*r + 10*g + b

if(A % 4 == 0):
	print("Yes")
else:
	print("No")

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

A = r + g + b

if(A % 4 == 0):
	print("Yes")
else:
	print("No")

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

A = r + g + b

if(A % 4 == 0):
	print("Yes")
else:
	print("No")
Problem p03543 (python)

Fixed submission:
a,b,c,d=map(int,list(input()))
if a==b==c:
  print("Yes")
elif b==c==d:
  print("Yes")
elif a==b==c==d:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,list(input()))
if a==b==c:
  pritn("yes")
elif b==c==d:
  print("yes")
elif a==b==c==d:
  print("yes")
else:
  print("No")
Problem p03434 (python)

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

sorted_A = sorted(A, reverse=True)

alice = 0
bob = 0
for index, point in enumerate(sorted_A):

  # Alice
  if (index + 1) % 2 != 0:
    alice = alice + point
  
  # Bob
  else:
    bob = bob + point
 
answer = alice - bob

print(answer)

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

sorted_A = A.sort().reverse()

alice = 0
bob = 0
for index, point in sorted_A:

  # Alice
  if (index + 1) % 2 == 0:
    alice = alice + point
  
  # Bob
  else:
    bob = bob + point

answer = alice - bob

print(answer)
Problem p03434 (python)

Fixed submission:
n = int(input())
a = sorted(list(map(int,input().split())), reverse=True)
print(sum(a[::2]) - sum(a[1::2]))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = sorted(list(map(int,input().split())), reverse=True)
print(aum(a[::2]) - sum(a[1::2]))
Problem p03478 (python)

Fixed submission:
n, a, b = map(int, input().split())
ans = 0
for i in range(n+1):
    if a <= sum(list(map(int, list(str(i))))) <= b:
        ans += i
print(ans)

Buggy submission (verdict: Runtime Error):
n, a, b, = map(int,input().split())
ans = 0
for i in range(n+1):
    if a <= sum(list(map(int,list(str(i))))) <= b
        ans += i
print(ans)

Buggy submission (verdict: Runtime Error):
n, a, b, = map(int,input().split())
ans = 0
for i in range(n+1):
    if a <= sum(list(map(int,list(str)))):
        ans += i
print(ans)
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,b = map(int, input().split())
# 積の計算、判定
if (a * b) % 2 == 0:
  print('Even')
else:
  ptint('Odd')
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
import sys
a,b=input().split()
if (a * b ) % 2 == 0:
  print "Even"
else:
  print "Odd"

Buggy submission (verdict: Runtime Error):
a,b=input().split()
if (a * b ) % 2 == 0:
  print "Even"
else:
  print "Odd"
Problem p03433 (python)

Fixed submission:
p = int(input())
one = int(input())
if (p%500)<=one:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
print("No" if ((N % 500)>=A else "Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
print("No" if ((N % 500)>=N else "Yes")
Problem p03455 (python)

Fixed submission:
a,b = map(int,input().split())
print('Odd' if a&b&1 else 'Even')

Buggy submission (verdict: Runtime Error):
a, b = input().split()
if (a*b)%2==1:
  print("odd")
else:
  print("Even")
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
c = a * b
if (c%2 = 0):
	print('Even')
else:
	print('Odd')

Buggy submission (verdict: Runtime Error):
a, b = int(input().split())
c = a * b
if(c%2 = 0):
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
if ((a * b)%2 == 0):
	print('Even')
else:
	print('Odd')
Problem p03693 (python)

Fixed submission:
r, g, b = map(int, input().split())
rgb = int(str(r)+str(g)+str(b))
if rgb%4 == 0:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
r，g，b = map(int,input().split())
x=r*100+g*10+b
if x%4==0
 print("YES")
else
 print("NO")
Problem p03448 (python)

Fixed submission:
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
a, b, c, x = map(int, [input() for i in range(4)])
ans = 0
for i in range(a+1):
    for j in range(b+1):
        for K in range(c+1):
            if i * 500 + j * 100 + k * 50 == x:
                ans += 1
print(ans)
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, imput().split())
seki = a*b
if seki % 2 == 0:
	print('Even')
else:
	print('Odd')

Buggy submission (verdict: Runtime Error):
a, b = map(int, imput().split())
seki = a*b
if seki % 2 == 0;
	print('Even')
else:
	print('Odd')
Problem p03471 (python)

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

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

Buggy submission (verdict: Runtime Error):
n, y = map(int, input().split())
for i in range(n + 1)
    for j in range(n - i + 1):
        if i * 10000 + j * 5000 + (n - i - j) * 1000 == y:
            print(i, j, n - i - j)
            exit()
print("-1 -1 -1")
Problem p03494 (python)

Fixed submission:
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))

Buggy submission (verdict: Runtime Error):
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    b = len(bin(i)) - bin(i).rfind("1") - 1)
    ans = min(ans, b)
print(round(ans))
Problem p03470 (python)

Fixed submission:
N = input()

a = []
for i in range(int(N)):
  a.append(input())

cnt = {s:(a.count(s)-1) for s in a}

print(int(N)-sum([int(j) for j in cnt.values()]))

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

a = []
for i in range(int(N)):
  a.append(input())

cnt = []
cnt2 = 0
while(int(N)-cnt2 != 0):
  s = a.count(a[0])-1
  cnt.append(s)
  a.remove(a[0])
  cnt2 += s+1
su = sum(cnt)
print(int(N)-su)

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

a = []
for i in range(int(N)):
  a.append(input())

cnt = []
cnt2 = 0
while(int(N)-cnt2 != 0):
  s = a.count(a[0])-1
  cnt.append(s)
  a.remove(a[0])
  cnt2 += s+1
  print(cnt)
su = sum(cnt)
print(int(N)-su)
Problem p03493 (python)

Fixed submission:
s=input()
a=[int(x) for x in s]
print(sum(a))

Buggy submission (verdict: Runtime Error):
def check(a,cnt):
  b = [int(x)%2 for x in a]
  if 1 in b:
    return 0,cnt
  else :
    cnt +=1
    b = [int(x)/2 for x in a]
    return 1,cnt
 
N = input()
a = input().split()
cnt = 0
while(1):
  m,cnt = check(a,cnt)
  if m == 0:
    print(cnt)
  else :
    continue
Problem p03494 (python)

Fixed submission:
def check(a,cnt):
  c = [int(x)%2 for x in a]
  if 1 in c:
    return 0,cnt,a
  else :
    cnt +=1
    b = [int(x)/2 for x in a]
    return 1,cnt,b
 
N = input()
a = input().split()
cnt = 0
m = 1
while(m != 0):
  m,cnt,a = check(a,cnt)
  if m == 0:
    print(cnt)
  else :
    continue

Buggy submission (verdict: Runtime Error):
def check(a,cnt)
  b = [int(x)%2 for x in a]
  if 1 in b:
    return 0,cnt
  else :
    cnt +=1
    b = [int(x)/2 for x in a]
    return 1,cnt

N = input()
a = input().split()
cnt = 0
while(1):
  m,cnt = check(a,cnt)
  if m == 0:
    print(cnt)
  else :
    continue
Problem p03854 (python)

Fixed submission:
S=str(input()) #Sの入力
Smojisuu=len(S)
c=S.count("eraser")
S=S.replace("eraser","xxxxxx",c)
d=S.count("erase")
S=S.replace("erase","xxxxx",d)
e=S.count("dreamer")
S=S.replace("dreamer","xxxxxxx",e)
f=S.count("dream")
S=S.replace("dream","xxxxx",f)
g=S.count("x")
if len(S)>g:
  print("NO")
elif len(S)==g:
  print("YES")
else:
  print("error")

Buggy submission (verdict: Runtime Error):
T = input()
lenT = len(T)
a = T.replace("eraser","xxxxxx")
b = a.replace("dreamer","xxxxxxx")
c = b.replace("erase","xxxxx")
d = c.replace("dream","xxxxx")
D = d.count("x")
if D == lenT:
  print("YES")
else D < lenT:
  print("NO")

Buggy submission (verdict: Runtime Error):
T = input()
 
w0 = "dream"
w1 = "dreamer"
w2 = "erase"
w3 = "eraser"
 
dict_sen = {0:w0,1:w1,2:w2,3:w3}
 
dp = ""
cnt = 0
cnt1= 0
F = 0
while(cnt < time2):
  cnt += 1
  for i in range(4):
    if T[F:F+len(dict_sen[i])] == dict_sen[i]:
      dp.extend(dict_sen[i])
      F = len(dp)
      cnt1 += 1
      break
 
if dp != T:
  print("NO")
else :
  print("YES")

Buggy submission (verdict: Runtime Error):
T = input()
 
w0 = "dream"
w1 = "dreamer"
w2 = "erase"
w3 = "eraser"
 
dict_sen = {0:w0,1:w1,2:w2,3:w3}
 
dp = ""
cnt = 0
cnt1= 0
time = ceil(len(T)/5)
time2 = floor(len(T)/7)

while(cnt < time):
  cnt += 1
  for i in range(4):
    if T[:len(dict_sen[i])] == dict_sen[i]:
      T = T[len(dict_sen[i]):]
      cnt1 += 1
      break

if cnt1 < time2:
  print("NO")
else :
  print("YES")
Problem p03455 (python)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""


b, c = map(int, input().split())

s=b*c

if s%2==1:
  print("Odd")
else:
  print("Even")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""


b, c = map(int, input().split())

s=b*c

if s%2==1:
  print("Odd")
else:
  prinnt("Even")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""


a ,b=map( input().split())

s=a*b

if s%2==1:
  print("Odd")
else:
  print("Even")
Problem p03473 (python)

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

a=int(input())

s=48-a

print(s)

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

a=input()

s=48-a

print(s)

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

int a=input()

print(48-a)
Problem p03477 (python)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""


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

s1=a+b
s2=c+d

if s1>s2:
  print("Left")
elif s1==s2:
  print("Balanced")
else:
  print("Right")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""


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

s1=a+b
s2=c+d

if s1>s2:
  print("Left")
elseif s1==s2:
  print("Balanced")
else:
  print("Right")
Problem p03485 (python)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sat Nov  3 09:19:07 2018

@author: sk
"""

     
      
b, c = map(int, input().split())
     
s=0.5*(b+c)
     
d = int(s)
    
if s-d > 0:
    v=int(d+1)
else :
    v=int(d)
print(v)

Buggy submission (verdict: Runtime Error):
    # -*- coding: utf-8 -*-
      
      
    b, c = map(int, input().split())
     
    s=0.5*(b+c)
     
    d = int(s)
    
    if s-d > 0:
      v=int(d+1)
    else :
      v=int(d)
    print(v)

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

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

Buggy submission (verdict: Runtime Error):
    # -*- coding: utf-8 -*-
      
      
    b, c = map(int, input().split())
     
    s=0.5*(b+c)
     
    d = int(s)
    
    if s-d != 0:
        v=d+1
    else :
        v=d
        
    print(v)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
      
      
b, c = map(int, input().split())
   
s=0.5*(b+c)
     
d =int(s)
     
if (s-d != 0):
v=d+1
     
print(v)

Buggy submission (verdict: Runtime Error):
    # -*- coding: utf-8 -*-
      
      
    b, c = map(int, input().split())
     
    double s =0.5*(b+c)
     
    d =int(s)
     
    v=d+1
     
    print(v)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
  
  
b, c = map(int, input().split())

s=0.5*(b+c)

int d = s

v=d+1

print(v)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
  
  
b, c = map(int, input().split())

s=0.5*(b+c)

int d = s

v=d

print(v)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
  
  
b, c = map(int, input().split())

s=0.5*(b+c)

int d = s

v=d+1

print(v)

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


a, b = map(int, input().split())

s=0.5*(a+b)

int v= int(s)+1

print(v)

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


int a,b=map(input().split())


s=0.5*(a+b)

int v= int(s)+1

print(v)

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


a=int(input())
b=int(input())


s=0.5*(a+b)

int v= int(s)+1

print(v)

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

a=int(input())
b=int(input())

s=(a+b)*0.5

v=int(s)+1

print(v)
Problem p03493 (python)

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

a =str( input())

char_list = list(a)

b=int( char_list[0])
c=int( char_list[1])
d=int( char_list[2])

s=b+c+d

print(s)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sat Nov  3 09:19:07 2018

@author: sk
"""

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

int s=0

if a==1:
  s=s+1

if b==1:
  s=s+1

if c==1:
  s=s+1
  

print(s)
Problem p03543 (python)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""

# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""


b =str( input())

a = list(b)



if b[0]==b[1]:
  if b[1]==b[2]:
    print("Yes")
  else :
    print("No")

elif b[1]==b[2]:
  if b[2]==b[3]:
    print("Yes")
  else :
    print("No")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""

# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""


b =str( input())

a = list(b)



if b[0]==b[1]:
  if b[1]==b[2]:
    print("Yes")
  else :
    print("No")

elif b[1]==b[2]:
  if b[2]==b[3]:
    print("Yes")
  else :
    print("No")
else:
print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""

# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""


b =str( input())

a = list(b)



if b[0]==b[1]:
  if b[1]==b[2]:
    print("Yes")
  else :
    print("No")

elif b[1]==b[2]:
  if b[2]==b[3]:
    print("Yes")
  else :
    print("No")
else:
prit("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""

a = str(input())

char_list = list(a)


if a(0)==a(1):
  if a(1)==a(2):
    print("Yes")
  else :
    print("No")

elif a(1)==a(2):
  if a(2)==a(3):
    print("Yes")
  else :
    print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""

a = str(input())

char_list = list(a)


if a(0)==a(1):
  if a(1)==a(2):
    print("Yes")
  else :
    print("No")

elif a(1)==a(2):
  if a(2)=a(3):
    print("Yes")
  else :
    print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""

a = str(input())

char_list = list(a)


if a(0)==a(1):
  if a(1)==a(2):
    print("Yes")
  elif a(1)==a(3):
    print("Yes")
  else :
    print("No")

elif a(1)==a(2):
  if a(2)=a(3):
    print("Yes")
  else :
    print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
"""
Created on Sun Nov  4 21:46:51 2018

@author: sk
"""

a = str(input())

char_list = list(a)


if a(0)==a(1):
  if a(1)==a(2):
    print("Yes")
  elif a(1)==a(3)
    print("Yes")
else :
    if a(1)==a(2)==a(3):
      print("Yes")
    else:
      print("No")
Problem p03563 (python)

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

a=int(input())
b=int(input())

s=2*b-a

print(s)

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


a=input()
b=input()

s=2*b-a

print(s)
Problem p03434 (python)

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

sorted_ai = sorted(ai, reverse=True)

alice = 0
bob = 0

for index, x in enumerate(sorted_ai):
    if (index % 2 == 0):
        alice += x
    else:
        bob += x
        
print(alice - bob)

Buggy submission (verdict: Runtime Error):
n = int(input())
 
ai = []
for i in range(n):
    ai.append(int(input()))

sorted_ai = sorted(ai, reverse=True)

alice = 0
bob = 0

for index, x in enumerate(sorted_ai):
    if (index % 2 == 0):
        alice += x
    else:
        bob += x
        
print(alice - bob)

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

ai = []
for i in range(n):
    ai.append(int(input()))

ai = sorted(ai, reverse=True)

alice = 0
bob = 0

for index, x in enumerate(ai):
    if (index % 2 == 0):
        alice += x
    else:
        bob += x
        
print(alice - bob)

Buggy submission (verdict: Runtime Error):
n = int(input())
for i in range(n):
    i = int(input())

ai = []
for i in range(n):
    ai.append(int(input()))

ai = sorted(ai, reverse=True)

alice = 0
bob = 0

for index, x in enumerate(ai):
    if (index % 2 == 0):
        alice += x
    else:
        bob += x
        
print(alice - bob)
Problem p03433 (python)

Fixed submission:
N=int(input())
A=int(input())
 
if N % 500 <= A:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = map(int, input().split())
A_score = 0
B_score = 0
for i in A:
  A_score += max(A)
  del max(A)
  B_score += max(A)
  del max(A)
  if lens(A) = 0:
    break
print(A_score - B_score)

Buggy submission (verdict: Runtime Error):
N=int(input())
A=int(input())
 
if N % 500 <= A:
print("Yes")
else:
print("No")
Problem p03433 (python)

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

if N % 500 <= A:
  print("Yes")
else:
  print("No")

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

for i in A:
  A_score = 0
  A_score += max(card_list)
  del max(card_list)
  B_score = 0
  B_score += max(card_list)
  del max(card_list)
  if lens(card_list) = 0:
  break
print(A_score - B_score)

Buggy submission (verdict: Runtime Error):
B = int(input(N))
C = int(input(A))
D = B % 500
if D > C:
  print("no")
else:
  print("yes")

Buggy submission (verdict: Runtime Error):
ソースコード 

Copy
Copy
B = int(input(N))
C = int(input(A))
D = B % 500
if D > C:
  print("no")
else:
  print("yes")

Buggy submission (verdict: Runtime Error):
B = int(input(N))
C = int(input(A))
D = B % 500
if D > C:
  print(no)
else:
  print(yes)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = N % 500
if B > A:
  print(no)
else:
  print(yes)