Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
A,B,C = int(input()),int(input()),int(input())
K = int(input())
for _ in range(K):
    if A >= B:
        B = 2*B
    else:
        C = 2*C
        

if C > B > A:
    print('Yes')
else:
  print('No')

Fixed submission:
n = [int(i) for i in input().split()]
K = int(input())

for _ in range(K):
    if n[0] >= n[1]:
        n[1] = n[1] * 2
    else:
        n[2] = 2*n[2]
        

if n[2] > n[1] > n[0]:
    print('Yes')
else:
    print('No')

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

for _ in range(K):
    if A >= B:
        B = 2*B
    else:
        C = 2*C
        
if C > B > A:
    print('Yes')
else:
  print('No')

Fixed submission:
n = [int(i) for i in input().split()]
K = int(input())

for _ in range(K):
    if n[0] >= n[1]:
        n[1] = n[1] * 2
    else:
        n[2] = 2*n[2]
        

if n[2] > n[1] > n[0]:
    print('Yes')
else:
    print('No')

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

for _ in range(K):
    if A >= B:
        B = 2*B
    else:
        C = 2*C
        

if C > B > A:
    print('Yes')
else:
  print('No')

Fixed submission:
n = [int(i) for i in input().split()]
K = int(input())

for _ in range(K):
    if n[0] >= n[1]:
        n[1] = n[1] * 2
    else:
        n[2] = 2*n[2]
        

if n[2] > n[1] > n[0]:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
a,b,c,k = map(int, input().split())

la = [1]*a
lb = [0]*b
lc = [-1]*c
m = 0
l = la + lb + lc 

for i in range(k):
    m = m + l[i]
print(m)


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

if k < a:
    print(k)
elif a <=k  and k <= a+b:
    print(a)
elif a + b < k and k <= a  + b + c:
    print(a-k+a+b)
Buggy python submission (verdict: Time Limit Exceeded):
h,n = map(int,input().split())
li = list(map(int,input().split()))
ls =[]
for i in range(n):
    m = li.index(max(li))
    ls.append(li.pop(m))

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

Fixed submission:
h,n = map(int,input().split())
li = list(map(int,input().split()))
if sum(li) >= h:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
li = list(map(int,input().split()))

for i in range(k):
    m = li.index(max(li))
    li[m] = 0

print(sum(li))

Fixed submission:
n,k = map(int,input().split())
li = list(map(int,input().split()))
ls = sorted(li, reverse=True)
if k >= len(li):
    print(0)
else:
    print(sum(ls[k:]))

Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
li = list(map(int,input().split()))

for i in range(k):
    if len(li) > 0:
        m = li.index(max(li))
        li.pop(m)

print(sum(li))

Fixed submission:
n,k = map(int,input().split())
li = list(map(int,input().split()))
ls = sorted(li, reverse=True)
if k >= len(li):
    print(0)
else:
    print(sum(ls[k:]))
Buggy python submission (verdict: Runtime Error):
max_len = int(input())
str = input()
str_len = len(str)
if str_len <= max_len:
  print(str)
else:
  print(str[0:max_len] + "...")

Fixed submission:
str = input()
a = str[-1:]
if a == "3":
	result = "bon"
elif (a == "0") or (a == "1") or (a == "6") or (a == "8"):
  	result = "pon"
elif (a == "2") or (a == "4") or (a == "5") or (a == "7") or (a == "9"):
  	result = "hon"
else:
  	result = "ng"
    
print(result)

Buggy python submission (verdict: Runtime Error):
str = input()
a = str[-1:]
if a == 3:
	result = "bon"
elif (a == 0) or (a == 1) or (a == 6) or (a == 8):
  	result = "pon"
elif (a == 2) or (a == 4) or (a == 5) or (a == 7) or (a == 9):
  	result = "hon"
    
print(result)


Fixed submission:
str = input()
a = str[-1:]
if a == "3":
	result = "bon"
elif (a == "0") or (a == "1") or (a == "6") or (a == "8"):
  	result = "pon"
elif (a == "2") or (a == "4") or (a == "5") or (a == "7") or (a == "9"):
  	result = "hon"
else:
  	result = "ng"
    
print(result)

Buggy python submission (verdict: Runtime Error):
str = input()
a = str[-1:]
if a == "3"
	result = "bon"
  elseif (a == "0") or (a == "1") or (a == "6") or (a == "8")
  	result ="pon"
  else 
  	result = "hon"
    
print(result)

Fixed submission:
str = input()
a = str[-1:]
if a == "3":
	result = "bon"
elif (a == "0") or (a == "1") or (a == "6") or (a == "8"):
  	result = "pon"
elif (a == "2") or (a == "4") or (a == "5") or (a == "7") or (a == "9"):
  	result = "hon"
else:
  	result = "ng"
    
print(result)
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
A = list(map(int,input().split()))
B = []

def product(array):
  a = 1
  for k in array:
    a *= k
  return a

for i in range(N-K+1):
  B.append(product(A[i:i+K]))
  
count = 0
for b in B:
  if count == 0:
    b_old = b
  else:
    if b > b_old:
      print('Yes')
    else:
      print('No')
  b_old = b
  count += 1

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

for i in range(N-K):
  if A[i] < A[i+K]:
    print('Yes')
  else:
    print('No')
Buggy python submission (verdict: Runtime Error):
S = input()
S = list(input())
S_len = len(S)
ans = 0
i = 0
for _ in range(S_len):
  if S[0] == 'R':
    ans += S[1:].count('B') * S[1:].count('G')
    for j in range(int(len(S)/2+1)):
      try:
        if S[j+1] != S[j*2+2] and S[j*2+2] !='R' and S[j+1] !='R':
          ans-=1
      except:
        pass
  if S[0] == 'B':
    ans += S[1:].count('R') * S[1:].count('G')
    for j in range(int(len(S)/2+1)):
      try:
        if S[j+1] != S[j*2+2] and S[j*2+2] !='B' and S[j+1] !='B':
          ans-=1
      except:
        pass
  if S[0] == 'G':
    ans += S[1:].count('B') * S[1:].count('R')
    for j in range(int(len(S)/2+1)):
      try:
        if S[j+1] != S[j*2+2] and S[j*2+2] !='G' and S[j+1] !='G':
          ans-=1
      except:
        pass
  S  = S[1:]
print(ans)

Fixed submission:
a = input()

b = 0
for i in a:
  if i == '7':
    print('Yes')
    break
  b+=1
  if b == 3:
    print('No')
Buggy python submission (verdict: Runtime Error):
a = [int(i) for i in input().stlip()]
b = [a[2],a[0],a[1]]

for i in b:
  print(i)

Fixed submission:
a = [int(i) for i in input().split()]
b = [a[2],a[0],a[1]]
 
for i in b:
  print(i)
Buggy python submission (verdict: Time Limit Exceeded):
N,X,Y = map(int,input().split())
ans = [0]*(N-1)
X , Y = X-1 , Y-1#配列の場所に合わせる

for i in range(N):
  for k in range(N):
    if i == k:
      pass
    else:
      if i < k:
        ans_ = min(abs(k-i),abs(X-i)+abs(Y-k)+1)
        ans[ans_-1] += 1
      else:
        ans_ = min(abs(k-i),abs(X-k)+abs(Y-i)+1)
        ans[ans_-1] += 1

ans = [int(i/2) for i in ans]

for i in ans:
  print(i)

Fixed submission:
n,x,y=map(int,input().split())
c=[0]*~-n
for i in range(n):
  for j in range(i):
    c[min(~j+i,abs(~j+x)+abs(~i+y))]+=1
for i in c:
  print(i)
Buggy python submission (verdict: Runtime Error):
from collections import defaultdict
from itertools import product
 
H,W,K = map(int,input().split())
S = [input() for i in range(H)]
 
C = [[int(S[i][k]) for i in range(H)] for k in range(W)]
answer = H*W #出力がこれを超えることはない
for X in product([False,True],repeat = H-1):
  M = [[0]]
  ans = sum(X)
  if ans > answer:#初期値がanswerよりも大きかったら考える必要がない
    continue
  for i,x in enumerate(X):#配列Mの作成
    if x:
      M.append([])
    M[-1].append(i+1)
  D = [0]*len(M)
  for c in C:
    for k,m in enumerate(M):
      D[k] += sum(c[i] for i in m)#k番目の要素に足していく
      #Dにどんどん代入することによってどの列まで足すことができるか算出することができる
    if any(d>K for d in D):#一つでもKを超えていたら
      ans += 1
      if ans >answer:
        break
      D = [sum(c[i] for i in m) for m in M]#超えた行について再び調査
      if any(d>K for d in D):
        ans = answer + 1
        #デフォルトanswerの結果より高い値にしてこの結果が出力にならないように設定する
        break
  answer = min(answer,ans)#あるXに対してanswerを算出(更新)
print(answer)

Fixed submission:
import numpy as np
a = [int(i) for i in list(input().split())]
b = int((a[0]*(a[0]-1) +a[1]*(a[1]-1))/2)

print(b)

Buggy python submission (verdict: Runtime Error):
from collections import defaultdict
from itertools import product
 
H, W, K = map(int, input().split())
S = [input() for _ in range(H)]
 
i = 0
while i < len(S):
  if '1' in S[i]:
    i += 1
  else:
    del S[i]
H = len(S)
 
C = [[int(s[i]) for s in S] for i in range(W)]#列を一括りにする
 
total = sum(sum(c) for c in C)#すべての値の合計を算出
 
if total <= K:
  answer = 0
else:
  answer = H * W
  for X in product([False, True], repeat=H-1):#Hは行数
    #あるXについて一回目のfor文が回る
    ans = sum(X)#Trueの数を換算
    if ans > answer:
      continue
    M = [[0]]
    for i, x in enumerate(X):
      if x:#Trueなら実行
        M.append([])#Trueの数の配列が作成される
      M[-1].append(i+1)#一番最後にその番目をappendする
    print('M{}'.format(M))
    D = [0] * len(M)#初期値を設定
    for c in C:
      print('c{}'.format(c))
      for k, m in enumerate(M):
        print('m{}'.format(m))
        D[k] += sum(c[i] for i in m)#k番目の要素に足していく
        #Dにどんどん代入することによってどの列まで足すことができるか算出することができる
      print('D1{}'.format(D))
      if any(d > K for d in D):#一つでもKを超えていたら
        ans += 1
        if ans > answer:
          break
        D = [sum(c[i] for i in m) for m in M]#Dの更新(1番最初のDに戻る)
        print('D2{}'.format(D))
        if any(d > K for d in D):#一つでもKを超えていたら
          ans = answer + 1#ansの更新
          break
    answer = min(answer, ans)

print(answer)

Fixed submission:
import numpy as np
a = [int(i) for i in list(input().split())]
b = int((a[0]*(a[0]-1) +a[1]*(a[1]-1))/2)

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

line = [int(k) for k in input().split()]
b = 0
for k in range(len(line)):
  if line[k] % 2 == 0:
    if not line[k] % 5 == 0 and not line[k] % 3 == 0:
      print("DENIED")
      break
  elif k == a-1:
    print("APPROVED")

Fixed submission:
import collections
a = input().split()
c = list(collections.Counter(a).values())
b = 0
for k in c:
  b += 1
  if k == 2:
    print("Yes")
    break
  elif b == 3:
    print("No")
  elif k == 3:
    print("No")
Buggy python submission (verdict: Runtime Error):
import collections
a = int(input())
line = [input() for k in range(a)]
c = collections.Counter(line)
common = c.most_common()
max_number = common[0][1]
max_common = []
for k in range(a):
  if common[k][1] == max_number:
    max_common.append(common[k][0])
  else:
    break
for k in sorted(max_common):
  print(k)

Fixed submission:
import collections
a = int(input())
line = [input() for k in range(a)]
c = collections.Counter(line)
common = c.most_common()
max_number = common[0][1]
a = len(common)
max_common = []
for k in range(a):
  if common[k][1] == max_number:
    max_common.append(common[k][0])
  else:
    break
for k in sorted(max_common):
  print(k)

Buggy python submission (verdict: Runtime Error):
import collections
a = int(input())
line = [input() for k in range(a)]
c = collections.Counter(line)
max_number = max(c.values())
common = c.most_common()
max_common = []
for k in range(a):
  if common[k][1] == max_number:
    max_common.append(common[k][0])
  else:
    break
for k in sorted(max_common):
  print(k)

Fixed submission:
import collections
a = int(input())
line = [input() for k in range(a)]
c = collections.Counter(line)
common = c.most_common()
max_number = common[0][1]
a = len(common)
max_common = []
for k in range(a):
  if common[k][1] == max_number:
    max_common.append(common[k][0])
  else:
    break
for k in sorted(max_common):
  print(k)

Buggy python submission (verdict: Runtime Error):
import collections
a = int(input())
line = [input() for k in range(a)]
 
c = collections.Counter(line)
 
max_number = max(c.values())
common = c.most_common()
 
max_common = []
for k in range(a):
  if common[k][1] == max_number:
    max_common.append(common[k][0])
  else:
    break
for k in sorted(max_common):
  print(k)

Fixed submission:
import collections
a = int(input())
line = [input() for k in range(a)]
c = collections.Counter(line)
common = c.most_common()
max_number = common[0][1]
a = len(common)
max_common = []
for k in range(a):
  if common[k][1] == max_number:
    max_common.append(common[k][0])
  else:
    break
for k in sorted(max_common):
  print(k)

Buggy python submission (verdict: Runtime Error):
import collections
a = int(input())
line = [input() for k in range(a)]

c = collections.Counter(line)

max_number = max(c.values())
common = c.most_common()

max_common = []
for k in range(a):
  if common[k][1] == max_number:
    max_common.append(common[k][0])
  else:
    break
for k in sorted(max_common):
  print(k)

Fixed submission:
import collections
a = int(input())
line = [input() for k in range(a)]
c = collections.Counter(line)
common = c.most_common()
max_number = common[0][1]
a = len(common)
max_common = []
for k in range(a):
  if common[k][1] == max_number:
    max_common.append(common[k][0])
  else:
    break
for k in sorted(max_common):
  print(k)
Buggy python submission (verdict: Runtime Error):
import numpy as np
 
first_int = [int(k) for k in input().split()]
a = first_int[0]
b = first_int[1]
secound_list = [int(k) for k in input().split()]
 
all_sigm = [k for k in secound_list]
max_index = all_sigm.index(max(all_sigm))
print(sum(all_sigm[max_index:max_index+b]))

Fixed submission:
a = input().split()
b = [int(k) for k in input().split()]
c = input()

if a[0] == c:
  b[0] -= 1
else:
  b[1] -= 1

print('{0} {1}'.format(b[0],b[1]))

Buggy python submission (verdict: Runtime Error):
import numpy as np
 
first_int = [int(k) for k in input().split()]
a = first_int[0]
b = first_int[1]
secound_list = [int(k) for k in input().split()]
 
def sigm(k):
  return k*(k+1)/2
 
all_sigm = [sigm(k) for k in secound_list]
all_sigm_ = [sum(all_sigm[k:k+b]) for k in range(a)]
print(max(all_sigm_))

Fixed submission:
a = input().split()
b = [int(k) for k in input().split()]
c = input()

if a[0] == c:
  b[0] -= 1
else:
  b[1] -= 1

print('{0} {1}'.format(b[0],b[1]))
Buggy python submission (verdict: Time Limit Exceeded):
first_int = int(input())
secound_list = [int(k) for k in input().split()]

for k in range(first_int):
  if secound_list.count(secound_list[k]) >= 2:
    print('NO')
    break
  if k == first_int-1:
    print('YES')

Fixed submission:
first_int = int(input())
secound_list = [int(k) for k in input().split()]

def has_duplicates(seq):
    return len(seq) != len(set(seq))

if has_duplicates(secound_list) == False:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[0]-n[1]):
    if(m[i+k]>m[i]):
        print("Yes")
    else:
        print("No")

Fixed submission:
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[0]-n[1]):
    if(m[i+n[1]]>m[i]):
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Runtime Error):
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[1]-1,n[0]):
    if(m[i]<m[i+1]):
        print("Yes")
    else:
        print("No")

Fixed submission:
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[0]-n[1]):
    if(m[i+n[1]]>m[i]):
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Runtime Error):
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[1],n[0]):
    if(m[i]<m[i+1]):
        print("Yes")
    else:
        print("No")

Fixed submission:
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[0]-n[1]):
    if(m[i+n[1]]>m[i]):
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Runtime Error):
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
a=[]
for i in range(n[1],n[0]):
    if(a[i]<a[i+1]):
        print("Yes")
    else:
        print("No")

Fixed submission:
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[0]-n[1]):
    if(m[i+n[1]]>m[i]):
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
a=[]
c=0
x=1
for i in range(0,n[1]):
  x*=m[i]
a.append(x)
#print(a)
l=0
k=n[1]
for i in range(0,n[0]-n[1]):
  x//=m[l]
  x*=m[k]
  a.append(x)
  #print(a)
  l+=1
  k+=1
for i in range(0,len(a)-1):
    if(a[i]<a[i+1]):
        print("Yes")
    else:
        print("No")

Fixed submission:
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[0]-n[1]):
    if(m[i+n[1]]>m[i]):
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split())

f = False
for num_of_tsuru in range(0, x+1):
    num_of_kame = x - num_of_tsuru
    if (2*num_of_tsuru) + (4*num_of_kame) == y:
        f = True
        break

if f:
    print('Yes')
else:
    print('No')

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

print(x.index(0)+1)
Buggy python submission (verdict: Time Limit Exceeded):
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N = intinp()
A = list(mapint_inp())

lim = 10**18
ans = 1
f = True
for A_i in A:
    ans = ans*A_i
    if 0 in A:
        ans = 0
        break
    if ans > lim:
        f = False
        break

if f:
    print(ans)
else:
    print(-1)

Fixed submission:
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N = intinp()
A = list(mapint_inp())

lim = 10**18
ans = 1
f = True
if 0 in A:
    ans = 0
else:
    for A_i in A:
        ans = ans*A_i
        if ans > lim:
            f = False
            break

if f:
    print(ans)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N, K = mapint_inp()

l = list(range(N+1))
mn_list = []
for i in range(K, N+2):
    mn_list.append(sum(l[:i]))

r = l[::-1]
mx_list = []
for i in range(K, N+2):
    mx_list.append(sum(r[:i]))

ans = 0
for j in range(N):
    ans += mx_list[j]-mn_list[j]+1

print(ans)

Fixed submission:
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

R = intinp()

import math

p = math.pi

print(2*p*R)
Buggy python submission (verdict: Time Limit Exceeded):
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N, K = mapint_inp()

l = list(range(N+1))
mn_list = []
for i in range(K, N+2):
    mn_list.append(sum(l[:i]))

r = l[::-1]
mx_list = []
for i in range(K, N+2):
    mx_list.append(sum(r[:i]))

ans = 0
for j in range(len(mn_list)):
    ans += mx_list[j]-mn_list[j]+1

print(ans)

Fixed submission:
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N, K = mapint_inp()
MOD = 10**9+7

ans = 0
for i in range(K, N+2):
    mn = i*(i-1) // 2
    mx = i*(2*N-i+1) // 2
    ans += mx - mn + 1

print(ans%MOD)

Buggy python submission (verdict: Time Limit Exceeded):
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N, K = mapint_inp()

l = list(range(N+1))
mn_list = []
for i in range(K, N+2):
    mn_list.append(sum(l[:i]))

r = l[::-1]
mx_list = []
for i in range(K, N+2):
    mx_list.append(sum(r[:i]))

ans = 0
for mn, mx in zip(mn_list, mx_list):
    ans += mx-mn+1

print(ans)

Fixed submission:
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N, K = mapint_inp()
MOD = 10**9+7

ans = 0
for i in range(K, N+2):
    mn = i*(i-1) // 2
    mx = i*(2*N-i+1) // 2
    ans += mx - mn + 1

print(ans%MOD)

Buggy python submission (verdict: Time Limit Exceeded):
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

import itertools
from pprint import pprint

N, K = mapint_inp()
l = list(range(N+1))
r = l[::-1]
ans = 0
while(K < N+2):
    mn = sum(l[:K])
    mx = sum(r[:K])
    ans += mx-mn+1
    K+=1

print(ans)

Fixed submission:
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N, K = mapint_inp()
MOD = 10**9+7

ans = 0
for i in range(K, N+2):
    mn = i*(i-1) // 2
    mx = i*(2*N-i+1) // 2
    ans += mx - mn + 1

print(ans%MOD)

Buggy python submission (verdict: Time Limit Exceeded):
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

import itertools
from pprint import pprint

N, K = mapint_inp()
l = list(range(N+1))
ans = 0
while(K < N+2):
    mn = sum(l[:K])
    mx = sum(l[::-1][:K])
    ans += mx-mn+1
    K+=1

print(ans)

Fixed submission:
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

N, K = mapint_inp()
MOD = 10**9+7

ans = 0
for i in range(K, N+2):
    mn = i*(i-1) // 2
    mx = i*(2*N-i+1) // 2
    ans += mx - mn + 1

print(ans%MOD)
Buggy python submission (verdict: Runtime Error):
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

import math
from functools import reduce
import itertools

K = intinp()

def gcd(*num):
    return reduce(math.gcd, num)

ans = 0
for i in range(1, K+1):
    if i ==1:
        ans += 1
        continue
    for j in range(1, K+1):
        if i ==1:
        ans += 1
        continue
        for k in range(1, K+1):
            if i ==1:
                ans += 1
                continue
            ans += gcd(i, j, k)

print(ans)


Fixed submission:
def mapint_inp():
    return map(int, input().split())
 
def intinp():
    return int(input())
 
import math
import itertools
  
K = intinp()
 
ans = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        ij = math.gcd(i, j)
        for k in range(1, K+1):
            ans += math.gcd(ij, k)
 
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
def mapint_inp():
    return map(int, input().split())

def intinp():
    return int(input())

import math
from functools import reduce
import itertools


K = intinp()

def gcd(*num):
    return reduce(math.gcd, num)

ans = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        for k in range(1, K+1):
            ans += gcd(i, j, k)

print(ans)


Fixed submission:
def mapint_inp():
    return map(int, input().split())
 
def intinp():
    return int(input())
 
import math
import itertools
  
K = intinp()
 
ans = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        ij = math.gcd(i, j)
        for k in range(1, K+1):
            ans += math.gcd(ij, k)
 
print(ans)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = list(map(int, input().split()))
vote_sum = sum(A)
cnt = 0
y = "Yes"
n = "no"

for i in range(N):
	if (A[i]*4*M) >= T:
		cnt += 1

if cnt >= M:
	print(y)
else:
	print(n)

Fixed submission:
N, M = map(int, input().split())
A = list(map(int, input().split()))

total = sum(A)
def is_4M(x):
    a = total / (4*M)
    if x < a:
        return False
    return True

cnt = 0
for a in A:
    if is_4M(a):
        cnt += 1

if cnt >= M:
    print("Yes")
else:
    print("No")