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

Fixed submission:
N = int(input())
number = "Three"
S = input().split()

for i in range(N):
  if S[i] == "Y":
    number = "Four"
    break

print(number)

Buggy submission (verdict: Runtime Error):
N = int(input())
number = "Three"
S = input().split()
for i in range(N):
  If S[i] == "Y":
    number = "Four"
    break

print(number)

Buggy submission (verdict: Runtime Error):
N = int(input())
n = "Three"
S = input().split()
for i in range(N):
  If S[i+1] == "Y":
    n = "Four"
    break

print(n)

Buggy submission (verdict: Runtime Error):
N = int(input())
n = "Three"
S = input().split()
for i in range(N):
  If S[i] == "Y":
    n = "Four"
    break

print(n)

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

for i in range(N):
  S = input().split()
  If S == "Y":
    n = "Four"
    break

print(n)

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

for i in range(N):
  S = input().split()
  If S == "Y":
    n = "Four"
    break

print(n)

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

for i in (N):
  S = input().split()
  If S == "Y":
    n = "Four"
    break

print(n)

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

for i in (N):
  S = input().split()
  If S == "Y":
    n = "Four"
    break
  if S != "Y":
    continue
print(n)

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

for i in (N):
  S = input().split()
  If S == "Y":
    n = "Four"
    break
print(n)

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

for i in (N):
  S = input().split()
  If S == "Y":
    n = "four"
    break
print(n)

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

for i in (N):
  S = input().split()
  If S == Y:
    n = "four"
    break
print(n)
Problem p03434 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
A.sort()
B = A[0::2]
b = sum(B)
C = A[1::2]
c = sum(C)
if b >= c:
  print(b-c)
else:
  print(c-b)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input().split()
A.sort()
B = A[0::1]
b = sum(B)
C = A[1::1]
c = sum(C)
if b >= c:
  print(b-c)
else:
  print(c-b)
Problem p03455 (python)

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

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

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

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

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

Fixed submission:
N = int(input())
M = list()
for i in range(N):
  M.append(int(input()))
M = list(set(M))
print(len(M))

Buggy submission (verdict: Runtime Error):
N = int(input())
M = list()
for i in range(N):
  M.append(int(input())
M　= list(set(M))
ans = len(M)
Problem p03485 (python)

Fixed submission:
a,b = input().split()
a = int(a)
b = int(b)
print ((a+b+1) //2 )

Buggy submission (verdict: Runtime Error):
a,b = input().split()
a = int(a)
b = int(b)
print ((a+b) //2 +1))
Problem p03494 (python)

Fixed submission:
N = int(input())
A = input().split()
X = 1000000000
count = 0
for i in range(N):
  t = int(A[i])
  while t % 2 == 0:
    t = t//2
    count +=1
  if count < X:
    X = count
  count =0
print(X)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input()
X = 1000000000
count = 0
for i in range(N):
  while A[i] % 2 ==0:
    A[i] = A[i]//2
    count +=1
  if count < X:
    X = count
  count =0
print(X)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = input()
X = 1000000000
count = 0
for i in range(N):
  while A[i] % 2 ==0:
    A[i] = A[i]//2
    count +=1
  if count < X:
    X = count
    count = 0
print(X)
Problem p03502 (python)

Fixed submission:
N= int(input())
F = 0
t = N
for i in range(9):
  a = N // (10**(8-i))
  F += a
  N = N - a*(10**(8-i))
if t % F== 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N= input()
F = 0
for i in range(8):
  F += int(N[i])
if int(N)%F== 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N= input()
F = 0
for i in range(8):
  F += int(N[i])
if N%F== 0:
  print("Yes")
else:
  print("No")
Problem p03543 (python)

Fixed submission:
N = int(input())
A= N//1000
B = (N - A*1000) //100
C = (N - A*1000 - B*100) // 10
D = N - A*1000 - B*100 - C*10
if A == B == C:
 print("Yes")
elif B==C==D:
 print("Yes")
else:
 print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
A= N//1000
B = (N - A*1000) //100
C = (N - A*1000 - B*100) // 10
D = N - A*1000 - B*100 - C*10
if A = B = C:
 print("Yes")
elif B=C=D:
 print("Yes")
else:
 print("No")
Problem p03544 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10000)

N = int(input())
l=[-1]*(N+1)

def lyuka(x):
  if l[x] != -1:
    return l[x]
  if x == 0:
    return 2
  if x == 1:
    return 1
  lyu = lyuka(x-1) + lyuka(x-2)
  l[x] = lyu
  return lyu

print(lyuka(N))

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10000)

N = int(input())
l=[-1]*(n+1)

def lyuka(x):
  if l[x] != -1:
    return l[x]
  if x == 0:
    return 2
  if x == 1:
    return 1
  lyu = lyuka(x-1) + lyuka(x-2)
  l[x] = lyu
  return lyu

print(lyuka(N))
Problem p03563 (python)

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

Buggy submission (verdict: Runtime Error):
R = input()
G= input()
print ( 2*G - R)

Buggy submission (verdict: Runtime Error):
R = input()
G= input()
print ( G + (G - R))
Problem p03564 (python)

Fixed submission:
n= int(input())
k = int(input())
z = 1
for i in range(n):
  if z < k:
    z = 2*z
  else:
    z = z+k
print(z)

Buggy submission (verdict: Runtime Error):
n= int(input())
k = int(input())
z = 1
for i in range(n):
  if z < k:
    z = 2*Z
  else:
    z = z+k
print(z)

Buggy submission (verdict: Runtime Error):
n= int(input())
k = int(input())
z = 1
for i in range(n):
  if z < k:
    z = 2Z
  else:
    z = z+k
print(z)

Buggy submission (verdict: Runtime Error):
n= int(input())
k = int(input())
z = 1
for i in range(n):
  if z <= k:
    z = 2Z
  else:
    z = z+k
print(z)

Buggy submission (verdict: Runtime Error):
n= int(input())
k = int(input())
z = 1
for i in range(n):
  if z <= k:
    z = 2Z
  else
    z = z+k
print(z)
Problem p03574 (python)

Fixed submission:
H,W = map(int,input().split())
board =list()
ans =list()
count = 0
for y in range(H):
  board.append (input())
  ans.append(["#"]*W)
for y in range(H):
  for x in range(W):
    if board[y][x] ==".":
      count = 0
      for y2 in range(y-1,y+2):
        for x2 in range(x-1,x+2):
          if y2<0 or y2>= H:
            continue
          elif x2<0 or x2>= W:
            continue
          else:
            if board[y2][x2] == "#":
              count += 1
      ans[y][x] = count
for y in range(H):
  for x in range(W):
    print(ans[y][x],end="")
  print()

Buggy submission (verdict: Runtime Error):
H = int(input())
W = int(input())
name ={}
count = 0
for i in range(H):
  name[i] = input()
  for j in range(W):
    if name[i][j] ==".":
      count = 0
      for k in range(i-1,i+2):
        for l in range(j-1,j+2):
          if name[k][l] == "#":
            count += 1
      name[i][j] = count
for i in range(H):
  print(name[i])
Problem p03606 (python)

Fixed submission:
N = int(input())
counter = 0
for i in range(N):
 l,n = map(int,input().split())
 counter += (n-l+1)
print(counter)

Buggy submission (verdict: Runtime Error):
N = int(input())
counter = 0
for i in range(N):
	l,n = map(int,input().split())
 	counter += (n-l+1)
print(counter)

Buggy submission (verdict: Runtime Error):
N = int(input())
counter = 0
for i in range(N):
	l,n = map(int,input().split())
 	counter += (n - l + 1)
print(counter)

Buggy submission (verdict: Runtime Error):
N = int(input())
counter = 0
for i in range(N)
	l,n = map(int,input().split())
 	counter += (n - l + 1)
print(counter)
Problem p02660 (python)

Fixed submission:
import math
from collections import Counter
def total(n):
    return int((-1 + math.sqrt(1 + 8 * n)) / 2); 
def isPrime(n) : 
  
    # Corner cases 
    if (n <= 1) : 
        return False
    if (n <= 3) : 
        return True
  
    # This is checked so that we can skip  
    # middle five numbers in below loop 
    if (n % 2 == 0 or n % 3 == 0) : 
        return False
  
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
  
    return True
  
def primeFactors(n): 
    tot = 0
    a = []
    while n % 2 == 0: 
        a.append(2)
        n = n / 2
          

    for i in range(3,int(math.sqrt(n))+1,2): 

        while n % i== 0: 
            a.append(i)
            n = n / i 

    if n > 2: 
        a.append(n)
    for i, j in Counter(a).items():
        tot+=total(j)
    return tot


def sol():
    n = int(input())
    if n == 1:
        print(0)
        return
    if isPrime(n):
        print(1)
        return

    print(primeFactors(n))
    
sol()

Buggy submission (verdict: Runtime Error):
import math
def total(n):
    return int((-1 + math.sqrt(1 + 8 * n)) / 2); 
def isPrime(n) : 
  
    # Corner cases 
    if (n <= 1) : 
        return False
    if (n <= 3) : 
        return True
  
    # This is checked so that we can skip  
    # middle five numbers in below loop 
    if (n % 2 == 0 or n % 3 == 0) : 
        return False
  
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
  
    return True
  
def sieveOfEratosthenes(N, s): 
    prime = [False] * (N+1) 
    for i in range(2, N+1, 2):  
        s[i] = 2
    for i in range(3, N+1, 2): 
        if (prime[i] == False): 
              
            s[i] = i 
            for j in range(i, int(N / i) + 1, 2): 
                if (prime[i*j] == False): 
                    prime[i*j] = True 
                    s[i * j] = i 
  
def generatePrimeFactors(N): 

    s = [0] * (N+1) 
    sieveOfEratosthenes(N, s) 
    curr = s[N] 
    cnt = 1 
    tot = 0
    while (N > 1): 
        N //= s[N]
        if (curr == s[N]): 
            cnt += 1
            continue
        tot+=total(cnt)
        curr = s[N] 
        cnt = 1
    return tot
def sol():
    n = int(input())
    if n == 1:
        print(0)
        return
    if isPrime(n):
        print(1)
        return

    print(generatePrimeFactors(n))
    
sol()
Problem p02755 (python)

Fixed submission:
a, b = map(int, input().split())
def solve():
    for i in range(1, 1010):
        if int(i*0.08) == a and int(i*0.1) == b:
            print(i)
            return
    print(-1)

solve()

Buggy submission (verdict: Runtime Error):
m = lambda : (a:=list(map(int,input().split())) , c:=[x for x in range(1,1010) if int(x*0.08)==a[0] and int(x*0.1)==a[1]], min(c) if len(c)>0 else -1 )[2]
print(m)
Problem p02783 (python)

Fixed submission:
h, a = map(int, input().split())
c = 0
while  h > 0:
    h-=a
    c+=1 
print(c)

Buggy submission (verdict: Runtime Error):
print((int(input())+1)//2)
Problem p02784 (python)

Fixed submission:
h, a = map(int, input().split())
arr = list(map(int, input().split()))
for i in arr:
    h-=i
print("Yes" if h<=0 else "No")

Buggy submission (verdict: Runtime Error):
h, a = map(int, input().split())
arr = list(map(int, input.split()))
for i in arr:
    h-=i
print("Yes" if h<=0 else "No")

Buggy submission (verdict: Runtime Error):
h, a = map(int, input().split())
for i in range(a):
    h-=int(input())
print("Yes" if h<=0 else "No")
Problem p02811 (python)

Fixed submission:
n, s = map(int, input().split())
print("Yes" if 500*n >= s else "No")

Buggy submission (verdict: Runtime Error):
n, s = map(int, input())
print("Yes" if 500*n >= s else "No")
Problem p03455 (python)

Fixed submission:
num = input().split(' ')
a = int(num[0])
b = int(num[1])
if (a*b)%2 == 0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
num = input().split(' ')
a = num[0]
b = num[1]
if (a*b)%2 == 0:
  print('Even')
else:
  print('Odd')
Problem p02882 (python)

Fixed submission:
import math
a,b,x=map(int,input().split())
x_2d = x/a
if a*a*b == x:
    print(0)
    exit()
if x/a > (a*b)/2:
    print(90-math.degrees(math.atan(a/(2*b-2*x/(a*a)))))
else:
    print(math.degrees(math.atan(b/(2*x/(a*b)))))

Buggy submission (verdict: Runtime Error):
import math
a,b,x=map(int,input().split())
x_2d = x/a
if x/a > (a*b)/2:
    print(90-math.degrees(math.atan(a/(2*b-2*x/(a*a)))))
else:
    print(math.degrees(math.atan(b/(2*x/(a*b)))))

Buggy submission (verdict: Runtime Error):
import math
a,b,x=map(int,input().split())
x_2d = x/a
print(x_2d)
if x/a > (a*b)/2:
    print(90-math.degrees(math.atan(a/(2*b-2*x/(a*a)))))
else:
    print(math.degrees(math.atan(b/(2*x/(a*b)))))
Problem p02687 (python)

Fixed submission:
s = input()
if s == "ABC":
    print("ARC")
else:
    print("ABC")

Buggy submission (verdict: Runtime Error):
s = int(input())
if s == "ABC":
    print("ARC")
else:
    print("ABC")
Problem p03962 (python)

Fixed submission:
from collections import Counter
p  = map(int ,input().split())
print(len(Counter(p)))

Buggy submission (verdict: Runtime Error):
a = map(int ,input().split())
print(len(Counter(a)))
Problem p02700 (python)

Fixed submission:
t_hp, t_ap, a_hp, a_ap = map(int,input().split())

while t_hp > 0 or a_hp > 0:
    a_hp -= t_ap
    if a_hp <= 0:
        print('Yes')
        break

    t_hp -= a_ap
    if t_hp <= 0:
        print('No')
        break

Buggy submission (verdict: Runtime Error):
t_hp, t_ap, a_hp, a_ap = map(int,input().split())

while t_hp > 0 or a_hp > 0:
    a_hp -= t_ap
    if a_hp <= 0:
        return 'Yes'
        break

    t_hp -= a_ap
    if t_hp <= 0:
        return 'No'
        break

Buggy submission (verdict: Runtime Error):

t_hp, t_ap, a_hp, a_ap = map(int,input().split())

while t_hp == 0 or a_hp == 0:
    a_hp -= t_ap
    if a_hp <= 0:
        return 'Yes'
        break

    t_hp -= a_ap
    if t_hp <= 0:
        return 'No'
        break
Problem p02681 (python)

Fixed submission:
from sys import stdin, stdout
import math,sys
from itertools import permutations, combinations
from collections import defaultdict,deque,OrderedDict
import bisect as bi
import heapq 

'''
#------------------PYPY FAst I/o--------------------------------#
 
def I():return (int(stdin.readline()))
def In():return(map(int,stdin.readline().split()))
'''
#------------------Sublime--------------------------------------#
 
#sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
def I():return (int(input()))
def In():return(map(int,input().split()))



def main():
    try:
        a=list(input())
        b=list(input())
        temp=b.pop()
        if a==b:
            print('Yes')
        else:
            print('No')
    except:
        pass
        
M = 998244353
P = 1000000007
 
if __name__ == '__main__':
    for _ in range(1):
        main()

Buggy submission (verdict: Runtime Error):
from sys import stdin, stdout
import math,sys
from itertools import permutations, combinations
from collections import defaultdict,deque,OrderedDict
import bisect as bi
import heapq 

'''
#------------------PYPY FAst I/o--------------------------------#
 
def I():return (int(stdin.readline()))
def In():return(map(int,stdin.readline().split()))
'''
#------------------Sublime--------------------------------------#
 
sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
def I():return (int(input()))
def In():return(map(int,input().split()))



def main():
    try:
        a=list(input())
        b=list(input())
        temp=b.pop()
        if a==b:
            print('Yes')
        else:
            print('No')
    except:
        pass
        
M = 998244353
P = 1000000007
 
if __name__ == '__main__':
    for _ in range(1):
        main()
Problem p02717 (python)

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

x[0],x[1] = x[1],x[0]
x[0],x[2] = x[2],x[0]

print(str(x[0]) +" " + str(x[1]) + " "+  str(x[2]))

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

Fixed submission:
n,m = map(int,input().split())
if n == m:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().spit())
if n == m:
  print("Yes")
else:
  print("No")
Problem p02811 (python)

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

if 500*k >= x:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
k,x = map(int,input())

if 500*k >= x:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
k,x = mnap(int,input())

if 500*k >= x:
  print("Yes")
else:
  print("No")
Problem p02812 (python)

Fixed submission:
n = int(input())
s = input()
count = 0
for i in range(len(list(s))-2):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
count = 0
for i in range(len(list(s))-1):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
count = 0
for i in range(n-1):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
count = 0
for i in range(n):
  if s[i] == "A" and s[i+1] == "B" and s[i+2] =="C":
    count += 1
print(count)
Problem p02945 (python)

Fixed submission:
a,b = map(int,input().split())
list_ab =[]
list_ab.append(a+b)
list_ab.append(a-b)
list_ab.append(a*b)

print(max(list_ab))

Buggy submission (verdict: Runtime Error):
a,b = map(int,input())
list_ab =[]
list_ab.append(a+b)
list_ab.append(a-b)
list_ab.append(a*b)

print(max(list_ab))
Problem p02946 (python)

Fixed submission:
K, X = map(int,input().split())
ans = []
if K == 1:
    print(X)
else:
    for i in range(-K + 1,K):
        ans.append(X + i)

print(*ans)

Buggy submission (verdict: Runtime Error):
k,x = map(int,input().split())
a = [x]
for i in range(1,k):
  a.append(x+i)
  a.append(x-i)
  
print(" ".join(sorted(a)))
Problem p03029 (python)

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

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

Fixed submission:
a,b = map(int,input().split())
point = 0
point += max(a,b)

if max(a,b) == a:
  point += max(a-1,b)
  print(point)
else:
  point += max(a,b-1)
  print(point)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input())
point = 0
point += max(a,b)

if max(a,b) == a:
  point += max(a-1,b)
  print(point)
else:
  point += max(a,b-1)
  print(point)
Problem p03085 (python)

Fixed submission:
b = list(input())

for i in range(len(b)):
  if b[i] == "A":
    b[i] = "T"
  elif b[i] == "T":
    b[i] = "A"
  elif b[i] == "C":
    b[i] = "G"
  else:
    b[i] = "C"
    
print("".join(b))

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

for i in len(b):
  if b[i] == "A":
    b[i] = "T"
  elif b[i] == "T":
    b[i] = "A"
  elif b[i] == "C":
    b[i] = "G"
  else:
    b[i] = "C"
    
print(b)
Problem p03109 (python)

Fixed submission:
s = input()
s = s.split("/")

if int(s[0]) >= 2019 and int(s[1]) >= 5:
  print("TBD")
else:
  print("Heisei")

Buggy submission (verdict: Runtime Error):
s = input()
s = s.split("/")

if s[0] >= 2019 and s[1] >= 5:
  print("TBD")
else:
  print("Heisei")
Problem p03145 (python)

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

lis = [a,b,c]

lis.remove(max(lis))

print(int(lis[0]*lis[1]/2))

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

lis = [a,b,c]
lis  = lis.remove(max(lis))

print(int(lis[0]*lis[1]/2))
Problem p03264 (python)

Fixed submission:
k = int(input())
if k %2 == 0:
  print(int(k*k/2/2))
elif k%2 ==1:
  print(int((k//2 + 1)*(k//2)))

Buggy submission (verdict: Runtime Error):
k = int(input())
if k %2 == 0:
  print(int(k*k/2/2))
elif k%2 ==1:
  print(int((k/2)*(k//2)/2)

Buggy submission (verdict: Runtime Error):
k = int(input())
if k %2 == 0:
	print(int(k*k/2/2)
elif k%2 ==1:
          print(int((k/2)*(k//2)/2)

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

if k %2 == 0:
  print(int(k*k/2/2)




else:
  print(int((k/2)*(k//2)/2)
Problem p03280 (python)

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

print((a-1)*(b-1))

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

print((a-1)(b-1))
Problem p03284 (python)

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

if n%k == 0:
  print(0)
else:
  print(1)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())

if n%k = 0:
  print(0)
else:
  print(1)
Problem p02583 (python)

Fixed submission:
import collections
import itertools
import sys
input = sys.stdin.readline


def check_tri(a, b, c):
    if a + b > c and b + c > a and c + a > b:
        return True
    else:
        return False


def print_ans(lr):
    """Test Case
    >>> print_ans([4, 4, 9, 7, 5])
    5
    >>> print_ans([4, 5, 4, 3, 3, 5])
    8
    >>> print_ans([9, 4, 6, 1, 9, 6, 10, 6, 6, 8])
    39
    >>> print_ans([1,1])
    0
    """
    ans = 0
    c = collections.Counter(lr)
    target = itertools.combinations(list(c.keys()), 3)
    for t in target:
        if check_tri(t[0], t[1], t[2]):
            tmp = (c[t[0]] * c[t[1]] * c[t[2]])
            ans += tmp
    print(ans)


if __name__ == '__main__':
    N = int(input().rstrip())
    lr = list(map(int, input().rstrip().split()))
    print_ans(lr)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline


def print_ans(X, K, D):
    """Test Case
    >>> print_ans(6, 2, 4)
    2
    >>> print_ans(7, 4, 3)
    1
    >>> print_ans(10, 1, 2)
    8
    >>> print_ans(1000000000000000,1000000000000000,1000000000000000)
    1000000000000000
    """
    # 移動しない
    if K % 2 == 0 and D >= abs(X):
        print(abs(X))
    elif K % 2 != 0 and D >= abs(X):
        print(min(abs(X-D), abs(X+D)))
    elif abs(X) - D * K >= 0:
        print(abs(abs(X) - D * K))
    else:
        # near 0
        tmp = abs(X) // D
        rest_K = K - tmp
        a = abs(abs(X) - tmp * D)
        b = abs(abs(X) - (tmp + 1) * D)
        if rest_K % 2 == 0:
            print(a)
        else:
            print(b)


if __name__ == '__main__':
    X, K, D = map(int, input().rstrip().split())
    print_ans(X, K, D)
Problem p02705 (python)

Fixed submission:
import sys
input = sys.stdin.readline

R = float(input().rstrip())
print(R * 2.0 * 3.1415)

Buggy submission (verdict: Runtime Error):
R = input()
print(R * 3.1415)
Problem p02817 (python)

Fixed submission:
import sys
input = sys.stdin.readline
def print_ans(S):
    """Test Case
    >>> print_ans(["oder",  "atc"])
    atcoder
    """
    print("".join(S[::-1]))

if __name__ == '__main__':
    S = list(input().rstrip().split())
    print_ans(S)

Buggy submission (verdict: Runtime Error):
S,  T = input().split()
print("".join(T,S))