Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input().strip())
ar = [N*[] for _ in range(N)]
for row in range(N):
  ar[row] = input().strip()

count = N*[0]
fullestRow = -1
maxCount = 0
for row in range(N):
  for col in range(N):
    if ar[row][col] == '#':
      count[row] += 1
  if count[row] > maxCount:
    maxCount = count[row]
    fullestRow = row

if maxCount == 0:
  print(-1)
else:
  req = 0
  for row in range(N):
    if ar[row][fullestRow] == '#':
      found = True
      break
  if not found:
    req += 1
  req += N - maxCount
  
  for col in range(N):
    for row in range(N):
      if ar[row][col] == '.':
        req+=1
        break
  print(req)

Fixed submission:
N = int(input().strip())
ar = [N*[] for _ in range(N)]
for row in range(N):
  ar[row] = input().strip()

fullestRows = []
maxCount = 0
for row in range(N):
  count = 0
  for col in range(N):
    if ar[row][col] == '#':
      count += 1
  if count > maxCount:
    maxCount = count
    fullestRows = [row]
  elif count == maxCount:
    fullestRows.append(row)

if maxCount == 0:
  print(-1)
else:
  found = False
  req = 0
  for fr in fullestRows:
    for row in range(N):
      if ar[row][fr] == '#':
        found = True
        break
    if found:
      break
  if not found:
    req += 1
  req += N - maxCount
  
  for col in range(N):
    for row in range(N):
      if ar[row][col] == '.':
        req+=1
        break
  print(req)

Buggy python submission (verdict: Runtime Error):
N = int(input().strip())
ar = [N*[] for _ in range(N)]
for row in range(N):
  ar[row] = list(input().strip())

count = N*[0]
missing = [N*[] for _ in range(N)]
fullestRow = -1
maxCount = 0
for row in range(N):
  for col in range(N):
    if ar[row][col] == '#':
      count[row] += 1
    else:
      missing[row].append(col)
  if count[row] > maxCount:
    maxCount = count[row]
    fullestRow = row

if maxCount == 0:
  print(-1)
else:
  req = 0
  for row in range(N):
    if ar[row][fullestRow] == '#':
      found = True
      break
  if not found:
    req += 1
  req += N - maxCount
  
  for col in range(N):
    for row in range(N):
      if ar[row][col] == '.':
        req+=1
        break
  print(req)

Fixed submission:
N = int(input().strip())
ar = [N*[] for _ in range(N)]
for row in range(N):
  ar[row] = input().strip()

fullestRows = []
maxCount = 0
for row in range(N):
  count = 0
  for col in range(N):
    if ar[row][col] == '#':
      count += 1
  if count > maxCount:
    maxCount = count
    fullestRows = [row]
  elif count == maxCount:
    fullestRows.append(row)

if maxCount == 0:
  print(-1)
else:
  found = False
  req = 0
  for fr in fullestRows:
    for row in range(N):
      if ar[row][fr] == '#':
        found = True
        break
    if found:
      break
  if not found:
    req += 1
  req += N - maxCount
  
  for col in range(N):
    for row in range(N):
      if ar[row][col] == '.':
        req+=1
        break
  print(req)
Buggy python submission (verdict: Runtime Error):
import numpy as np


N,A,B = map(int,raw_input().split())

city = raw_input()

ci = city.split(" ")

path = []

for i in range(len(ci)-1):
    z = int(ci[i+1])-int(ci[i])
    path.append(z)

costa = []

def binary_encode(i, num_digits):
    return np.array([i >> d & 1 for d in range(num_digits)])

for i in range(2**len(path)):
    pc = binary_encode(i,len(path))
    cost =0
    for z in range(len(pc)):
        if pc[z] == 0:
            cost = cost + A *path[z]
        else:
            cost = cost + B

    costa.append(cost)

print min(costa)

Fixed submission:
import numpy as np

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


a=A*B
c=C*D


if a<c:
    print c
else:
    print a

Buggy python submission (verdict: Runtime Error):

import numpy as np


N,A,B = map(int,raw_input().split())

city = raw_input()

ci = city.split(" ")

path = []

for i in range(len(ci)-1):
    z = int(ci[i+1])-int(ci[i])
    path.append(z)

costa = []

def binary_encode(i, num_digits):
    return np.array([i >> d & 1 for d in range(num_digits)])

for i in range(2**len(path)):
    pc = binary_encode(i,len(path))
    cost =0
    for z in range(len(pc)):
        if pc[z] == 0:
            cost = cost + A *path[z]
        else:
            cost = cost + B

    costa.append(cost)

print min(costa)
~                              

Fixed submission:
import numpy as np

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


a=A*B
c=C*D


if a<c:
    print c
else:
    print a
Buggy python submission (verdict: Runtime Error):
from scipy.special import factorial

def factorization(n):
    def factor_sub(n, m):
        c = 0
        while n % m == 0:
            c += 1
            n /= m
        return c, n
    #
    buff = []
    c, m = factor_sub(n, 2)
    if c > 0: buff.append((2, c))
    c, m = factor_sub(m, 3)
    if c > 0: buff.append((3, c))
    x = 5
    while m >= x * x:
        c, m = factor_sub(m, x)
        if c > 0: buff.append((x, c))
        if x % 6 == 5:
            x += 2
        else:
            x += 4
    if m > 1: buff.append((m, 1))
    return buff


def divisor_num(n):
    a = 1
    for _, x in factorization(n):
        a *= x + 1
    return a

N = int(raw_input())

s = factorial(N)

print divisor_num(s)

Fixed submission:
import math

def factorization(n):
    def factor_sub(n, m):
        c = 0
        while n % m == 0:
            c += 1
            n /= m
        return c, n
    #
    buff = []
    c, m = factor_sub(n, 2)
    if c > 0: buff.append((2, c))
    c, m = factor_sub(m, 3)
    if c > 0: buff.append((3, c))
    x = 5
    while m >= x * x:
        c, m = factor_sub(m, x)
        if c > 0: buff.append((x, c))
        if x % 6 == 5:
            x += 2
        else:
            x += 4
    if m > 1: buff.append((m, 1))
    return buff


def divisor_num(n):
    a = 1
    for _, x in factorization(n):
        a *= x + 1
    return a

N = int(raw_input())

s = math.factorial(N)
x = divisor_num(s)
z = 1000000007

if x > z:
    ans = x%z
else:
    ans = x


print ans
Buggy python submission (verdict: Runtime Error):
#-*-coding = utf-8 -*-

# カンマ区切りの文字の入力
a,b,c = map(str, raw_input().split(","))
# 文字列の入力
print a+ " "+b+" "+c


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

a,b,c = map(str, raw_input().split(","))
print a+ " "+b+" "+c
Buggy python submission (verdict: Runtime Error):
line = input.split()
l = list(map(int, line))
a = l[0]
b = l[1]
c = l[2]

print (a)
print (b)
print (c)

Fixed submission:
line = input().split()
l = list(map(int, line))
a = l[0]
b = l[1]
c = l[2]

if a == b and b == c:
    print (1)
elif ( a == b and b != c ) or (a != b and b == c) or (a == c and a != b):
    print (2)
else:
    print (3)
Buggy python submission (verdict: Runtime Error):
l = input().split()
s = input()
 
n = int(l[0])
a = int(l[1])
b = int(l[2])
 
count = 0
countt = 0
for i in s:
    if i == 'a':
        if count < a+b:
            count = count + 1
            print('Yes')
        else:
            print('No')
    if i == 'b':
        if (count < a+b) and (countt < b):
            count = count + 1
            countt = countt + 1
            print('Yes')
        else:
            print('No')
    if i == 'c':
        print('No')

Fixed submission:
s = input()

standard = 'CODEFESTIVAL2016'

count = 0
for i in range(16):
    if s[i] != standard[i]:
        count = count + 1
print(count)
Buggy python submission (verdict: Runtime Error):
def solve(s, c):
    """rv = min(Sr, Cr//2), where
       Sr = S + a
       Cr = C - 2a  # a>=0, a is number of (2c->S) conversions
       thus
       rv = max(min(S + a, C//2 - a) for a in range(0, C//2))
       if a >=0, optimum is Sr == Cr//2, thus
                            S + a == Cr//2 - a
                            a = (C//2 - S) / 2
    """
    a = (c / 2 - s) / 2
    if a < 0:
        a = 0
    al = int(a)
    ar = int(a) + 1
    return max(min(s + a, c//2 - a) for a in (al, ar))


if __name__ == "__main__":
    import sys
    S, C = sys.stdin.readline().split()
    print(solve(s, c))


def test_solve():
    assert solve(1, 2) == 1
    assert solve(0, 4) == 1
    assert solve(0, 1) == 0


def test_atcode():
    assert solve(1, 6) == 2
    assert solve(12345, 678901) == 175897

Fixed submission:
def solve(s, c):
    """rv = min(Sr, Cr//2), where
       Sr = S + a
       Cr = C - 2a  # a>=0, a is number of (2c->S) conversions
       thus
       rv = max(min(S + a, C//2 - a) for a in range(0, C//2))
       if a >=0, optimum is Sr == Cr//2, thus
                            S + a == Cr//2 - a
                            a = (C//2 - S) / 2
    """
    a = (c / 2 - s) / 2
    if a < 0:
        a = 0
    al = int(a)
    ar = int(a) + 1
    return max(min(s + a, c//2 - a) for a in (al, ar))


if __name__ == "__main__":
    import sys
    S, C = map(int, sys.stdin.readline().split())
    print(solve(S, C))


def test_solve():
    assert solve(1, 2) == 1
    assert solve(0, 4) == 1
    assert solve(0, 1) == 0


def test_atcode():
    assert solve(1, 6) == 2
    assert solve(12345, 678901) == 175897
Buggy python submission (verdict: Time Limit Exceeded):
n = input() # N times
n = int(n)

power = 1

for i in range(1,n+1):
    power = (power * i)

a = power % (10**9 + 7)
print(a)

Fixed submission:
n = int(input())

power = 1

for i in range(1,n+1):
    power = (power * i) % (10**9 + 7)

print(power)
Buggy python submission (verdict: Time Limit Exceeded):
s, c = map(int, input().split())

if c // 2 >= s:
    while c // 2 > s:
        c -= 2
        s += 1
    print(min((c//2),s))
else:
    print(min((c//2),s))

Fixed submission:
s, c = [int(i) for i in input().split()]

if c // 2 >= s:
    a = s + ((c - (s*2))//4)
    print(a)
else:
    a = (c//2)
    print(a)
Buggy python submission (verdict: Runtime Error):
N=int(input())
r = 10**9+7
power=1
for i in range(n):
    power=power*(i+1)%r
print(power)

Fixed submission:
N=int(input())
r = 10**9+7
power=1
for i in range(N):
    power=power*(i+1)%r
print(power)
Buggy python submission (verdict: Runtime Error):
import string
import sys

w = raw_input()
for c in string.ascii_lowercase:
    if w.count(c) % 2 == 1:
        print("No")
        sys.exit()
print("Yes")


Fixed submission:
import collections

for v in collections.Counter(input()).values():
    if v % 2 != 0:
        print("No")
        break
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
#coding:utf-8
N,K=map(int,input().split())
print(K*(K-1)**(N-1))


Fixed submission:
#coding:utf-8
a,b,c=list(map(int,input().split()))

if a==b and b==c:
    print(1)
elif a==b or b==c or c==a:
    print(2)
else:
    print(3)

Buggy python submission (verdict: Runtime Error):
#coding:utf-8
N,K=list(map(int,input().split()))
print(K*(K-1)**(N-1))


Fixed submission:
#coding:utf-8
a,b,c=list(map(int,input().split()))

if a==b and b==c:
    print(1)
elif a==b or b==c or c==a:
    print(2)
else:
    print(3)
Buggy python submission (verdict: Time Limit Exceeded):
m = 1
for var in range(int(raw_input())):
  m = m * (var + 1)
print(m%(1000000000+7))

Fixed submission:
multi = 1
N = int(raw_input())
for var in range(1,N + 1):
  multi = multi * var
  if multi > 1000000007:
    multi = multi % 1000000007
print multi

Buggy python submission (verdict: Runtime Error):
m = 1
for var in range(int(raw_input) + 1):
  m = m * var + 1
print(m%1000000000*+7)

Fixed submission:
multi = 1
N = int(raw_input())
for var in range(1,N + 1):
  multi = multi * var
  if multi > 1000000007:
    multi = multi % 1000000007
print multi

Buggy python submission (verdict: Runtime Error):
m = 1
for var in range(int(raw_input) + 1):
 m = m * var + 1
print(m%1000000000*+7)

Fixed submission:
multi = 1
N = int(raw_input())
for var in range(1,N + 1):
  multi = multi * var
  if multi > 1000000007:
    multi = multi % 1000000007
print multi
Buggy python submission (verdict: Runtime Error):
s,c = map(int,input().split())
if c/2 <= s:
	print(c//2)
else:
	print(s + (c-s*2)//4)

Fixed submission:
n = int(input())
x = 800 * n
y = (n // 15) * 200
print(x-y)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = 1
for i in range(0,n):
	p = p * (i+1)
print(p % (10**9 + 7))

Fixed submission:
n = int(input())
p = 1
for i in range(1,n+1):
	p = (p * i) % (10**9 + 7)
print(p)
Buggy python submission (verdict: Runtime Error):
s,c = map(int,input())
if c/2 <= s:
	print(c//2)
else:
	print(s + (c-s*2)//4)

Fixed submission:
s,c = map(int,input().split())
if c/2 <= s:
	print(c//2)
else:
	print(s + (c-s*2)//4)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8

numbers=input().rstrip().split(" ")

num=0
s=int(numbers[0])
c=int(numbers[1])

while c>=2:
    if s>=1 and c>=2:
        num+=1
        s-=1
        c-=2
    
    elif  c>=2:
        s+=1
        c-=2

print(num)




Fixed submission:
# coding: utf-8
# Here your code !
N=int(input())
x=800*N
y=(N//15)*200

print(x-y)
Buggy python submission (verdict: Runtime Error):
def execute(n, tn, m, pxm):
    result = []
    for px in pxm:
        cp = tn[:]
        cp[px[0] - 1] = px[1]
        result.append(sum(cp))
    return result


if __name__ == '__main__':
    n = int(input())
    tn = map(int, input().split())
    m = int(input())
    pxm = []
    for _ in range(m):
        p, x = map(int, input().split())
        pxm.append([p, x])
    print(execute(n, tn, m, pxm))


Fixed submission:
def execute(n, tn, m, pxm):
    result = []
    for px in pxm:
        cp = tn[:]
        cp[px[0] - 1] = px[1]
        result.append(sum(cp))
    return result


if __name__ == '__main__':
    n = int(input())
    tn = list(map(int, input().split()))
    m = int(input())
    pxm = []
    for _ in range(m):
        p, x = map(int, input().split())
        pxm.append([p, x])
    result = execute(n, tn, m, pxm)
    print("\n".join(map(str, result)))
Buggy python submission (verdict: Runtime Error):
n = raw_input()

x = n * 800
y = (n / 15) * 200

print x-y

Fixed submission:
n = int(raw_input())

x = n * 800
y = (n / 15) * 200

print x-y

Buggy python submission (verdict: Runtime Error):
n = raw_input()

x = n * 800
y = (n % 15) * 200

print x-y

Fixed submission:
n = int(raw_input())

x = n * 800
y = (n / 15) * 200

print x-y
Buggy python submission (verdict: Runtime Error):
s,c = map(int, raw_input().split())
 
scc = 0
if s*2 <= c:
  scc = s
  c -= s*2
else:
  scc = c/2
print  scc + c/4

Fixed submission:
import math
 
n = int(raw_input())
mod = pow(10,9) + 7
ans = 1
for i in xrange(1,n+1):
  ans = (ans*i)%mod
 
print ans

Buggy python submission (verdict: Time Limit Exceeded):
import math

n = int(raw_input())
mod = pow(10,9) + 7
ans = 1
for i in xrange(1,n+1):
  ans = ans*i

print '{:d}'.format(ans%mod)


Fixed submission:
import math
 
n = int(raw_input())
mod = pow(10,9) + 7
ans = 1
for i in xrange(1,n+1):
  ans = (ans*i)%mod
 
print ans

Buggy python submission (verdict: Time Limit Exceeded):
import math

n = int(raw_input())

print '{:d}'.format(math.factorial(n) % int(math.pow(10,9) + 7))

Fixed submission:
import math
 
n = int(raw_input())
mod = pow(10,9) + 7
ans = 1
for i in xrange(1,n+1):
  ans = (ans*i)%mod
 
print ans

Buggy python submission (verdict: Runtime Error):
import math

n = int(raw_input())

print '{:d}'.format(math.factorial(n) % (math.pow(10,9) + 7))

Fixed submission:
import math
 
n = int(raw_input())
mod = pow(10,9) + 7
ans = 1
for i in xrange(1,n+1):
  ans = (ans*i)%mod
 
print ans

Buggy python submission (verdict: Runtime Error):
import math

n = int(raw_input())

print math.factorial(n) % (math.pow(10,9) + 7)

Fixed submission:
import math
 
n = int(raw_input())
mod = pow(10,9) + 7
ans = 1
for i in xrange(1,n+1):
  ans = (ans*i)%mod
 
print ans
Buggy python submission (verdict: Runtime Error):
a,b = map(int, raw_input().split())
ap = (a+11)%12
bp = (b+11)%12
if ap > bp:
  print "Alice"
elif ap < bp:
  print "Bob"
else:
  print Draw

Fixed submission:
a,b = map(int, raw_input().split())
ap = (a+11)%13
bp = (b+11)%13
if ap > bp:
  print "Alice"
elif ap < bp:
  print "Bob"
else:
  print "Draw"
Buggy python submission (verdict: Runtime Error):
for i in xrange(0,n-m+1):
  for j in xrange(0, n-m+1):
    flag = True
    for x in xrange(0, m):
      for y in xrange(0, m):
        if mp[x][y] != np[i+x][j+y]:
          flag = False
          break
      if flag == False:
        break
    if flag:
      print "Yes"
      break
  if flag: break
if flag==False: print "No"

Fixed submission:
n,m = map(int, raw_input().split())
np=[]
mp=[]
for i in xrange(0, n):
  np.append(raw_input())
for i in xrange(0, m):
  mp.append(raw_input())
 
for i in xrange(0,n-m+1):
  for j in xrange(0, n-m+1):
    flag = True
    for x in xrange(0, m):
      for y in xrange(0, m):
        if mp[x][y] != np[i+x][j+y]:
          flag = False
          break
      if flag == False:
        break
    if flag:
      print "Yes"
      break
  if flag: break
if flag==False: print "No"

Buggy python submission (verdict: Runtime Error):
n,m = map(int, raw_input().split())
np=[]
mp=[]
for i in xrange(0, n):
  np.append(raw_input())
for i in xrange(0, m):
  mp.append(raw_input())

for i in xrange(0,n-m+1):
  for j in xrange(0, n-m+1):
    flag = True
    for x in xrange(0, m):
      for y in xrange(0, m):
        if mp[x][y] != np[i+x][j+y]:
          flag = False
          break
      if flag == False:
        break
    if flag:
      print "Yes"
      return
print "No"

Fixed submission:
n,m = map(int, raw_input().split())
np=[]
mp=[]
for i in xrange(0, n):
  np.append(raw_input())
for i in xrange(0, m):
  mp.append(raw_input())
 
for i in xrange(0,n-m+1):
  for j in xrange(0, n-m+1):
    flag = True
    for x in xrange(0, m):
      for y in xrange(0, m):
        if mp[x][y] != np[i+x][j+y]:
          flag = False
          break
      if flag == False:
        break
    if flag:
      print "Yes"
      break
  if flag: break
if flag==False: print "No"

Buggy python submission (verdict: Runtime Error):
np=[]
mp=[]
for i in xrange(0, n):
  np.append(raw_input())
for i in xrange(0, m):
  mp.append(raw_input())

for i in xrange(0,n-m):
  for j in xrange(0, n-m):
    flag = True
    for l in xrange(0, m):
      for m in xrange(0, n):
        if mp[l][m] != np[i][j]:
          flag = False
          break
      if !flag:
        break

if flag:
  print "Yes"
else:
  print "No"

Fixed submission:
n,m = map(int, raw_input().split())
np=[]
mp=[]
for i in xrange(0, n):
  np.append(raw_input())
for i in xrange(0, m):
  mp.append(raw_input())
 
for i in xrange(0,n-m+1):
  for j in xrange(0, n-m+1):
    flag = True
    for x in xrange(0, m):
      for y in xrange(0, m):
        if mp[x][y] != np[i+x][j+y]:
          flag = False
          break
      if flag == False:
        break
    if flag:
      print "Yes"
      break
  if flag: break
if flag==False: print "No"
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input() .split())

if n >= m//2:
	ans = m//2
else:
	ans = n + (m - 2 * n) // 4

print(ans)

Fixed submission:
N = int(input())

x = N * 800
y = N // 15 * 200

print(x-y)
Buggy python submission (verdict: Runtime Error):

N = int(input())
total = 0
A = [None] * N
B = [None] * N
for i in range(N):
    A[i], B[i] = map(int, input().split())
	
for t in range(N):
	i = N + 1 - t
	a = A[i] % B[i]
	if a == 0:
		pass
	else:
		total = B[i]-a:
		for j in range (i):
			A[i] = A[i] + B[i] - a


print (total)
	


Fixed submission:

N = int(input())
total = 0
A = [None] * N
B = [None] * N
for i in range(N):
    A[i], B[i] = map(int, input().split())
	
for i in range(N-1,-1,-1):
	b = A[i] + total
	a = b % B[i]
	if a == 0:
		pass
	else:
		total = total + B[i] - a


print (total)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import math

n = int(sys.stdin.readline())

power = math.factorial(n)

print power % (long(1e+9) + 7)


Fixed submission:
import sys
import math

n = int(sys.stdin.readline())

power = math.factorial(n)

print(power % (int(1e+9) + 7))

Buggy python submission (verdict: Time Limit Exceeded):
import sys

n = int(sys.stdin.readline())

power = 1L
for i in range(n):
    power = power * (i+1)

print power % (long(1e+9) + 7)



Fixed submission:
import sys
import math

n = int(sys.stdin.readline())

power = math.factorial(n)

print(power % (int(1e+9) + 7))
Buggy python submission (verdict: Runtime Error):
a,op,b=raw_input().split()
if op=='+':
    print a+b
else op=='-':
    print a-b

Fixed submission:
a,op,b=map(str,raw_input().split())
a=int(a)
b=int(b)
#op = str(op)
if op=='+':
    print a+b
elif op=='-':
    print a-b
Buggy python submission (verdict: Time Limit Exceeded):
N = int(raw_input())

pw = 1

for i in range(1,N+1):
    pw = pw * i

print pw % (10**9 + 7)


Fixed submission:
N = int(raw_input())

v = 10**9 + 7

t = 1
mod = []
for i in range(1,N+1):
    t = t * i
    if (t > v):
        mod.append(t % v)
        t = 1 #reset
mod.append(t % v)

#print mod

s = 1
for j in range(len(mod)):
    s = s * mod[j]

ans = s % v
print ans
Buggy python submission (verdict: Time Limit Exceeded):
N,M = raw_input().split()
N,M = int(N),int(M)

pair = 0
c_pair = 0

while(0<N and 1<M):
    N -= 1
    M -= 2
    pair +=1

if (M!=0):
    c_pair = M / 4

print pair + c_pair


Fixed submission:
s,c = map(int,raw_input().split())

if(s < c/2):
    s_pair = s
    c_pair = (c - s*2)/4
else:
    s_pair = c/2
    c_pair = 0

print s_pair + c_pair
Buggy python submission (verdict: Time Limit Exceeded):
# 整数の入力
N = int(input())
# 計算1
p = 1
 
for num in range(1,N+1):
    p = p * num
    
# 計算2
temp = 10**9 + 7
ans = p % temp
 
# 出力
print(ans)

Fixed submission:
# 整数の入力
N = int(input())
# 計算1
p = 1
temp = 10**9 + 7
 
for num in range(1,N+1):
    p = p * num
    if p > (10**9 + 7):
        p = p % temp
    
# 計算2
ans = p % temp
 
# 出力
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#coding: UTF-8
N=int(input())
out=1
for i in range(1,N+1):
    out=out*i
print(out%(10**9+7))

Fixed submission:
#coding: UTF-8
import math
N=int(input())
out=math.factorial(N)
print(out%(10**9+7))
Buggy python submission (verdict: Runtime Error):
#coding: UTF-8
N=int(input())
lis=list(map(int, input().split()))
kind_dict={}
for i in lis:
    if i in kind_dict:
        kind_dict[i]+=1
    else:
        kind_dict[i]=1
kindn=len(kind_dict)
out=0
for i in kind_dict:
    if kind_dict[i]%2==0:
        out+=1
if out%2==0:
    print(kindn)
else:
    print(kindn-1)

Fixed submission:
#coding: UTF-8
X=int(input())
if X<1200:
    print("ABC")
else:
    print("ARC")
Buggy python submission (verdict: Runtime Error):
#coding: UTF-8
import math
x=int(input())
sho=x//11
amari=x%11
if amari==0:
    print(sho*2)
elif amari<==6:
    print(sho*2+1)
else:
    print(sho*2+2)

Fixed submission:
#coding: UTF-8
import math
x=int(input())
sho=x//11
amari=x%11
if amari==0:
    print(sho*2)
elif amari<=6:
    print(sho*2+1)
else:
    print(sho*2+2)