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

Fixed submission:
def comb(current, mx, target: int):
    if len(current) == target:
        yield current
    elif len(current) < target and len(alphabet) > 0:
        for i in range(mx + 1):
            yield from comb(current + [chr(i + 97)], mx + 1 if i == mx else mx, target)


if __name__ == '__main__':
    n = int(input())
    alphabet = [str(chr(i)) for i in range(97, 97 + 26)]
    result = set()

    for perm in comb([], 0, n):
        print("".join(perm))

Buggy submission (verdict: Runtime Error):
from typing import List


def diff_one(l: List[str]) -> bool:
    prev = l[0]

    for i in range(1, len(l)):
        if abs(ord(l[i]) - ord(prev)) >= 2:
            return False
        prev = l[i]

    return True


def comb(current: List[str], rest: List[str], target: int):
    if len(current) == target:
        yield current
    elif len(current) < target and len(rest) > 0:
        for i in range(len(current) + 1):
            yield from comb(current + [rest[i]], rest, target)


if __name__ == '__main__':
    n = int(input())
    alphabet = [str(chr(i)) for i in range(97, 97 + 26)]

    for perm in comb([], alphabet[:n], n):
        if diff_one(perm):
            print("".join(perm))

Buggy submission (verdict: Runtime Error):
from typing import List


def diff_one(l: List[str]) -> bool:
    prev = l[0]

    for i in range(1, len(l)):
        if abs(ord(l[i]) - ord(prev)) >= 2:
            return False
        prev = l[i]

    return True


def comb(current: List[str], rest: List[str], target: int):
    if len(current) == target:
        yield current
    elif len(current) < target and len(rest) > 0:
        for i in range(len(current) + 1):
            yield from comb(current + [rest[i]], rest, target)


if __name__ == '__main__':
    n = int(input())
    alphabet = [str(chr(i)) for i in range(97, 97 + 26)]

    for perm in comb([], alphabet[:n], n):
        if diff_one(perm):
            print(perm)
Problem p02761 (python)

Fixed submission:
if __name__ == '__main__':
    n, m = tuple([int(s) for s in input().split()])
    digits = [None] * 3
    failed = False

    for i in range(m):
        si, ci = tuple([int(s) for s in input().split()])

        if si > n:
            print(-1)
            failed = True
            break
        elif digits[n - si] is not None and digits[n - si] != ci:
            print(-1)
            failed = True
            break
        else:
            digits[n - si] = ci

    if not failed:
        if digits[-1] == 0 and n > 1:
            print(-1)
        else:
            digits = digits[:n]
            digits.reverse()
            if digits[0] is None and n > 1:
                digits[0] = 1
            for j in range(len(digits)):
                if digits[j] is None:
                    digits[j] = 0

            print("".join(["{}".format(d) for d in digits]))

Buggy submission (verdict: Runtime Error):
if __name__ == '__main__':
    n, m = tuple([int(s) for s in input().split()])
    digits = [None] * m
    failed = False

    for i in range(m):
        si, ci = tuple([int(s) for s in input().split()])

        if si == 1 and ci == 0:
            print(-1)
            failed = True
            break

        if digits[si - 1] is not None and digits[si - 1] != ci:
            print(-1)
            failed = True
            break
        else:
            digits[si - 1] = ci

    if not failed:
        i = 0

        while digits[i] is None and len(digits[i:]) > n:
            i += 1

        if len(digits[i:]) > n:
            print(-1)
        else:
            digits = digits[i:]
            if digits[0] is None:
                digits[0] = 1
            for j in range(len(digits)):
                if digits[j] is None:
                    digits[j] = 0

            print("".join(["{}".format(d) for d in digits]))
Problem p03719 (python)

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

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

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

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

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

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

if c > A and c < B:
  print ("Yes")
else:
  print ("No")
Problem p03773 (python)

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

Buggy submission (verdict: Runtime Error):
a , b = input().split()
if a+b >= 24:
	print ((a + b) - 24)
else:
  	print (a + b)

Buggy submission (verdict: Runtime Error):
a , b = input().split()
if (a+b) >= 24:
	print (a + b - 24)
else:
  	print (a + b)

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

if a + b > 24:
	print (a + b - 24)
else:
  	print (a + b)

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

if (a+b) > 24:
	print (a + b - 24)
else:
  	print (a + b)

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

if (a+b) > 24:
	print (a + b - 24)
else:
  	print (a + b)
Problem p03777 (python)

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

if a==b:
	print ("H")
else:
  	print("D")

Buggy submission (verdict: Runtime Error):
print("H" if input()==input() else "D")

Buggy submission (verdict: Runtime Error):
print("H" if input()==input() else "D")

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

if a == b:
  print ("H")
else:
  print ("D")
Problem p03795 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
x = N - ((N/15)200)

print (x)
Problem p03826 (python)

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

ab = a * b
cd = c * d

if ab == cd:
    print(int(ab))
elif ab > cd:
    print(int(ab))
else:
    print(int(cd))

Buggy submission (verdict: Runtime Error):
N = int(input())
x = 800*N - ((N//15)*200)

print (x)

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

ab = A*B
cd = C*D
 
if ab >= cd:
  print (ab)
else:
  print (cd)

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

if A*B >= C*D:
  print (A*B)
else:
  print (C*D)

Buggy submission (verdict: Runtime Error):
A, B, C, D = [int(x) for x in stdin.readline().rstrip().split()]

if A*B >= C*D:
  print (A*B)
else:
  print (C*D)

Buggy submission (verdict: Runtime Error):
A, B, C, D = [int(x) for x in stdin.readline().rstrip().split()]

if A*B >= C*D:
  print (A*B)
else:
  print (C*D)

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

areaAB = (A*B)
areaCD = (C*D)

if areaAB >= areaCD:
  print (areaAB)
  
else:
  print (areaCD)

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

areaAB = (A*B)
areaCD = (C*D)

if areaAB == areaCD:
  print (areaAB)
  
if areaAB > areaCD:
  print (areaAB)

if areaCD > areaAB:
  print (areaCD)

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

areaAB = (A*B)
areaCD = (C*D)

if areaAB == areaCD:
  print (areaAB)
  
if areaAB > areaCD:
  print (areaAB)

if areaCD > areaAB:
  print (areaCD)

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

areaAB = (A*B)
areaCD = (C*D)

if areaAB == areaCD:
  print (areaAB)
  
if areaAB > areaCD:
  print (areaAB)

if areaCD > areaAB:
  print (areaCD)

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

areaAB = A*B
areaCD = C*D

if areaAB == areaCD:
  print (areaAB)
  
if areaAB > areaCD:
  print (areaAB)

if areaCD > areaAB:
  print (areaCD)
Problem p03844 (python)

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

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

Fixed submission:
c = input()

if c == "a" :
  print ("vowel")
elif c == "e" :
  print ("vowel")
elif c == "i" :
  print ("vowel")
elif c == "o" :
  print ("vowel")
elif c == "u" :
  print ("vowel")
else:
  print ("consonant")

Buggy submission (verdict: Runtime Error):
c = raw_input()

if c == "a" :
  print ("vowel")
elif c == "e" :
  print ("vowel")
elif c == "i" :
  print ("vowel")
elif c == "o" :
  print ("vowel")
elif c == "u" :
  print ("vowel")
else:
  print ("consonant")

Buggy submission (verdict: Runtime Error):
c = raw_input()

if c == "a" or "e" or "i" or "o" or "u":
  print ("vowel")
else:
  print ("consonant")

Buggy submission (verdict: Runtime Error):
c = raw_input()

if c == a or e or i or o or u:
  print ("vowel")
else:
  print ("consonant")

Buggy submission (verdict: Runtime Error):
c = raw_input()

if "c" == a or e or i or o or u:
  print ("vowel")
else:
  print ("consonant")
Problem p03860 (python)

Fixed submission:
x, y, z = input().split()

print (x[0]+y[0]+z[0])

Buggy submission (verdict: Runtime Error):
x = input()
y = input()
z = input()

print x[0]+y[0]+z[0]
Problem p04043 (python)

Fixed submission:
x, y, z =  map(int, input().split())

if x + y + z == 17:
  print ("YES")
else:
  print ("NO")

Buggy submission (verdict: Runtime Error):
x, y, z =  input().split()

if x + y + z = 17:
  print ("YES")
else:
  print ("NO")

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

if x + y + z = 17:
  print ("YES")
else:
  print ("NO")

Buggy submission (verdict: Runtime Error):
number1 = raw_input ()
number2 = raw_input ()
number3 = raw_input ()
 
if number1 + number2 + number3 == 12:
    print ('YES')
if number1 + number2 + number3 != 12:
    print ('NO')

Buggy submission (verdict: Runtime Error):
number1 = raw_input ()
number2 = raw_input ()
number3 = raw_input ()
 
if number1 + number2 + number3 == 12:
    print ('yes')
if number1 + number2 + number3 != 12:
    print ('no')

Buggy submission (verdict: Runtime Error):
number1 = raw_input ()
number2 = raw_input ()
number3 = raw_input ()

if number1 + number2 + number3 == 12:
    print ('yes')
if number1 + number2 + number3 != 12:
    print ('no')
Problem p02717 (python)

Fixed submission:
x,y,z = map(int, input().split())
print(z,x,y)

Buggy submission (verdict: Runtime Error):
N,K = map(int, input().split())
print(min(N%K,abs(N%K-K)))
Problem p02995 (python)

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

def gcd(a,b):
    while b:
        a,b = b,a%b
    return a

n_c = B//C - (A-1)//C
n_d = B//D - (A-1)//D
lcm_cd = C*D // gcd(C,D)
n_cd = B//lcm_cd - (A-1)//lcm_cd

print(B-A+1 - (n_c+n_d-n_cd))

Buggy submission (verdict: Runtime Error):
from math import gcd

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

n_c = B//C - (A-1)//C
n_d = B//D - (A-1)//D
lcm_cd = C*D // gcd(C,D)
n_cd = B//lcm_cd - (A-1)//lcm_cd

print(B-A+1 - (n_c+n_d-n_cd))

Buggy submission (verdict: Runtime Error):
import math

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

n_c = B//C - (A-1)//C
n_d = B//D - (A-1)//D
lcm_cd = C*D // math.gcd(C,D)
n_cd = B//lcm_cd - (A-1)//lcm_cd

print(B-A+1 - (n_c+n_d-n_cd))

Buggy submission (verdict: Runtime Error):
import math

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

n_c = B//C - (A-1)//C
n_d = B//D - (A-1)//D
lcm_cd = C*D // math.gcd(C,D)
print(lcm_cd)
n_cd = B//lcm_cd - (A-1)//lcm_cd

print(B-A+1 - (n_c+n_d-n_cd))
Problem p02700 (python)

Fixed submission:
th,ts,ah,ae=map(int,input().split())
while(th>0 and ah>0):
  ah=ah-ts
  if(ah<=0):
    break
  else:
    th=th-ae
if(th>0):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
th,ts,ah,ae=map(int,input().split())
while(th>0 && ah>0):
  ah=ah-ts
  if(ah<=0):
    break
  else:
    th=th-ae
if(th>0):
  print("Yes")
else:
  print("No")
Problem p02714 (python)

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

############################################

# read data for n sequences.
N = int(input())
data = input()

out = 0
r=0;g=0;b=0;
for d in data:
    if d =="R":
        r+=1
    elif d=="B":
        b+=1
    else:
        g+=1
out = r*g*b

if N > 2:
    for ii, i in enumerate(data[:-2]):
        for jj,j in enumerate(data[ii+1:-1]):
            jj = jj+ii+1
            if i!=j:
                sum1 = 0                    
                for d in [d for d in "RGB"]:
                    if i!=d and j!=d:
                        let = d

                if jj+jj-ii<N:
                    if data[jj+jj-ii]==let:                    
                        out-=1
print(out)

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

############################################

# read data for n sequences.
N = int(input())
data = input()

out = 0

if N > 2:
    for ii, i in enumerate(data[:-2]):
        for jj,j in enumerate(data[ii+1:-1]):
            jj = jj+ii+1
            if i!=j:
                sum1 = 0                    
                for d in np.asarray([d for d in "RGB"]):
                    if i!=d and j!=d:
                        #sum1 = np.sum(np.asarray([d for d in data[jj+1:]])==d)
                        sum1 = 0
                        for l in data[jj+1:]:
                            if d == l:
                                sum1 +=1
                        let = d
                out+=sum1
                if jj+jj-ii<N:
                    if data[jj+jj-ii]==let:                    
                        out-=1
print(out)
Problem p02718 (python)

Fixed submission:
from sys import stdin
import numpy as np



############################################

# read data for n sequences.
temp = stdin.readline().split()
N, M = np.asarray(temp).astype(int)
temp = stdin.readline().split()
a = np.asarray(temp).astype(int)

sumvotes = np.sum(a)

c = 0; OUT = False
for data in a:
    if data >= sumvotes/(4*M):
        c += 1
    if c >= M:
        OUT = True
        #break

if OUT:
    print("Yes")
else:
    print("No")

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


############################################

# read data for n sequences.
temp = stdin.readline().split()
N, M = np.asarray(temp).astype(int)
temp = stdin.readline().split()
a = np.asarray(temp).astype(int)

sumvotes = np.sum(a)

c = 0; OUT = False
for data in a:
    if data >= sumvotes/(4*M):
        c += 1
    if c >= M:
        OUT = True
        #break

if OUT:
    print("Yes")
else:
    print("No")
Problem p03000 (python)

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


from sys import stdin
import itertools



############################################

# read data for n sequences.
temp = stdin.readline().split()
N = int(temp[0])
X = int(temp[1])

data = []
write = stdin.readline().split()
for i in range(N):
    data.append(int(write[i]))
    
count = 1
dis = 0

for d in data:
    dis += d
    if dis <= X:
        count += 1
    else:
        break

print(count)

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


from sys import stdin
import itertools


############################################

# read data for n sequences.
temp = stdin.readline().split()
N = int(temp[0])
X = int(temp[1])

data = []
write = stdin.readline().split()
for i in range(N+1):
    data.append(int(write[i]))
    
count = 0
dis = 0

for d in data:
    if dis <= X:
        count += 1
        dis += d
    else:
        break

print(count)
Problem p03067 (python)

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


from sys import stdin



############################################


# read data for n sequences.
n = stdin.readline().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
#data = [int(stdin.readline().rstrip()) for _ in range(n)]

if b > c and a < c:
    print("Yes")
elif c < a and b < c:
	print("Yes")
else:
	print("No")

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


from sys import stdin



############################################


# read data for n sequences.
n = stdin.readline().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
#data = [int(stdin.readline().rstrip()) for _ in range(n)]

out = int(b / a)

if b > c and a < c:
    print("Yes")
else:
	print("No")
Problem p03105 (python)

Fixed submission:
from sys import stdin


############################################


# read data for n sequences.
n = stdin.readline().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
#data = [int(stdin.readline().rstrip()) for _ in range(n)]

out = int(b / a)

if out > c:
    out = c

print(out)

#end = time.time()
#print(end-start)

Buggy submission (verdict: Runtime Error):
# read data for n sequences.
n = stdin.readline().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
#data = [int(stdin.readline().rstrip()) for _ in range(n)]

out = int(b / a)

if out > c:
    out = c

print(out)

end = time.time()
print(end-start)
Problem p03145 (python)

Fixed submission:
from sys import stdin


############################################


# read data for n sequences.
n = stdin.readline().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
#data = [int(stdin.readline().rstrip()) for _ in range(n)]

out = int(a * b /2)

print(out)

Buggy submission (verdict: Runtime Error):
from sys import stdin
# read data for n sequences.
n = stdin.readline().rstrip()
a = int(n[0])
b = int(n[2])
c = int(n[4])
#data = [int(stdin.readline().rstrip()) for _ in range(n)]

out = int(a * b /2)

print(out)
Problem p02702 (python)

Fixed submission:
s=input()
s=s[::-1]
n=len(s)
 
count=[0]*2019
count[0]=1
num,d=0,1
 
for i in s:
  num+=int(i)*d
  num%=2019
  d*=10
  d%=2019
  count[num]+=1
 
ans=0
for i in count:
  ans+=i*(i-1)//2
  
print(ans)

Buggy submission (verdict: Runtime Error):
input()
s=s[::-1]
n=len(s)
 
count=[0]*2019
count[0]=1
num,d=0,1
 
for i in s:
  num+=int(i)*d
  num%=2019
  d*=10
  d%=2019
  count[num]+=1
 
ans=0
for i in count:
  ans+=i*(i-1)//2
  
print(ans)

Buggy submission (verdict: Runtime Error):
nput()
s=s[::-1]
n=len(s)
 
count=[0]*2019
count[0]=1
num,d=0,1
 
for i in s:
  num+=int(i)*d
  num%=2019
  d*=10
  d%=2019
  count[num]+=1
 
ans=0
for i in count:
  ans+=i*(i-1)//2
  
print(ans)
Problem p03695 (python)

Fixed submission:
import collections

N = int(input())
sort = list(map(int, input().split()))

for i in range(N):
    sort[i] = sort[i] // 400

normal = [i for i in sort if i < 8]
incredible = [i for i in sort if i >= 8]

min = len(collections.Counter(normal))
max = len(collections.Counter(normal)) + len(incredible)

min = 1 if min < 1 else min


print(min, max)

Buggy submission (verdict: Runtime Error):
import collections

N = int(input())
a = list(map(int, input().split()))
if (len(a) != N or N > 100 or N < 1 or max(a) > 4800 or min(a < 1)):
    exit()

sort = sorted(a, key=int)

for i in range(N):
    sort[i] = sort[i] // 400

normal = [i for i in sort if i < 8]
incredible = [i for i in sort if i >= 8]

min = len(collections.Counter(normal))
max = len(collections.Counter(normal)) + len(incredible)

min = 1 if min < 1 else min
max = 8 if max > 8 else max

print(min, max)

Buggy submission (verdict: Runtime Error):
import collections

N = int(input())
a = list(map(int, input().split()))
if (len(a) != N or N > 100 or N < 1 or max(a) > 4800 or min(a < 1):
    exit()

sort=sorted(a, key=int)

for i in range(N):
    sort[i]=sort[i] // 400

normal=[i for i in sort if i < 8]
incredible=[i for i in sort if i >= 8]

min=len(collections.Counter(normal))
max=len(collections.Counter(normal)) + len(incredible)

min=1 if min < 1 else min
max=8 if max > 8 else max

print(min, max)
Problem p04030 (python)

Fixed submission:
s = input()
ans = []
for _ in s:
    if _ == 'B':
        if len(ans) != 0:
            ans.pop()
    else:
        ans.append(_)
print(*ans, sep='')

Buggy submission (verdict: Runtime Error):
s = input()
ans = []
for _ in s:
    if _ == 'B':
        ans.pop()
    else:
        ans.append(_)
print(*ans, sep='')
Problem p04044 (python)

Fixed submission:
n, l = map(int, input().split())
s = [input() for _ in range(n)]
s.sort()
for _ in s:
    print(_, end='')

Buggy submission (verdict: Runtime Error):
n, l = map(int, input().split())
s = [input() for _ in range(n)]
s.sort()
print(s[0] + s[1] + s[2])
Problem p02705 (python)

Fixed submission:
import math
n = int(input())
circumference = n * 2 * math.pi
print(circumference)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
circumference = 2 * pi * n
print(circumference)
Problem p03068 (python)

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

str = S[K-1]
for i in range(N):
    if(S[i]!=str):
        S[i]="*"
str2 =""
for i in range(N):
    str2=str2+S[i]
print(str2)

Buggy submission (verdict: Runtime Error):
N=int(input())
K=int(input())
S= list(input())
str = S[K-1]
for i in range(N):
    if(S[i]!=str):
        S[i]="*"
str2 =""
for i in range(N):
    str2=str2+S[i]
print(str2)
Problem p03194 (python)

Fixed submission:
N,P = list(map(int,input().split()))
mylist = []
roop  = int((10**12)**(1/N))

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

flag = 0
tmp = 1
if N ==1:
    print(P)
else:
    Primelis = primes(roop)
    for i in Primelis:
        flag = 0
        tmp = 1
        while flag==0:
            if P%(i**N)==0:
                P = P/(i**N)
                tmp = tmp*i
            else:
                mylist.append(tmp)
                flag = 1
    ans = 1
    L = len(mylist)
    for i in range(L):
        ans = ans*mylist[i]
    print(ans)

Buggy submission (verdict: Runtime Error):
N,P = list(map(int,input().split()))
mylist = []
roop  = int((10**12)**(1/N))

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

Primelis = primes(roop)
if N ==1:
    print(P)
else:
    for i in Primelis:
        if P%(i**N)==0:
            mylist.append(i)
            P = P/(i**N)
    ans = 1
    L = len(mylist)
    for i in range(L):
        ans = ans*mylist[i]
    print(ans)
Problem p03210 (python)

Fixed submission:
X=int(input())
if X==3 or X==5 or X==7:
  print("YES")
else:
  print("NO")

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

Copy
Copy
X=int(input())
if X==3 or X==5 or X==7:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
X=int(input())
if X==3 or x==5 or X==7:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
X=int(input())
if X==3 or x==5 or X==7:
  	print("YES")
else:
  print("NO")
Problem p03231 (python)

Fixed submission:
N,M = list(map(int,input().split()))
S = input()
T = input()
sl = list(S)
tl = list(T)
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def lcm(x, y):
    return int((x * y) / gcd(x, y))

lcm = lcm(N,M)
Sd = int(lcm/N)
St = int(lcm/M)
kaisu = min(int((N-1)/St),int((M-1)/Sd))
flag = 0
for i in range(kaisu+1):
    if sl[St*i] != tl[Sd*i]:
        flag = 1
if flag == 0:
    print(lcm)
else:
    print(-1)

Buggy submission (verdict: Runtime Error):
N,M = list(map(int,input().split()))
S = input()
T = input()
sl = list(S)
tl = list(T)
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

lcm = lcm(N,M)
Sd = lcm//N
St = lcm//M
kaisu = min((N-1)//St,(M-1)//Sd)
flag = 0
for i in range(kaisu+1):
    if sl[St*i] != tl[Sd*i]:
        flag = 1
if flag == 0:
    print(lcm)
else:
    print(-1)
Problem p03280 (python)

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

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