TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=input()
if(len(S)<=K):
  print(S)
else:
  print(S[:K]+"…")

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

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
s = [input() for i in range(2)] 
s0 = int(s[0])
l0=len(s[1])
if s0 >= l0:
    print(s[1])
if s0 < l0:
    print(s[1][:s0],'...')
    

s = [input() for i in range(2)] 
s0 = int(s[0])
l0 = len(s[1])
if s0 >= l0:
    print(s[1])
if s0 < l0:
    print(s[1][:s0],'...')

s = [input() for i in range(2)] 
s0 = int(s[0])
l0=len(s[1])
if s0 >= l0:
    print(s[1])
if s0 < l0:
    print(s[1][:s0]+'...')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
n=int(input())
s=(input())
l=len(s)
if n<=l:
  print(s)
else:
  print(s[0:n]+"...")


n=int(input())
s=(input())
l=len(s)
if n>=l:
  print(s)
else:
  print(s[0:n]+"...")


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=input()
if len(S) <= K:
    print(S)
else:
    print(S[:K], '...')

K=int(input())
S=input()
if len(S) <= K:
    print(S)
else:
    print(f'{S[:K]}...')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
#!/usr/bin/env python3
# coding: utf-8
import math

#     if __debug__:

#     else:
#         import sys
#         print(arg, file=sys.stderr)

def main():
    A, B, H, M = map(int, input().split())

    vh = ((H * 60 + M) / (12 * 60))
    vm = (M / 60)

    theta = (vh - vm) * math.tau
    d = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(theta))

    print(d)

if __name__ == "__main__":
    main()


#!/usr/bin/env python3
# coding: utf-8
def main():
    K = int(input())
    S = input()
    if len(S) <= K:
        print(S)
    else:
        print(S[:K] + '...')
 
if __name__ == "__main__":
    main()

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
print(S if (len(S) > K) else (S[:K] + "..."))

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

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = str(input())
if K<len(S):
    S = S[:K:1] + "..."
else:
    pass
print(K)
print(S)

k = int(input())
s = str(input())
if k<len(s):
    s = s[:k:1] + "..."
else:
    pass
print(k)
print(s)


K = int(input())
S = str(input())
if K<len(S):
    S = S[:K:1] + "..."
else:
    pass
print(K)
print(S)


k = int(input())
s = str(input())
if k<len(s):
    s = s[:k:1] + "..."
else:
    pass

print(s)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
n=int(input())
w=input()
wordlength=len(w)
if n>=wordlength: print(w)
else: print(w[:n])

n=int(input())
w=input()
wordlength=len(w)
if n>=wordlength: print(w)
else: print(w[:n]+'...')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()
if len(s)>k:
    print(s[0:k-1],"...")
else:
    print(s)

k = int(input())
s = input()
if len(s)>k:
    print(s[0:k],"...")
else:
    print(s)


k = int(input())
s = input()
if len(s)>k:
    print(s[0:k],"...",sep="")
else:
    print(s)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
def cin(): # To take limited number of inputs
	return map(int,input().split())

def cino(test=False): # To take individual int input (test = False)
    if not test:
        return int(input())
    else: # To take string input (test = True)
        return input()

def cina(): # array input
  return list(map(int,input().split()))

def ssplit(): # multiple string input
    return list(input().split())

def printlist(l): # to print space seperated array
    for i in l:
        print(i,end=" ")

def main():
    a = cino()
    b = cino(True)
    l = len(b)
    print(len(b))
    if l<=a:
        print(b)
    else:
        print(b[:a]+"...")

if __name__=="__main__":
    main()

def cin(): # To take limited number of inputs
	return map(int,input().split())

def cino(test=False): # To take individual int input (test = False)
    if not test:
        return int(input())
    else: # To take string input (test = True)
        return input()

def cina(): # array input
  return list(map(int,input().split()))

def ssplit(): # multiple string input
    return list(input().split())

def printlist(l): # to print space seperated array
    for i in l:
        print(i,end=" ")

def main():
    a = cino()
    b = cino(True)
    l = len(b)
    # print(len(b))
    if l<=a:
        print(b)
    else:
        print(b[:a]+"...")

if __name__=="__main__":
    main()

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    list(s)
    # print(s[:k])
    print(s[:k], '...')


k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    list(s)
    # print(s[:k])
    print(s[:k]+'...')


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

if(len(s) <= k):
  print(s)
else:
  print(s[:k])

k = int(input())
s = input()

if(len(s) <= k):
  print(s)
else:
  print(s[:k] + "...")

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = str(input())

if len(s) <= k:
  print(s)
elif len(s) > k:
  print(s[0:k-1]

k = int(input())
s = str(input())

if len(s) <= k:
  print(s)
elif len(s) > k:
  print(s[0:k-1] + '...')

k = int(input())
s = str(input())

if len(s) <= k:
  print(s)
elif len(s) > k:
  print(s[:k] + '...')

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
a = len(S)

if a <= K:
    print(S)
else:
    print(S[0:K-1]+"...")

K = int(input())
S = input()
a = len(S)

if a <= K:
    print(S)
else:
    print(S[0:K]+"...")

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=input()

if len(S)<=K:
    print(S)
elif len(S)-K==1:
    print(S[0]+'...')
else:
    print(S[:-(K-len(S)-1)]+'...')

K=int(input())
S=input()

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

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
split_str = S[:K]
if len(S) > K:
    print(split_str)
else:
    print(split_str)

K = int(input())
S = input()
split_str = S[:K]
if len(S) > K:
    print(split_str)
else:
    print(S)

K = int(input())
S = input()
split_str = S[:K]
if len(S) > K:
    print(split_str+"...")
else:
    print(S)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

if k >= len(s):
    print(s)
else:
    print(s[0] + '...')

k = int(input())
s = input()

if k >= len(s):
    print(s)
else:
    print(s[0:k] + '...')


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
[K,S] = input()

if len(S)>K:
     print(S[:K]+"...")
else:
    print(S)



k=int(input())
s=input()
if (len(s)>k):
    print(s[:k]+"...")
else:
    print(s)


Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k, s = int(input()), input()

if len(s) <= k:
    print(s)
else:
    print(s[:k + 1] + "...")

k, s = int(input()), input()

if len(s) <= k:
    print(s)
else:
    print(s[:k] + "...")

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
ans= S
if len(S) > K:
  ans = S[0:K+1] + "..."
print(ans)

K = int(input())
S = input()
ans= S
if len(S) > K:
  ans = S[0:K] + "..."
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
A = ""
if K < len(S):
	for i in range(K):
    	A = A + S[i]
    A = A + "..."
else:
	A = S
print(A)

K = int(input())
S = input()
if K < len(S):
    A = ""
    for i in range(K):
        A = str(A) + S[i]
    A = str(A) + "..."
    S = A
print(S)

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = input()
S = input()K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  print(S[:K] + "...")

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

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

if len(S) <= K:
  print(S)
  
else:
  print("{}...".format(S[0,K]))

K = int(input())
S = input()
 
if len(S) <= K:
  print(S)
  
else:
  print("{}...".format(S[:K]))

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
import numpy as np

K = int(input())
S = input()
S = list(S)

if len(S) <= K:
    print(S)

else:
    del S[K:len(S)]
    print(S)

import numpy as np

K = int(input())
S = input()
S = list(S)
mojiretu=''
if len(S) <= K:
    for x in S:
        mojiretu += x
    print(str(mojiretu))

else:
    del S[K:len(S)]
    for x in S:
        mojiretu += x
    print(str(mojiretu)+'...')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
def solution():
    k = int(input())
    s = int(input())
    if len(s) > k:
        return s[:k] + '...'
    else:
        return s

print(solution())

def solution():
    k = int(input())
    s = str(input())
    if len(s) > k:
        return s[:k] + '...'
    else:
        return s

print(solution())

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=str(input())

if len(s) <=k:
    print(s)

else:
    print(s[0:k],'...')

k=int(input())
s=str(input())

if len(s) <=k:
    print(s)

else:
    c=s[0:k]+ '...'
    print(c)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=list(input())
answer=[]
if len(S)>=K:
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
  print(1)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  print(g)
      

K=int(input())
S=list(input())
if len(S)>=K:
  answer=[]
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
  print(1)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  g+='...'
  print(g)

K=int(input())
S=list(input())
answer=[]
if len(S)>=K:
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
  print(1)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  g+='...'
  print(g)

K=int(input())
S=list(input())
if len(S)>K:
  answer=[]
  for i in range(K):
    answer.append(S[i])
  answer.append('...')
  s=''
  for i in range(len(answer)):
    s+=answer[i]
  print(s)
else:
  g=''
  for i in range(len(S)):
    g+=S[i]
  print(g)
      
  


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()
 
if len(s) <= k:
	print(s)
else:
 	print(s[0:(k-1)] + "...")

k = int(input())
s = input()

if len(s) <= k:
	print(s)
else:
 	print(s[0:(k-1)])

k = int(input())
s = input()
 
if len(s) <= k:
	print(s)
else:
 	print(s[0:k] + "...")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=str(input())
if K>=len(S):
    print(S)
else:
    print(S[:K],"...")


K=int(input())
S=str(input())
if K>=len(S):
    print(S)
else:
    print(S[:K]+"...")


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
S = int(input())
K = str(input())

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

K = int(input())
S = str(input())

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

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[:K]+"...")7
nikoandsolstice

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

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

if K < len(S):
    print(S[0:K] + '･･･')


else:
    print(S)

K = int(input())
S = input()

if K < len(S):
    print(S[0:K] + '...')


else:
    print(S)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
N = list(input())

ans = []
if len(N) > K:
	for i in range(len(N)-K):
		#print(i,len(N))
		N.pop(-1)
print("".join(N))

K = int(input())
N = list(input())

ans = []
if len(N) > K:
	for i in range(len(N)-K):
		#print(i,len(N))
		N.pop(-1)
	N.append("...")
print("".join(N))


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
7
nikoandsolstice

K=int(input())
S=str(input())
if len(S) <= K:
    print(S)
else:
    ans = S[0]
    for i in range(1,K):
        ans += S[i]
    ans += "..."
    print(ans)


Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=str(input())

if len(S) <= K :
    print(S)
else :
    print(S[1:K]+"...")

K=int(input())
S=str(input())

if len(S) <= K :
    print(S)
else :
    print(S[0:K]+"...")

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
import sys
K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip()
print(len(S))
if len(S) > K:
    print(S[:K] + "...")
else:
    print(S)

import sys
K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip()
if len(S) > K:
    print(S[:K] + "...")
else:
    print(S)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
S = int(input())
K = input()

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

S = input()
K=int(input())

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

K = int(input())
S = input()

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    M = S[0:K+1]
    print(M + "...")

K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    print(S[0:K+1] + "...")

K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    M = S[0:K+1] + "..."
    print(M)

K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    M = S[0:K]
    print(M + "...")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
def main():
    k = input()
    s = input()
    if(len(s)<k):
        print(s)
    else:
        print(s[0:k] + '...')
    
 
main()

def main():
    s = input()
    k = input()
    if(len(s)<=k):
        print(s)
    else:
        print(s[0:k] + '...')
    
 
main()

def main():
    s = input()
    k = input()
    if(len(s)<k):
        print(s)
    else:
        print(s[0:k] + '...')
    
 
main()

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k= int(input())
s= input()
if len(s)<=k:
	print(s)
else:
	print(s[1:k]+'...')
	

k= int(input())
s= input()
if len(s)<=k:
	print(s)
else:
	print(s[:k]+'...')
	

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = str(input())

if k >= len(s):
    ans = s
else:
    rest = len(s) - k
    ans = s[0:k] + '.'*rest
print(ans)

k = int(input())
s = str(input())

if k >= len(s):
    ans = s
else:
    rest = len(s) - k
    ans = s[0:k] + '...'
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

if k > s:
  print(s[0:k+1] + "...")
else:
  print(s)



k = int(input())
s = input()
 
if k < len(s):
  print(s[0:k] + "...")
else:
  print(s)

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=input()
if len(s)<=k:
  print(k)
else:
  print(k[:k]&"...")

k=int(input())
s=input()
if len(s)<=k:
  print(k)
else:
  print(s[:k]&"...")

k=int(input())
s=input()
if len(s)<=k:
  print(s)
else:
  print(s[:k]+"...")


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input()) 
S = str(input())

deffirence = len(S) - K

if deffirence >  0:
    print(S[0: K:])
else:
    print(S)



K = int(input()) 
S = str(input())

deffirence = len(S) - K

if deffirence >  0:
    print(S[0: K:] + '...')
else:
    print(S)



Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

if len(s) <= k:
  print(s)
else:
  print(s + '...')

k = int(input())
s = input()

if len(s) <= k:
  print(s)
else:
  for i in range(k):
    print(s[i],end='')
  print('...')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=input()
if len(S)<=len(K):
  print(S)
else:
  print(S[0:len(K)])

K=int(input())
S=input()
if len(S)<=K:
  print(S)
else:
  print(S[0:K])


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


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()
ans= str()
for i in s:
    ans+=i
if len(s)<=k:
    print(ans)
else:
    print(ans+'...')

k = int(input())
s = input()
ans= str()

if len(s)<=k:
    for i in s:
        ans+=i
    print(ans)
else:
    for i in range(k):
        ans+=s[i]
    print(ans+'...')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S)>K:
    S[:K]+"..."
else:
    print(S)

K = int(input())
S = input()
if len(S)>K:
    print(S[:K]+"...")
else:
    print(S)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = str(input())

if len(s)>k:
  print(s[0:k],"...")
else:
  print(s)

k = int(input())
s = str(input())

if len(s)>k:
  print(s[0:k]+"...")
else:
  print(s)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(K)
if len(S)<=K:
    print(S)
else:
    print(S[:K]+"...")

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

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

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

K = int(input())
S = input()

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

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=input()
C=0
B=0
B=len(S)
if B<=K:
    print(S)
else:
    R=B-K
    for i in range(0,R):
        i=i+1
        C=C+S[i]
        
    print(C)
        
        
    

K=int(input())
S=input()
B=0
D=0
B=len(S)
B=int(B)
B=B+1
D=S+...
if B>=K:
    print(S)
else:
    print(D)


K=int(input())
S=input()
C=0
B=0
D=0
C=S
B=len(C)
B=int(B)
B=B+1
D=S+'...'
if B<=K:
    print(S)
else:
    print(D)


K=int(input())
S=input()
C=0
B=0
D=0
C=S
B=len(C)
B=int(B)
B=B+1
D=S+'...'
if B>=K:
    print(S)
else:
    print(D)


K=int(input())
S=input()
B=0
D=0
B=len(S)
B=int(B)
D=S+'...'
if S>=K:
    print(S)
else:
    print(D)


K=int(input())
S=input()
B=0
D=0
B=len(S)
B=int(B)
B=B+1
D=S+'...'
if B>=K:
    print(S)
else:
    print(D)


K=int(input())
S=input()
B=0
D=0
B=len(S)
B=int(B)
D=S+'...'
if B>=K:
    print(S)
else:
    print(D)


K=int(input())
S=input()
B=0
D=0
B=len(S)
B=int(B)
D=S+'...'
if S=>K:
    print(S)
else:
    print(D)

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


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
print(input()[:k])

k=int(input())
s=input()
print(s[:k]+"..." if len(s)>k else s)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=input()
print(S[:K]) if len(S) <= K else print(S[:K] + "...")

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


Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=input()

if len(S) <= K:
  print(S)
else:
  print(S[0:K]+"…")

K=int(input())
S=input()

if len(S) <= K:
  print(S)
else:
  print(S[0:K]+"...")

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
if len(S) > K:
    print(S[:K]+"...")
else:
    print(S)

K = int(input())
S = input()

if len(S) > K:
    print(S[:K]+"...")
else:
    print(S)

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    a = len(S) - K
    b = a-2
    print(S[:b])


K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    a = len(S) - K
    b = a-2
    print(S[:b]+'...')

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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(s[:k] + '・・・')


k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(s[:k] + '...')


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(s + '...')


k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(s[:k] + '...')


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) > K:
    print(s[:k]+'...')
else:
    print(S)

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

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=input()
S=input()
if len(S) <= K:
  print(S)
else:
  print(S[:K]+"...")

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

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
#!/usr/bin/env python3


K = int(input())
S = input()

if (len(S) <= K):
    print(S)
else:
    print(S[0:K+1] + "...")



#!/usr/bin/env python3


K = int(input())
S = input()

if (len(S) <= K):
    print(S)
else:
    print(S[0:K] + "...")



Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=input()

if len(s)<=k:
    print(s)
else:
    print(s[:k]+'…')



k=int(input())
s=input()

if len(s)<=k:
    print(s)
else:
    print(s[:k]+'...')



Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()
i = ""
if len(s) <= k:
  print(s)
  else: 
    for j in range(k):
      i = i + s[j]
    print(i + '...')

k = int(input())
s = input()
i = ""
if len(s) <= k:
  print(s)
else: 
  for j in range(k):
    i = i + s[j]
    print(i + '...')

k = int(input())
s = input()
i = ""

if len(s) <= k:
  print(s)
else: 
  for j in range(k):
    i = i + s[j]
    print(i + '...')

k = int(input())
s = input()
i = ""
if len(s) <= k:
    print(s)
else:
    for j in range(k):
        i = i + s[j]
    print(i+"...")

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(s[:7])

k = int(input())
s = input()

print(s[:k])

k = int(input())
s = input()

if len(s) <= k:
    print(s)
else:
    print(s[:k]+'...')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = input()
S = int(input())

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


K = input()

S = int(input())

if len(K) <= S:
    print(K)


else:
    print(K[:S] + "...")


K = input()

S = int(input())

if len(K) <= S:
    print(K)


else:
    print(K[:S] + "...")


K = input()
S = int(input())

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


S = input()

K = int(input())

if len(S) <= K:
    print(S)


else:
    print(S[:K] + "...")


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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()
if K>=len(S):
  print(S)
else:
  print(S[:K-1]+'...')

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


Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
#!/usr/bin/env python3
# atcoder 




K = int(input())
S = input()

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

#!/usr/bin/env python3
# atcoder 




K = int(input())
S = input()


slen = len(S)
if(slen < K):
    print(S)
else: 
    pr = S[:K]
    change = S[K:]
    for i in range(len(change)):
        change = change.replace(change[i], ".")
    print(pr + change)



#!/usr/bin/env python3
# atcoder 




K = int(input())
S = input()
slen = len(S)



if(slen <= K):
    print(S)
else:
    print(S[K:] + '.' * 3)
    
    #    change = change.replace(change[i], '.')
    #print(S[:K] + change[:3])



#!/usr/bin/env python3
# atcoder 




K = int(input())
S = input()
slen = len(S)



if(slen <= K):
    print(S)
else:
    print(S[K:] + "...")
    
    #    change = change.replace(change[i], '.')
    #print(S[:K] + change[:3])



#!/usr/bin/env python3
# atcoder 




K = int(input())
S = input()



if(len(S) <= K):
    print(S)
else:
    print(S[:K] + '.' * 3)
    
    #    change = change.replace(change[i], '.')
    #print(S[:K] + change[:3])



Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=input()
if(k>s.length):
  print(s)
else:
  print(s[0,k],"...")

k=int(input())
s=input()
if(k>len(s)):
  print(s)
else:
  print(s[0:k],"...")


k=int(input())
s=input()
if(k>=len(s)):
  print(s)
else:
  print(s[0:k]+'...')


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = input()
s = input()

l = len(s)

if k >= l:
   print(k)
else:
  print(s[k - 1] + '...')

k = int(input())
s = input()

l = len(s)

if k >= l:
   print(s)
else:
  print(s[:k] + '...')


Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
S = input()
K = int(input())
if len(S) <= K:
  print(S[:K] + '...')
else:
  print(S)

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


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

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


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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
from sys import stdin

K = int(inpu())
S = input()

if len(S) <= K:
    print(S)
else:
    print(S[:K],'...',sep='')

from sys import stdin

K = int(input())
S = input()

if len(S) <= K:
    print(S)
else:
    print(S[:K],'...',sep='')

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

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

K = int(input())
S = input()

if len(S) > K:
  S = S[:K] + "..."
print(S)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k=int(input())
s=str(input())
if len(s) <= k:
  print(s)
else:
  print(s in range k + "...")

k=int(input())
s=str(input())
if len(s) <= k:
  print(s)
else:
  print(s[0:k] + "...")

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int,input()
l = input()
if(len(l)<k):
    print(l)
else:
    print(l)
    print("...")


k=int(input())
s=input()
l=len(s)
if l<=k:
    print(s)
else:
    print(s[:k]+"...")

Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = int(input())
S = input()

if len(S) >= K:
  print(S)
else:
  print(S[:K+1] + "...")

K = int(input())
S = input()

if len(S) >= K:
  print(S)
else:
  print(S[:K] + "...")


K = int(input())
S = input()

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

n = len(s)
if k <= n:
  print(s)
else:
  print(s[:k]+'...')

k = int(input())
s = input()
 
n = len(s)
if n <= k:
  print(s)
else:
  print(s[:k]+'...')

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = str(input())
l = len(s)
if k >= l:
    print(s)
else:
    print(s[0:k])

k = int(input())
s = str(input())
if len(s) <= k:
    print(s)
else:
    print(s[0:k] + "...")

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K=int(input())
S=input()
a=len(S)
if a<=K:
  print(S)
else:
  print(S[:K]+"."*(a-K))

K=int(input())
S=input()
a=len(S)
if a<=K:
  print(S)
else:
  print(S[:K]+"."*3)

Verdicts: Wrong Answer

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
K = input()
S = input()
if len(S) < K:
    print(S)
else:
    print("S[:K]" + "...")


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


Verdicts: Runtime Error

Accepted
Problem: We have a string S consisting of lowercase English letters.  If the length of S is at most K, print S without change.  If the length of S exceeds K, extract the first K characters in S, append `...` to the end of them, and print the result.

Submission attempts (in order):
k = int(input())
s = input()

if len(s) > k:
  s = s[:k]

print(s)

k = int(input())
s = input()

if len(s) > k:
  s = s[:k] + '...'

print(s)


Verdicts: Wrong Answer

Accepted