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

N = int(input())
A = list(map(int, input().split()))
 
for i in range(len(A)):
  if i==0:
    A_temp = A[1:]
  elif i==len(A)-1:
    A_temp = A[0:len(A)-1]
  else:
    A_temp = A[:i] + A[i+1:] 
  c = collections.Counter(A_temp)
  
  co = 0
  for k in c.values():
    if k != 1 and k != 0:
      Mcon = int(k*(k-1)/2)
      co += Mcon
  print(co)

Fixed submission:
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0 and N != 1 and M != 1:
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0 or N == 1:
  if M!=1:
    print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0 or M==1:
  if N!=1:
    print(factorial(N) // factorial(2) // factorial(N - 2))
if N==1 and M==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0 and N != 1 and M != 1:
  if N==1 and M==1:
    print(0)
  else:
    Ncon = factorial(N) // factorial(2) // factorial(N - 2)
    Mcon = factorial(M) // factorial(2) // factorial(M - 2)
    print(Ncon+Mcon)
if N ==0 or N == 1:
  print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0 or M==1:
  print(factorial(N) // factorial(2) // factorial(N - 2))
if N==1 and M==1:
  print(0)

Fixed submission:
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0 and N != 1 and M != 1:
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0 or N == 1:
  if M!=1:
    print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0 or M==1:
  if N!=1:
    print(factorial(N) // factorial(2) // factorial(N - 2))
if N==1 and M==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0:
  if N==1 and M==1:
    print(0)
  else:
    Ncon = factorial(N) // factorial(2) // factorial(N - 2)
    Mcon = factorial(M) // factorial(2) // factorial(M - 2)
    print(Ncon+Mcon)
if N ==0:
  print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0:
  print(factorial(N) // factorial(2) // factorial(N - 2))

Fixed submission:
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0 and N != 1 and M != 1:
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0 or N == 1:
  if M!=1:
    print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0 or M==1:
  if N!=1:
    print(factorial(N) // factorial(2) // factorial(N - 2))
if N==1 and M==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0:
  if N==1 and M==1:
    print(0)
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0:
  print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0:
  print(factorial(N) // factorial(2) // factorial(N - 2))

Fixed submission:
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0 and N != 1 and M != 1:
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0 or N == 1:
  if M!=1:
    print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0 or M==1:
  if N!=1:
    print(factorial(N) // factorial(2) // factorial(N - 2))
if N==1 and M==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
from math import factorial
print(factorial(n) // factorial(r) // factorial(n - r))

N, M = map(int, input().split())
if N != 0 and M != 0:
  if N==1 and M==1:
    print(0)
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0:
  print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0:
  print(factorial(N) // factorial(2) // factorial(N - 2))

Fixed submission:
from math import factorial
 
N, M = map(int, input().split())
if N != 0 and M != 0 and N != 1 and M != 1:
  Ncon = factorial(N) // factorial(2) // factorial(N - 2)
  Mcon = factorial(M) // factorial(2) // factorial(M - 2)
  print(Ncon+Mcon)
if N ==0 or N == 1:
  if M!=1:
    print(factorial(M) // factorial(2) // factorial(M - 2))
if M == 0 or M==1:
  if N!=1:
    print(factorial(N) // factorial(2) // factorial(N - 2))
if N==1 and M==1:
  print(0)