Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
fac=[0]*200001#iの階乗mod(1000000007)
inv=[0]*200001#iの逆元mod(1000000007)
fac[0]=1
ans=0
for i in range(1,200001):
    fac[i]=fac[i-1]*i%1000000007
inv[200000]=pow(fac[200000],1000000005,1000000007)
for i in range(199999,0,-1):
    inv[i]=(inv[i+1]*(i+1))%1000000007
    inv[0]=1
for i in range(h-a):
    if i==0:
        if h==1:
            x=1
        else:
            x=(fac[w-b+h-2
                   -i]*inv[w-1-b]*inv[h-1-i])%1000000007
    elif w==b+1:
        x=(fac[b-1+i]*inv[b-1]*inv[i])%1000000007
    else:
        x=((fac[b-1+i]*inv[b-1]*inv[i])%1000000007)*((fac[w-b+h-2-i]*inv[w-b-1]*inv[h-1-i])%1000000007)
    ans=(ans+x)%1000000007
print(ans)

Fixed submission:
h,w,a,b=map(int,input().split())
fac=[0]*200001#iの階乗mod(1000000007)
inv=[0]*200001#iの逆元mod(1000000007)
fac[0]=1
ans=0
for i in range(1,200001):
    fac[i]=fac[i-1]*i%1000000007
inv[200000]=pow(fac[200000],1000000005,1000000007)
for i in range(199999,0,-1):
    inv[i]=(inv[i+1]*(i+1))%1000000007
    inv[0]=1
for i in range(h-a):
    if i==0:
        if h==1:
            x=1
        else:
            x=(fac[w-b+h-2
                   -i]*inv[w-1-b]*inv[h-1-i])%1000000007
    else:
        x=((fac[b-1+i]*inv[b-1]*inv[i])%1000000007)*((fac[w-b+h-2-i]*inv[w-b-1]*inv[h-1-i])%1000000007)
    ans=(ans+x)%1000000007
print(ans)
Buggy python submission (verdict: Runtime Error):
n, d = list(map(int, input().strip()))
cnt = 0
d2 = d**2
x, y = [], []
for i in range(n):
	tx, ty = list(map(int, input().strip()))
	x.append(tx)
	y.append(ty)

for i in range(n):
	if(x[i]**2 + y[i]**2 <= d2):
		cnt += 1
print(cnt)

Fixed submission:
n, d = list(map(int, input().split()))
cnt = 0
d2 = d**2
x, y = [], []
for i in range(n):
	tx, ty = list(map(int, input().split()))
	x.append(tx)
	y.append(ty)

for i in range(n):
	if(x[i]**2 + y[i]**2 <= d2):
		cnt += 1
print(cnt)

Buggy python submission (verdict: Runtime Error):
n, d = list(map(int, input().strip()))
cnt = 0
d2 = d**2
for i in range(n):
	x, y = list(map(int, input().strip()))
	if(x**2 + y**2 <= d2):
		cnt += 1
print(cnt)


Fixed submission:
n, d = list(map(int, input().split()))
cnt = 0
d2 = d**2
x, y = [], []
for i in range(n):
	tx, ty = list(map(int, input().split()))
	x.append(tx)
	y.append(ty)

for i in range(n):
	if(x[i]**2 + y[i]**2 <= d2):
		cnt += 1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
def func(n, a):
	tmp = [0 for i in range(n)]
	tmp[0] = a[0]
	if(0 in a):
		return 0
	for i in range(1, n):
		tmp[i] = tmp[i-1] * a[i]
		
	if(tmp[i] > 10**18):
			return '-1'
	
	return str(tmp[-1])

n = int(input())
a = list(map(int, input().split()))
s = func(n, a)
print(s)

Fixed submission:
def func(n, a):
	if(0 in a):
		return 0
	tmp = [0 for i in range(n)]
	tmp[0] = a[0]
	for i in range(1, n):
		tmp[i] = tmp[i-1] * a[i]
		if(tmp[i] > 10**18):
			return '-1'
	
	return str(tmp[-1])

n = int(input())
a = list(map(int, input().split()))
s = func(n, a)
print(s)

Buggy python submission (verdict: Time Limit Exceeded):

def func(n, a):
	tmp = [0 for i in range(n)]
	tmp[0] = a[0]
	for i in range(1, n):
		tmp[i] = tmp[i-1] * a[i]
		# print(tmp[i])s
	if(tmp[i] > 10**18):
			return '-1'
	
	return str(tmp[-1])

n = int(input())
a = list(map(int, input().split()))
s = func(n, a)
print(s)

Fixed submission:
def func(n, a):
	if(0 in a):
		return 0
	tmp = [0 for i in range(n)]
	tmp[0] = a[0]
	for i in range(1, n):
		tmp[i] = tmp[i-1] * a[i]
		if(tmp[i] > 10**18):
			return '-1'
	
	return str(tmp[-1])

n = int(input())
a = list(map(int, input().split()))
s = func(n, a)
print(s)
Buggy python submission (verdict: Time Limit Exceeded):
[N, K] = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]

S = 1
i = 0
p = A[i]
i += 1

for s in A[:K]:
  S *= s 

for s in A[K:]:
  _S = S
  S = (S // p) * s
  p = A[i]
  i += 1
  if _S < S:
    print('Yes')
  else:
    print('No')

Fixed submission:
[N, K] = [int(i) for i in input().split()]
A = [int(i) for i in 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):
N = int(input())
SUM = 0
map = [0] * 100000
for i in [int(i) for i in input().split()]:
  SUM += i
  map[i] += 1

Q = int(input())
for i in range(Q):
  [b,c] = [int(i) for i in input().split()]
  SUM += (c-b)*map[b]
  print(SUM)
  map[c] += map[b]
  map[b] = 0

Fixed submission:
N = int(input())
SUM = 0
map = [0] * 100001
for i in [int(i) for i in input().split()]:
  SUM += i
  map[i] += 1

Q = int(input())
for i in range(Q):
  [b,c] = [int(i) for i in input().split()]
  SUM += (c-b)*map[b]
  print(SUM)
  map[c] += map[b]
  map[b] = 0
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(i) for i in input().split()]
  
O = [0] * N

for i in range(N):
  for j in range(N):
    if i == j:
      continue
    O[i] ^= A[j]

print(' '.join([str(s) for s in O]))

Fixed submission:
N = int(input())
SUM = 0
A = []
O = []
for i in input().split():
  i = int(i)
  SUM ^= i
  A.append(i)

for a in A:
  O.append(SUM ^ a)

print(' '.join([str(s) for s in O]))

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

for i in range(N):
  for j in range(N):
    if i == j:
      continue
    O[i] ^= A[j]

print(O)

Fixed submission:
N = int(input())
SUM = 0
A = []
O = []
for i in input().split():
  i = int(i)
  SUM ^= i
  A.append(i)

for a in A:
  O.append(SUM ^ a)

print(' '.join([str(s) for s in O]))
Buggy python submission (verdict: Runtime Error):
[S,Y] = [int(i) for i in input().split()]

if Y % 2 == 1:
  print("No")
else:
  for x in range(S+1):
    y = S - x
    if 4*x + 2*y == Y:
      print("Yes")
      break
  else:
    print("No")

Fixed submission:
array = [int(i) for i in input().split()]
i = 1

for x in array:
  if x == 0:
    print(i)
    break
  i += 1
Buggy python submission (verdict: Runtime Error):
[a,b,c] = [int(i) for i in input().split()]

if a == b:
  l = 4*a
  r = c
else:
  if a+b < c:
  	l = 4*a*b
  	r = (c -(a+b))**2
  else:
    print("No")
    
if l < r:
  print("Yes")
else:
  print("No")

Fixed submission:
import math
[a,b,c] = [int(i) for i in input().split()]

if a == b:
  l = 4*a
  r = c
else:
  if a+b < c:
  	l = 4*a*b
  	r = (c -(a+b))**2
  else:
    l = 2 * math.sqrt(a*b)
    r = c - (a + b)
    
if l < r:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
mod = 10**9+7
ans = 0

for i in range(n):
    for j in range(i+1, n):
       ans += (a[i]*a[j])%mod
       ans %= mod
print(ans)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
mod = 10**9+7
a0 = sum(a[1:])
ans = 0

for i in range(n-1):
    ans += (a0*a[i])%mod
    ans %= mod
    a0 -= a[i+1]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
groups = [x for x in range(n)]
count = [0]*n

def UnionFind(x):
    while x != groups[x]:
        x = groups[x]
    return x

for _ in range(m):
    x, y = map(int, input().split())
    x, y = UnionFind(x-1), UnionFind(y-1)
    if x != y:
        groups[y] = x

for i in range(n):
    count[UnionFind(i)] += 1
print(max(count))


Fixed submission:
n, m = map(int, input().split())
groups = [x for x in range(n)]
count = [0]*n

def UnionFind(x):
    a = x
    while a != groups[a]:
        a = groups[a]
    groups[x] = a
    return a

for _ in range(m):
    x, y = map(int, input().split())
    x, y = UnionFind(x-1), UnionFind(y-1)
    if x != y:
        groups[y] = x
    
for i in range(n):
    count[UnionFind(i)] += 1
print(max(count))
Buggy python submission (verdict: Time Limit Exceeded):
from math import gcd

def prime_factorize(n):
    a = set()
    for i in range(2, int(n**0.5)+1):
        while n%i == 0:
            a.add(i)
            n //= i
    if n != 1:
        a.add(n)
    return a

n = int(input())
a = list(map(int, input().split()))
c0 = False
vals = []
for i, j in enumerate(a):
    vals += prime_factorize(j)
    if len(vals) != len(set(vals)) and c0 is False:
        c0 = True
        
if c0 is False:
    print('pairwise coprime')
else:
    b = gcd(a[0], a[1])
    for i in range(2, n):
        b = gcd(b, a[i])
    if b == 1:
        print('setwise coprime')
    else:
        print('not coprime')

        


Fixed submission:
import sys
from math import gcd

n = int(input())
a = list(map(int, input().split()))

b = gcd(a[0], a[1])
for i in range(2, n):
    b = gcd(b, a[i])
if b != 1:
    print('not coprime')
else:
    c = set()
    num = max(a)
    m = 1000000
    vals = [0]*(m+1)

    for i in range(2, m):
        if vals[i] != 0:
            continue
        j = 1
        while True:
            t = i*j
            if t > m:
                break
            if vals[t] == 0:
                vals[t] = i
            j += 1
    d = dict()
    for i in a:
        p = i
        while p != 1:
            if p in d:
                print("setwise coprime")
                sys.exit()
            d[p] = 1
            p = int(p/vals[p])
    print("pairwise coprime")

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

def prime_factorize(n):
    a = set()
    while n%2 == 0:
        a.add(2)
        n //= 2
    f = 3
    while f**2 <= n:
        if n%f == 0:
            a.add(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.add(n)
    return a

n = int(input())
a = list(map(int, input().split()))
c0 = False
vals = []
for i, j in enumerate(a):
    vals += prime_factorize(j)
    if len(vals) != len(set(vals)) and c0 is False:
        c0 = True
        
if c0 is False:
    print('pairwise coprime')
else:
    b = gcd(a[0], a[1])
    for i in range(2, n):
        b = gcd(b, a[i])
    if b == 1:
        print('setwise coprime')
    else:
        print('not coprime')

        


Fixed submission:
import sys
from math import gcd

n = int(input())
a = list(map(int, input().split()))

b = gcd(a[0], a[1])
for i in range(2, n):
    b = gcd(b, a[i])
if b != 1:
    print('not coprime')
else:
    c = set()
    num = max(a)
    m = 1000000
    vals = [0]*(m+1)

    for i in range(2, m):
        if vals[i] != 0:
            continue
        j = 1
        while True:
            t = i*j
            if t > m:
                break
            if vals[t] == 0:
                vals[t] = i
            j += 1
    d = dict()
    for i in a:
        p = i
        while p != 1:
            if p in d:
                print("setwise coprime")
                sys.exit()
            d[p] = 1
            p = int(p/vals[p])
    print("pairwise coprime")
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())

if k%2 == 0 or k%5 ==0:
    print(-1)
else:
    a = 7
    while a%k != 0:
        a = int(str(a)+'7')
    print(len(str(a)))
    


Fixed submission:
import sys
k = int(input())

if k%2 == 0 or k%5 ==0:
    print(-1)
else:
    a = 7%k
    if a == 0:
        print(1)
    else:
        for i in range(2, 10000000):
            a = (10*a+7)%k
            if a == 0:
                print(i)
                sys.exit()
        print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
a = list(map(int, input().split()))
val = 1
for i in range(0, k):
    val *= a[i]
    
for i in range(k, n):
    num = val*a[i]/a[i-k]
    if num > val:
        print('Yes')
    else:
        print('No')
    val = num


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

for i in range(k, n):
    if a[i] > a[i-k]:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = list(map(int, input().split()))
val = 1
for i in range(0, k):
    val *= a[i]
    
for i in range(k, n):
    num = val*a[i-k+1]/a[i+1]
    if num > val:
        print('Yes')
    else:
        print('No')
    val = num


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

for i in range(k, n):
    if a[i] > a[i-k]:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
a = list(map(int, input().split()))
val = 1
for i in range(0, k):
    val *= a[i]
    
for i in range(k, n):
    num = 1
    for j in range(i-k+1, i+1):
        num *= a[j]
    if num > val:
        print('Yes')
    else:
        print('No')
    val = num


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

for i in range(k, n):
    if a[i] > a[i-k]:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = [0 for _ in range(10000)]
for i in range(1, 101):
    for j in range(1, 101):
        for k in range(1, 101):
            v = i*i+j*j+k*k+i*j+j*k+k*i;
            if v < 10000:
                ans[v] += 1
for i in range(n):
    print(ans[i+1])


Fixed submission:
n = int(input())
ans = [0 for _ in range(10050)]
for i in range(1, 105):
    for j in range(1, 105):
        for k in range(1, 105):
            v = i*i+j*j+k*k+i*j+j*k+k*i;
            if v < 10050:
                ans[v] += 1
for i in range(n):
    print(ans[i+1])
Buggy python submission (verdict: Runtime Error):
import sympy
n = int(input())
ans, count = 0, 0

for j in range(1, n+1):
    a = n//j
    ans += a*(a+1)*j//2
print(ans)


Fixed submission:
n = int(input())
ans = 0

for j in range(1, n+1):
    a = n//j
    ans += a*(a+1)*j//2
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 0
def num(n):
    i = 1
    a = []
    for i in range(1, int(n**0.5)+1):
        if n%i == 0:
            a.append(i)
            if i != n//i:
                a.append(n//i)
    return len(a)

for i in range(1, n+1):
    ans += i*num(i)
print(ans)


Fixed submission:
n = int(input())
ans = 0

for j in range(1, n+1):
    a = n//j
    ans += a*(a+1)*j//2
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
b = [a[j] for j in range(len(a))]

for i in range(n):
    b[i] = 0
    count = 0
    for k in b:
        count ^= k
    b[i] = a[i]
    print(count, end=' ')
print()




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

count = 0
for k in a:
    count ^= k


for i in range(n):
    count ^= a[i]
    print(count, end=' ')
    count ^= a[i]
print()

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

for i in range(n):
    b = [a[j] for j in range(len(a)) if j != i]
    count = b[0]
    for k in b[1:]:
        count ^= k
    print(count, end=' ')
print()




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

count = 0
for k in a:
    count ^= k


for i in range(n):
    count ^= a[i]
    print(count, end=' ')
    count ^= a[i]
print()
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = sorted(list(map(int, input().split())), reverse=True)
if len(a) >= 3:
    b = [x for x in a[:-2] if (x % a[-1] != 0 and x != a[-1]) and (x % a[-2] != 0 and x != a[-2])]
    b += a[-2:]

N = len(b)
count = 0
for i in range(len(b)):
    for j, k in enumerate(b[i+1:]):
        if b[i] % k == 0:
            break
        elif j+i == N-2:
            count += 1
if b[-1] != b[-2]:
    count += 1
print(count)


Fixed submission:
N = int(input())
A = sorted(list(map(int, input().split())))
M = A[-1]
b = [True]*(M + 1)

count = 0
for i, a in enumerate(A):
    if not b[a]:
        continue
    for j in range(a, M+1, a):
        b[j] = False
    if i < N-1 and A[i+1] == a:
        continue
    count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = sorted(list(map(int, input().split())), reverse=True)
count = 0
for i in range(N-1):
    for j, k in enumerate(a[i+1:]):
        if a[i] % k == 0:
            break
        if j == N-i-2:
            count += 1
if a[-1] != a[-2]:
    count += 1
print(count)


Fixed submission:
N = int(input())
A = sorted(list(map(int, input().split())))
M = A[-1]
b = [True]*(M + 1)

count = 0
for i, a in enumerate(A):
    if not b[a]:
        continue
    for j in range(a, M+1, a):
        b[j] = False
    if i < N-1 and A[i+1] == a:
        continue
    count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
a = sorted(list(map(int, input().split())), reverse=True)
count = 0
for i in range(N-1):
    for j, k in enumerate(a[i+1:]):
        if i != j+1:
            if a[i] % k == 0:
                break
        if j == N-i-2:
            count += 1
if a[-1] != a[-2]:
    count += 1
print(count)


Fixed submission:
N = int(input())
A = sorted(list(map(int, input().split())))
M = A[-1]
b = [True]*(M + 1)

count = 0
for i, a in enumerate(A):
    if not b[a]:
        continue
    for j in range(a, M+1, a):
        b[j] = False
    if i < N-1 and A[i+1] == a:
        continue
    count += 1

print(count)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(map(int, input().split()))

count = 0
for i in range(N):
    for j in range(N):
        if i != j:
            if a[i] % a[j] == 0:
                break
        if j == N-1:
            count += 1
print(count)


Fixed submission:
N = int(input())
A = sorted(list(map(int, input().split())))
M = A[-1]
b = [True]*(M + 1)

count = 0
for i, a in enumerate(A):
    if not b[a]:
        continue
    for j in range(a, M+1, a):
        b[j] = False
    if i < N-1 and A[i+1] == a:
        continue
    count += 1

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

b = 1

a = list(map(int, input().split()))
for i, a in enumerate(a):
    try:
        b *= a
    except:
        print("-1")
if b > pow(10, 18):
    print("-1")
else:
    print(b)
        


Fixed submission:
import sys
N = int(input())

b = 1

a = sorted(list(map(int, input().split())), reverse=True)
if a[-1] == 0:
    print("0")
    sys.exit()
for i in a:
    b *= i
    if b > pow(10, 18):
        print("-1")
        sys.exit()
print(b)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

b = 1

a = list(map(int, input().split()))
for i, a in enumerate(a):
    try:
        b *= a
    except:
        print("-1")
if b > pow(10, 18):
    print("-1")
else:
    print(b)
        


Fixed submission:
import sys
N = int(input())

b = 1

a = sorted(list(map(int, input().split())), reverse=True)
if a[-1] == 0:
    print("0")
    sys.exit()
for i in a:
    b *= i
    if b > pow(10, 18):
        print("-1")
        sys.exit()
print(b)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

b = 1

a = list(map(int, input().split()))
for i, a in enumerate(a):
    try:
        b *= a
    except:
        print("-1")
if b > pow(10, 18):
    print("-1")
else:
    print(b)
        


Fixed submission:
import sys
N = int(input())

b = 1

a = sorted(list(map(int, input().split())), reverse=True)
if a[-1] == 0:
    print("0")
    sys.exit()
for i in a:
    b *= i
    if b > pow(10, 18):
        print("-1")
        sys.exit()
print(b)
Buggy python submission (verdict: Runtime Error):
N = input()

try:
	if 0 <= int(N) <= 999:
      if N[-1] is '2' or '4' or '5' or '7' or '9':
        print('hon')
      elif N[-1] is '0' or '1' or '6' or '8':
        print('pon')
      elif N[-1] is '3':
        print('bon')
except ValueError:
  exit()


Fixed submission:
N = input()

try:
  if 0 <= int(N) <= 999:
    if N[-1] == '2' or N[-1] == '4' or N[-1] == '5' or N[-1] == '7' or N[-1] == '9':
      print('hon')
    elif N[-1] == '0' or N[-1] =='1' or N[-1] =='6' or N[-1] =='8':
      print('pon')
    elif N[-1] == '3':
      print('bon')
except ValueError:
  exit()

Buggy python submission (verdict: Runtime Error):
N = input()

try:
	if 0 <= int(N) <= 999:
      if N[-1] is 2 or 4 or 5 or 7 or 9:
        print('hon')
      elif N[-1] is 0 or 1 or 6 or 8:
        print('pon')
      elif N[-1] is 3:
        print('bon')
except ValueError:
  exit()

Fixed submission:
N = input()

try:
  if 0 <= int(N) <= 999:
    if N[-1] == '2' or N[-1] == '4' or N[-1] == '5' or N[-1] == '7' or N[-1] == '9':
      print('hon')
    elif N[-1] == '0' or N[-1] =='1' or N[-1] =='6' or N[-1] =='8':
      print('pon')
    elif N[-1] == '3':
      print('bon')
except ValueError:
  exit()
Buggy python submission (verdict: Runtime Error):
K = input()

try:
   if 0 > int(K) or int(K) >= 100:
      print("K's value must be over 1 and under 100")
      exit()
except ValueError:
   print("K's value must be integer")
   exit() 

S = input()
  if 1 > len(S) or 100 < len(S):
    print("S's length must be over 1 and under 100")
    exit()
   
  if len(S) <= int(K):
    print(S)
  else:
    S = S[:int(K)]
    S += '...'
    print(S)


Fixed submission:
K = input()
S = input()

   
if len(S) <= int(K):
  print(S)
else:
  S = S[:int(K)]
  S += '...'
  print(S)

Buggy python submission (verdict: Runtime Error):
K = input()

try:
   if 0 > int(K) or int(K) >= 100:
      print("K's value must be over 1 and under 100")
      exit()
except ValueError:
   print("K's value must be integer")
   exit() 

S = input()
  if 1 > len(S) or 100 < len(S):
    print("S's length must be over 1 and under 100")
    exit()
   
  if len(S) <= int(K):
    print(S)
  else:
  S = S[:int(K)]
  S += '...'
  print(S)


Fixed submission:
K = input()
S = input()

   
if len(S) <= int(K):
  print(S)
else:
  S = S[:int(K)]
  S += '...'
  print(S)

Buggy python submission (verdict: Runtime Error):
K = input()
try:
  if 0 > int(K) or int(K) >= 100:
    print("K's value must be over 1 and under 100")
    exit()
except ValueError:
  print("K's value must be integer")
  exit()

S = input()
if 1 > len(S) or 100 < len(S):
  print("S's length must be over 1 and under 100")
  exit()
  
if len(S) <= int(K):
  print(S)
else:
  S = S[:K]
  S.append('...')
  print(S)
  

Fixed submission:
K = input()
S = input()

   
if len(S) <= int(K):
  print(S)
else:
  S = S[:int(K)]
  S += '...'
  print(S)
Buggy python submission (verdict: Runtime Error):
import math
import numpy

A, B, H, M = input.split()

theta = abs(int(H)*30 - int(M)*6)
cos = math.cos(math.radians(theta))

res = math.sqrt(int(A)**2 + int(B)**2 - 2 * int(A) * int(B) * cos)
print(res)


Fixed submission:
import math

A, B, H, M = (float(x) for x in input().split())

theta = H*30 + (M/60)*30 - M*6
cos = math.cos(math.radians(theta))
res = math.sqrt(A**2 + B**2 - 2*A*B*cos)
print(res)

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

A = input()
B = input()
H = input()
M = input()

theta = abs(int(H)*30 - int(M)*6)
cos = math.cos(math.radians(theta))

res = math.sqrt(int(A)**2 + int(B)**2 - 2 * int(A) * int(B) * cos)
print(res)

Fixed submission:
import math

A, B, H, M = (float(x) for x in input().split())

theta = H*30 + (M/60)*30 - M*6
cos = math.cos(math.radians(theta))
res = math.sqrt(A**2 + B**2 - 2*A*B*cos)
print(res)