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

Fixed submission:
## coding: UTF-8
from fractions import gcd
s = input().split()
t = [int(p) for p in s]
#print(t)

A = t[0]
B = t[1]
C = t[2]

#print(A)
#print(B)
Gcd = gcd(A, B)
#print(Gcd)

#print(C)

if(C % Gcd == 0):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
## coding: UTF-8
from fractions import gcd
s = input().split()
t = [int(p) for p in s]
#print(t)

A = t[0]
B = t[1]
C = t[2]

print(A)
print(B)
Gcd = math.gcd(A, B)
print(Gcd)

print(C)

if(C % Gcd == 0):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
## coding: UTF-8
import math
s = input().split()
t = [int(p) for p in s]
#print(t)

A = t[0]
B = t[1]
C = t[2]

Gcd = math.gcd(A, B)
if(C % Gcd == 0):
    print("YES")
else:
    print("NO")
Problem p02582 (python)

Fixed submission:
s=input()
 
if s=='SSS':
  print(0)
elif s=='SRR' or s=='RRS':
  print(2)
elif s=='RRR':
  print(3)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
s=input()
 
if s=='SSS':
  print(0)
elif s=='SRS' or s=='RSS' or s=='SSR':
  print(1)
elif s=='RRR':
  print(3)
else:
  print(2)
s=input()

if s=='SSS':
  print(0)
elif s=='SRR' or s=='RRS':
  print(2)
elif s=='RRR':
  print(3)
else:
  print(1)
Problem p02694 (python)

Fixed submission:
s=100
i=0
x=int(input())
 
while True:
  if s>=x:
    break
  else:
    i=i+1
    s=int(s*1.01)
    
print(i)

Buggy submission (verdict: Runtime Error):
s=100
x=int(input())
i=0
While True:
  if s>=x:
    break
  s=s*1.01
  i=i+1
  
print(i+1)
Problem p02700 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
x=a//d
y=c//b
if y<x:
    print('Yes')
elif y==x:
    if c%b==0:
        print('Yes')
    else:
        if a%d==0:
            print('No')
        else:
            print('Yes')
            
elif y==x+1:
    if c%b==0:
        print('Yes')
    else:
        print('No')
            
else:
    print('No')

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

if a/d>c/b:
    print('Yes')
elif a/d==c/b:
	if c/b>0 and a/d==0
		print('No')
	else:
    	print('Yes')
elif a/d+1==c/b:
    if c%b==0 and a%d!=0:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
,b,c,d=map(int,input().split())
if a/d>c/b:
    print('Yes')
elif a/d==c/b:
	if c/b>0 and a/d==0
		print('No')
	else:
    	print('Yes')
elif a/d+1==c/b:
    if c%b==0 and a%d!=0:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
if a/d>c/b:
    print('Yes')
elif a/d==c/b:
  if c/b>0 and a/d==0
  print('No')
  else:
    print('Yes')
elif a/d+1==c/b:
    if c%b==0 and a%d!=0:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
if a/d>c/b:
    print('Yes')
elif a/d+1=c/b:
    if c%d==0:
        print('Yes')
    else:
        print('No')
else:
    print('No')
Problem p02717 (python)

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

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

print(c,a,b)
Problem p02765 (python)

Fixed submission:
n,r=map(int,input().split())
 
if n<10:
  print(r+100*(10-n))
else:
  print(r)

Buggy submission (verdict: Runtime Error):
n,r=int(input())
 
if n<10:
  print(int(r+100*(10-n)))
else:
  print(r)

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

if n<10:
  print(r+100*(10-n))
else:
  print(r)
Problem p02784 (python)

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

if h>sum(a):
    print('No')
else:
    print('Yes')

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

if h>sum(a):
    print('No')
else:
    print('Yes')
Problem p03029 (python)

Fixed submission:
a,p=map(int,input().split())
print(int((a*3+p)/2))

Buggy submission (verdict: Runtime Error):
a,p=map(int,input().split())
print(int((a*3+b)/2))
Problem p03085 (python)

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

Buggy submission (verdict: Runtime Error):
b=input()
if b='A':
    print('T')
elif b='T':
    print('A')
elif b='G':
    print('C')
else:
    print('G')
Problem p03101 (python)

Fixed submission:
H,W=map(int,input().split())
h,w=map(int,input().split())
print(int((H-h)*(W-w)))

Buggy submission (verdict: Runtime Error):
H,W=map(int,input().split())
h,w=map(int,input().split())
prin(int((H-h)*(W-w)))
Problem p03146 (python)

Fixed submission:
s=int(input())

if s==4 or s==2 or s==1:
    print(4)
    

else:
    l=[]
    for i in range(10**6+1):
        l.append(s)
        if l.count(4)>2:
            break
        elif s%2==0:
            s=s//2
        else:
            s=3*s+1
    x=l.index(4)

    l=l[x+1:]
    y=l.index(4)

    print(y+x+2)

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

if s==4 or s==2 or s==1:
    print(4)
    
l=[]
else:
    for i in range(10**6+1):
        l.append(s)
        if l.count(4)>2:
            break
        elif s%2==0:
            s=s//2
        else:
            s=3*s+1
    x=l.index(4)

    l=l[x+1:]
    y=l.index(4)

    print(y+x+2)
Problem p03264 (python)

Fixed submission:
n=int(input())
if n%2==0:
    print(int((n*n)/4))
else:
    print(int(((n-1)*(n+1))/4))

Buggy submission (verdict: Runtime Error):
k=int(input())
if n%2==0:
    print(int(n*n/4))
else:
    print(int((n-1)*(n+1)/4))

Buggy submission (verdict: Runtime Error):
k=int(input())
if n%2==0:
    print(n*n/4)
else:
    print((n-1)*(n+1)/4)
Problem p03352 (python)

Fixed submission:
x=int(input())
l=[]

if x==1:
    print(1)

else:

    for i in range(2,x+1):
        for j in range(1,x+1):
            y=j**i
            if y<=x:
                l.append(y)
            elif y>x:
                break
    print(max(l))

Buggy submission (verdict: Runtime Error):
x=int(input())
l=[]

if x==1:
    print(1)

else:

    for i in range(2,x+1):
        for j in range(1,x+1):
            y=j**i
            if y<=x:
                l.append(y)
            elif y>x:
                break
print(max(l))

Buggy submission (verdict: Runtime Error):
x=int(input())
l=[]

if x==1:
    print(1)

else:

    for i in range(2,x+1):
        for j in range(1,x+1):
            y=j**i
            if 1<=y and y<=x:
                l.append(y)
            elif y>x:
                break
print(max(l))
Problem p03385 (python)

Fixed submission:
n=input()
if len(set(n))==3:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n=input()
if len(set(n))=3:
    print('Yes')
else:
    print('No')
Problem p03574 (python)

Fixed submission:
# 入力
H,W=map(int,input().split())

l=[]
for i in range(H):
    l.append(list(input()))

for i in range(H):
    for j in range(W):
    # 地雷数のカウンタ
        c=0

    # '#'の場合はなにもしない
        if l[i][j]=='#':
            pass

    # '#'以外の場合
        else:
      # 左上
            if 0<i and 0<j and l[i-1][j-1]=='#':
                c+=1
      # 上
            if 0<i and l[i-1][j]=='#':
                c+=1
      # 右上
            if 0<i and j<W-1 and l[i-1][j+1]=='#':
                c+=1
      # 左
            if 0<j and l[i][j-1]=='#':
                c+=1
      # 右
            if j<W-1 and l[i][j+1]=='#':
                c+=1
      # 左下
            if i<H-1 and 0<j and l[i+1][j-1]=='#':
                c+=1
      # 下
            if i<H-1 and l[i+1][j]=='#':
                c+=1
      # 右下
            if i<H-1 and j<W-1 and l[i+1][j+1]=='#':
                c+=1

      # 地雷隣接数を記載
            l[i][j]=str(c)

# 出力
for i in range(H):
    print(''.join(l[i]))

Buggy submission (verdict: Runtime Error):
# 入力
H,W=map(int,input().split())

l=[]
for i in range(H):
    l.append(list(input()))

for i in range(H):
    for j in range(W):
    # 地雷数のカウンタ
        c=0

    # '#'の場合はなにもしない
    if l[i][j]=='#':
        pass

    # '#'以外の場合
    else:
      # 左上
        if 0<i and 0<j and l[i-1][j-1]=='#':
            c+=1
      # 上
        if 0<i and l[i-1][j]=='#':
            c+=1
      # 右上
        if 0<i and j<W-1 and l[i-1][j+1]=='#':
            c+=1
      # 左
        if 0<j and l[i][j-1]=='#':
            c+=1
      # 右
        if j<W-1 and l[i][j+1]=='#':
            c+=1
      # 左下
        if i<H-1 and 0<j and l[i+1][j-1]=='#':
            c+=1
      # 下
        if i<H-1 and l[i+1][j]=='#':
            c+=1
      # 右下
        if i<H-1 and j<W-1 and l[i+1][j+1]=='#':
            c+=1

      # 地雷隣接数を記載
      l[i][j]=str(c)

# 出力
for i in range(H):
    print(''.join(l[i]))

Buggy submission (verdict: Runtime Error):
# 入力
H,W=map(int,input().split())

l=[]
for i in range(H):
    l.append(list(input()))

for i in range(H):
    for j in range(W):
    # 地雷数のカウンタ
    c=0

    # '#'の場合はなにもしない
    if l[i][j]=='#':
        pass

    # '#'以外の場合
    else:
      # 左上
      if 0<i and 0<j and l[i-1][j-1]=='#':
        c+=1
      # 上
      if 0<i and l[i-1][j]=='#':
        c+=1
      # 右上
      if 0<i and j<W-1 and l[i-1][j+1]=='#':
        c+=1
      # 左
      if 0<j and l[i][j-1]=='#':
        c+=1
      # 右
      if j<W-1 and l[i][j+1]=='#':
        c+=1
      # 左下
      if i<H-1 and 0<j and l[i+1][j-1]=='#':
        c+=1
      # 下
      if i<H-1 and l[i+1][j]=='#':
        c+=1
      # 右下
      if i<H-1 and j<W-1 and l[i+1][j+1]=='#':
        c+=1

      # 地雷隣接数を記載
      l[i][j]=str(c)

# 出力
for i in range(H):
    print(''.join(l[i]))
Problem p03644 (python)

Fixed submission:
n=int(input())
if n<2:
    print(1)
elif n<4:
    print(2)
elif n<8:
    print(4)
elif n<16:
    print(8)
elif n<32:
    print(16)
elif n<64:
    print(32)
else:
    print(64)

Buggy submission (verdict: Runtime Error):
n=input()
if n<2:
    print(1)
elif n<4:
    print(2)
elif n<8:
    print(4)
elif n<16:
    print(8)
elif n<32:
    print(16)
elif n<64:
    print(32)
else:
    print(64)
Problem p03730 (python)

Fixed submission:
a,b,c=map(int,input().split())
x=0
for i in range(1,b+1):
    if i*a%b==c:
        x+=1
if x==0:
    print('NO')
else:
    print('YES')

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
x=0
for i in range(1,b+1):
    if i*a%==c:
        x+=1
if x==0:
    print('NO')
else:
    print('YES')
Problem p03998 (python)

Fixed submission:
a=input()
b=input()
c=input()

#l=a+b+c

#n=a[0]
#a=a.lstrip(n)
n='a'
while True: 
    if n=='a':
        if len(a)==0:
            print('A')
            exit()
            
        n=a[0]
        #a=a.lstrip(n)
        a=a[1:]
        
    elif n=='b':
        if len(b)==0:
            print('B')
            exit()
            
        n=b[0]
        #b=b.lstrip(n)
        b=b[1:]
        
    else:
        if len(c)==0:
            print('C')
            exit()
            
        n=c[0]
        #c=c.lstrip(n)
        c=c[1:]

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

l=a+b+c

n=a[0]
a=a.lstrip(n)

for i in range(len(l)-1):
    if n=='a':
        if len(a)==0:
            print('A')
            break
        n=a[0]
        a=a.lstrip(n)
    elif x=='b':
        if len(b)==0:
            print('B')
            break
        n=b[0]
        b=b.lstrip(n)
    else:
        if len(c)==0:
            print('C')
            break
        n=c[0]
        c=c.lstrip(n)
Problem p02548 (python)

Fixed submission:
N = int(input())
ans = 0
for i in range(1,N):
    x = (N-1)//i
    ans += x
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
ans = 1
for i in range(2,N):
    a = factorization(n)
    b = 1
    for j in range(len(a)):
        x = a[j][1]
        b *= (x+1)
    ans += b
print(ans)

Buggy submission (verdict: Runtime Error):
def num_divisors(prime_count):
    num = 1
    
    for prime, count in prime_count.iteritems():
        num *= (count + 1)
    
    return num
N = int(input())
ans = 1
for i in range(2,N):
    ans += um_divisors(i)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
s = [0,1]
for i in range(2,N):
    for j in range(2,i**0.5+1):
        if i % j == 0:
            k = i//j
            s.apppend(2*s[k])
            break
    if len(s) != i:
        s.append(1)
print(sum(s))

Buggy submission (verdict: Runtime Error):
N = int(input())
import math
def num_divisors_trial_division(n):
    num = 0
    for i in range(1, int(math.sqrt(n) + 1e-9) + 1):
        if n % i == 0:
            num += 1
            if n != i**2:
                num += 1
    
    return num
s = [0,1]
for i in range(2,N):
    if i % 2 = 0:
        s.append(s[i//2]*2)
    else:
        s.append(num_divisors_trial_division(i))
print(sum(s))

Buggy submission (verdict: Runtime Error):
N = int(input())
import math
def num_divisors_trial_division(n):
    num = 0
    for i in range(1, int(math.sqrt(n) + 1e-9) + 1):
        if n % i == 0:
            num += 1
            if n != i**2:
                num += 1
    
    return num
s = [0,1]
for i in range(2,N):
    if i % 2 = 0:
        s.append(s[i//2]*2)
    else:
        num_divisors_trial_division(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
import math
def num_divisors_trial_division(n):
    num = 0
    for i in xrange(1, int(math.sqrt(n) + 1e-9) + 1):
        if n % i == 0:
            num += 1
            if n != i**2:
                num += 1
    
    return num
ans = 0
for i in range(1,N):
    n = N - i
    ans += num_divisors_trial_division(n)
print(ans)
Problem p02615 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
A.sort()
k = N - 2
a = A.pop()
ans = a
n = k // 2
for i in range(n):
    a = A.pop()
    ans += 2*a
if k - 2*n == 1:
    ans += A[-1]

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
A.sort()
B = []
for i in range(N):
    a = A.pop(0)
    B.append(0)
    B.append(0)
ans = 0
B.pop()
for i in range(N-1):
    a = B.pop()
    ans += b
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
A.sort()
B = []
for i in range(N):
    a = A.pop(0)
    B.append(0)
    B.append(0)
ans = 0
B.sort()
for i in range(N-1):
    a = B.pop(0)
    ans += b
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
A.sort()
B = []
for i in range(N):
    a = A.pop(0)
    B.append(0)
    B.append(0)
ans = 0
for i in range(N-1):
    a = B.pop(0)
    ans += b
print(ans)
Problem p02641 (python)

Fixed submission:
X,N = map(int,input().split())
if N > 0:
    A = list(map(int,input().split()))
    d = {}
    for i in range(102):
        d[i] = 0
    for a in A:
        d[a] = 1
    for i in range(0,100):
        x = X - i
        y = X + i
        if d[x] == 0:
            print(x)
            quit()
        if d[y] == 0:
            print(y)
            quit()
else:
    print(X)

Buggy submission (verdict: Runtime Error):
X,N = map(int,input().split())
if N > 0:
    A = list(map(int,input().split()))
    d = {}
    for i in range(101):
        d[i] = 0
    for a in A:
        d[a] = 1
    for i in range(0,100):
        x = X - i
        y = X + i
        if d[x] == 0:
            print(x)
            quit()
        if d[y] == 0:
            print(y)
            quit()
else:
    print(X)

Buggy submission (verdict: Runtime Error):
X,N = map(int,input().split())
if N > 0:
    A = list(map(int,input()))
    for i in range(100):
        x = X - i
        y = X - i
    if x not in A:
        print(x)
        quit()
    if y not in A:
        print(y)
        quit()
else:
    print(N)

Buggy submission (verdict: Runtime Error):
X,N = map(int,input())
if N > 0:
    A = list(map(int,input()))
    for i in range(100):
        x = X - i
        y = X - i
    if x not in A:
        print(x)
        quit()
    if y not in A:
        print(y)
        quit()
else:
    print(N)
Problem p02642 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
A.sort()
d = {}
n = A[-1]
def makePrimeChecker(n):
    isPrime = [True] * (n + 1)
    i = 0
    for j in A:
        if i == j:
            isPrime[i] = False
            continue
        i = j
        if isPrime[i]:
            for j in range(i * 2, n + 1, i):
                isPrime[j] = False
    return isPrime
P = makePrimeChecker(n)
i = 0
ans = 0
for j in A:
    if i == j:
        continue
    else:
        i = j
        if P[i]:
            ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
A.sort()
d = {}
n = A[-1]
def makePrimeChecker(n):
    isPrime = [True] * (n + 1)
    isPrime[0] = False
    isPrime[1] = False
    i = 0
    for j in A:
        if i == j:
            d[i] = 1
        i = j
        if i > 10**3:
            break
        if isPrime[i]:
            for j in range(i * i, n + 1, i):
                isPrime[j] = False
    return isPrime
P = makePrimeChecker(n)
i = 0
ans = 0
for j in A:
    if i == j:
        continue
    else:
        i = j
        if P[i]:
            if d[i] == 0:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
A.sort()
d = {}
def makePrimeChecker(n):
    isPrime = [True] * (n + 1)
    isPrime[0] = False
    isPrime[1] = False
    for j in A:
        if i == j:
            d[i] = 1
        i = j
        if i > 10**3:
            break
        if isPrime[i]:
            for j in range(i * i, n + 1, i):
                isPrime[j] = False
    return isPrime
P = makePrimeChecker(n)
i = 0
ans = 0
for j in A:
    if i == j:
        continue
    else:
        i = j
        if P[i]:
            if d[i] == 0:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
A.sort()
d = []
ans = 0
while A:
    a = A.pop(0)
    f = 0
    for p in d:
        if a % p == 0:
            f = 1
            break
    if f == 0:
        d.append(a)
        if len(A) == 0:
            break
        if a == A[0]:
            while (A) & (a == A[0]):
                A.pop(0)
        else:
            ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
A.sort()
d = []
ans = 0
while A:
    a = A.pop(0)
    f = 0
    for p in d:
        if a % p == 0:
            f = 1
            break
    if f == 0:
        d.append(a)
        if len(A) == 0:
            break
        if a == A[0]:
            while a == A[0]:
                A.pop(0)
        else:
            ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(input().split())
A.sort()
d = []
ans = 0
while A:
    a = A.pop(0)
    f = 0
    for p in d:
        if a % p == 0:
            f = 1
            break
        else:
            d.append(a)
    if f == 0:
        if a ==A[0]:
            while a == A[0]:
                A.pop(0)
        else:
            ans += 1
print(ans)
Problem p02730 (python)

Fixed submission:
S = input()
n = len(S)
p = (n-1)//2
q = (n+3)//2 - 1
A = S[:p]
B = S[q:]
ans = 'Yes'
for i in range(len(S)):
    if S[i] != S[-i-1]:
        ans = 'No'
for i in range(len(A)):
    if A[i] != A[-i-1]:
        ans = 'No'
for i in range(len(B)):
    if B[i] != B[-i-1]:
        ans = 'No'
print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
n = len(S)
p = (n-1)//2
q = (n+3)//2 - 1
A = S[:p]
B = S[q:]
ans = 'Yes'
for i in range(len(S)):
    if S[i] != S[-i-1]:
        ans = 'No
for i in range(len(A)):
    if A[i] != A[-i-1]:
        ans = 'No'
for i in range(len(B)):
    if B[i] != B[-i-1]:
        ans = 'No'
print(ans)
Problem p02553 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,c,d= map(int,imput().split())
if b>=0 and d>=0:
    print(b*d)
elif b>=0 and d<0 and a>=0:
    print(a*d)
elif b>=0 and d<0 and a<0:
    print(a*c)
elif b<0 and d>=0 and c>=0:
    print(b*c)
elif b<0 and d>=0 and c<0:
    print(a*c)
else:
    print(a*c)
Problem p02657 (python)

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

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

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

Fixed submission:
R = input()
print(2*3.141*int(R))

Buggy submission (verdict: Runtime Error):
R= inpup()
print(6.282*(int(R))**2)
Problem p02708 (python)

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

ans, saidai, saisyo = 0, 0, 0
for i in range(1, N+2):
    saisyo += i-1
    saidai += N-i+1
    if i >= K:
        ans += (saidai - saisyo + 1)
    
print(ans%(10**9+7))

Buggy submission (verdict: Runtime Error):
N,K = input().split()
import math
#print(math.factorial(int(N)+1) - math.factorial(int(K)-1) -1)
print(math.factorial(int(N)+1) / math.factorial(int(K)) - math.factorial(int(K)))
Problem p02606 (python)

Fixed submission:
l,r,d=map(int,input().split())
print(r//d-(l-1)//d)

Buggy submission (verdict: Runtime Error):
l,r,d=map(int,input().split())
if l > r:
  print(0)
  break
else:
  print((r-l)//d)

Buggy submission (verdict: Runtime Error):
l,r,d=map(int,input().split)
print((r-l)//d)
Problem p02607 (python)

Fixed submission:
N = int(input())
A = [int(i) for i in input().split()]
c = 0
 
for i in range(N):
  if (i+1) % 2 == 1 and A[i] % 2 == 1:
    c += 1
else:
  print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = [int(i) for i in input().split()]
ans = 0

for i in range(n):
  if (i+1) % 2 == 1 and a[i] % 2 == 1:
    c += 1
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(i) for i in input().split()]
ans = 0
for i in range(n):
  if (i+1) % 2 == 1 and a[i] % 2 == 1:
    c += 1
else:
  print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[int(i) for i in input().split()]
ans=0
for i in range(n):
  if (i+1)%2 ==1 and a[i]%2 ==1:
    c+=1
else:
  print(ans)
Problem p02612 (python)

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

Buggy submission (verdict: Runtime Error):
n=int(input())
x=int(input())
print(1000*x-n)

Buggy submission (verdict: Runtime Error):
n=int(input())
x=[int(input()) for i in range(11)]
print(1000*x-n)

Buggy submission (verdict: Runtime Error):
n=int(input())
x=int(input())
if x = 0:
    break
elif 1 <= x <= 10:
    print(1000*x-n)
elif 11 < x:
    break
Problem p02613 (python)

Fixed submission:
n=int(input())
s=list(input() for i in range(n))
print('AC x ',s.count('AC'))
print('WA x ',s.count('WA'))
print('TLE x ',s.count('TLE'))
print('RE x ',s.count('RE'))

Buggy submission (verdict: Runtime Error):
n=int(input())
s=list(int(input()) for i in range(n))
print('AC x',s.count('AC'))
print('WA x',s.count('WA'))
print('TLE x',s.count('TLE'))
print('RE x',s.count('RE'))

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range(n):
    if n = 'AC':
        print(n.count('AC'))
    elif n = 'WA':
        print(n.count('WA'))
    elif n = 'TLE':
        print(n.count('TLE'))
    elif n = 'RE':
        print(n.count('RE'))
Problem p02639 (python)

Fixed submission:
a=list(map(int,input().split()))
print(a.index(0)+1)

Buggy submission (verdict: Runtime Error):
a,b,c,d,e=map(int,input().split())
list=[a,b,c,d,e]
for i in list():
    if i==0:
        print(list.index(i)+1)

Buggy submission (verdict: Runtime Error):
a,b,c,d,e = int(input())
lists = ['a', 'b', 'c', 'd', 'e']
for i in range(lists(4)):
    if i == 0:
        print(i)

Buggy submission (verdict: Runtime Error):
a,b,c,d,e=[int(input()) for i in range(4)]
if i == 0:
    print(range(i))