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()
hai=[]
if len(S)<K:
  print(S)
else:
  for i in range(0,K):
    hai.append(S[i])
  print(hai+"...")
    

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

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

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

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

Wrong Answer

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):
#input an interget
k=int(input())
#input an string
str1=str(input())
#get the length of the string
x=int(len(str1))
#get the difference in length between k and s
i=x-k

#make a second string for the appending
for i in range(k):
    str2="."
    str2=str2*i

#if statement about how the string will function
#if the string is the same length as k then print it
if i==0:
    print(str1)
#if not, delete the last character of the string
else:
    for i in range(x):
        str1=str1[0 : i : ] + str1[i+1 : : ]
#and then join the two strings together
    newstr="".join((str1,str2))
    print(newstr)


#need to use a raw input for one line input because they both defer in data types i.e interger and float
a,b = input().split()
#and then convert them back into respective data types
a=int(a)
b=float(b)
#multiply a and b and then round the answer up before printing
mul=a*b
ans=math.trunc(mul)
print(ans)


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

#firsts we declare string s and k, if character s is at most with char k, it will print char s, no change
#if s i more than k it


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

str = s
tripledot= "..."


if lens(s) == k:
         print(s)

elif len(s) > k:
         print (str[0:k],"...")


K=int(input())
S=input()
if len(S)<K or len(S)==K:
    print (S)
elif len(S)>K:
    print(S[0:K])  

a=input()
b=input()
c=b[:int(a)]

print(c,". . .")

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


#if k is more than s
#print the characters before k
#if not print normally

Verdicts: Wrong Answer

Runtime Error

Runtime Error

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):
n=int(input())
if n==3:
    print("bon")
elif n<=1 or n==6 or n==8:
    print("pon")
else:
    print("hon")

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()
k=int(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: 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:
    S += "..."
    print(S)

K = int(input())
S = input()
if len(S)<=K:
    print(S)
else:
    S = S[:K]
    S += "..."
    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()
a=int(len(s))
if a<=k:
	print(s)
else:
	print(s[0:k+1]+'...')

k=int(input())
s=input()
a=int(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):
a, b, h, m = map(int,input().split())

hk = h * 30
mk = m * 6

kaku = mk - hk

print(((b ** 2)+(a ** 2)) - (2 * a * b * kaku))

a = int(input())
z = input()

if len(z) > a: 
  print(z[0:a] + "...")
else:
  print(z)

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 = str(input())

result = ""
if len(s) <= k:
    result = s
else:
    for i in range(0, k - 1):
        result += s[i]
    result += "..."

print(result)







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

result = ""
if len(s) <= k:
    result = s
else:
    for i in range(0, k):
        result += s[i]
    result += "..."

print(result)


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):
n = int(input())
s = input()
if len(s)<=n:
  print(s)
else:
  print(s[:7]+'.'*(len(s)-n))


n = int(input())
s = input()
if len(s)<=n:
  print(s)
else:
  print(s[: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=str(input())
if len(s)>k:
  print(s[0:k]+"...")
elif:
  print(s)

k=int(input())
s=str(input())
if len(s)>k:
  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):

N = int(input())

S = input()

strLen = len(S)

if strLen <= N :
    print(S)
else :
    result = S[0 : N]
    index = 0
    while index < (strLen - N):
        index = index + 1
        result += '.'
    print(result)

N = int(input())

S = input()

strLen = len(S)

if strLen <= N :
    print(S)
else :
    result = S[0 : N]
    index = 0
    while index < (strLen - N):
        index = index + 1
        result += 'x'
    print(result)


N = int(input())

S = input()

strLen = len(S)

if strLen <= N :
    print(S)
else :
    result = S[0 : N]
    result += "..."
    print(result)

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()
w = len(s)
if w <= k:
    print(s)
else:
    ans = s[0:k-1]
    print('%s...' % ans)

k = int(input())
s = input()
w = len(s)
if w <= k:
    print(s)
else:
    ans = s[1:k]
    print('%s...' % ans)

k = int(input())
s = input()
w = len(s)
if w <= k:
    print(s)
else:
    ans = s[0:k]
    print('%s...' % ans)


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 = 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 = str(input())
if len(S) <= K:
    print(S)
else:
    print(S[:K]+'…')

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:
  input(S)
else:
  input(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 = 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

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=input()
a=len(k)

if s<a
print(s)

elif s>a
print(k+"...")

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

a=len(s)

if k>=a:
print(s)

else k<a:
print(s[k]+"...")

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

a=len(s)

if k>=a:
print(s)

else :
print(s[:k]+"...")

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

a=len(s)

if k>=a:
print(s)

else :
print(s[:k]+"...")


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


a=len(s)

if k >= a:
  print(s)

else :
  print(s[:k]+"...")

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

if k<a
print(s)

elif k>a
print(k+"...")

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

a=len(s)

if k >= a:
  print(s)

else :
  print(s[:k]+"...")

Verdicts: Runtime Error

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[0:k], '...')


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):
inputk = input()
k = int(inputk)
s = input()

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


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

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

inputk = input()
k = int(inputk)
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())
e = len(s)

if k < int(len(s)):
  print(n[0:int(e-k)-1]+'.'*3)
else:
  print(s)

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

if k < e:
  print(s[0:k]+'.'*3)
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):
n=int(input())
l=input()
if len(l)<=n:
  print(l)
else:
  print(l[:n+1]+"...")

n=int(input())
l=input()
if len(l)<=n:
  print(l)
else:
  print(l[: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):
import math
a, b, h, m = map(int, input().split())
x = 360*(h/12)+30*(m/60)
y = 360*(m/60)
d = math.cos(math.radians(abs(x-y)))
z = a**2 + b**2 -2*a*b*d
print (math.sqrt(z))


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(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):
def main():
    k = int(input())
    s = input()

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

if __name__ == '__main__':
    main()


def main():
    k = int(input())
    s = input()

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

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):
# -*- coding: utf-8 -*-
"""
Created on Wed May 27 14:43:56 2020

@author: 17664
"""

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

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

# -*- coding: utf-8 -*-
"""
Created on Wed May 27 14:43:56 2020

@author: 17664
"""

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()
l = len(S)
if l <= K:
    print(S)
else:
    SS = S[:K]+"…"
    print(SS)


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

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[0:K+1]+'...')

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):
if __name__ == "__main__":
    k = int(input())
    s = input()
    #k, n = map(int, input().split())
    ls = len(s)
    print(len(s))
    
    if ls<=k:
        print(s)
    else:
        print(s[0:k] + "...")

if __name__ == "__main__":
    k = int(input())
    s = input()
    ls = len(s)
    
    if ls<=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):
# -*- coding: utf-8 -*-
"""
Created on Sat May 30 16:59:03 2020

@author: Tofu
"""

def tran(N,string):
    #print(N)
    #print(string)
    if len(string) > N:
        strout = string[:N]+'...'
        return strout
    else:
        return string

if __name__ == '__main__':
    N = int(input())
    string = input()
    ans = tran(N,string)
    

# -*- coding: utf-8 -*-
"""
Created on Sat May 30 16:59:03 2020

@author: Tofu
"""

def tran(N,string):
    #print(N)
    #print(string)
    if len(string) > N:
        strout = string[:N]+'...'
        return strout
    else:
        return string

if __name__ == '__main__':
    N = int(input())
    string = input()
    ans = tran(N,string)
    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:
  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):
40
ferelibenterhominesidquodvoluntcredunt

n = int(input())
s = str(input())

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

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=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[K]+"...")

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[0:K]+"...")

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()

a = len(S)


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

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

a = len(S)


if a <= 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):
#-*- utf-8 -*-

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

rslt = ""

for index in range(k):
    if len(s) > index:
        break
    rslt += s[index]

if len(s) > k:
    rslt += "..."

print(rslt, flush=True)


#-*- utf-8 -*-

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

rslt = ""

for index in range(k):
    if len(s) <= index:
        break
    rslt += s[index]

if len(s) > k:
    rslt += "..."

print(rslt, flush=True)


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();
n = int(len(s));
a = '…'

if k >= n:
    print(s);
else:
    print(s[:k] + a);


k = int(input());
s = input();
n = int(len(s));
a = '...'

if k >= n:
    print(s);
else:
    print(s[:k] + a);


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("")
lenS=len(S)
if lenS<=K:
  print(S)
else:
  print(S[:K])

K=int(intput(""))
S=input("")
lens=len(s)
if lens<=K:
  print(S)
else:
  S2=S[:K-1]
  print(S2)
  

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

Verdicts: 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())
s=input()
l=len(s)
ans=''
for i in range(k):
  if i==l:
    break
  ans+=s[i]
else:
  print(ans)
  exit()
ans+='...'
print(ans)

k=int(input())
s=input()
l=len(s)
ans=''
for i in range(k):
  ans+=s[i]
  if i==l-1:
    break
else:
  ans+='...'
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 >= 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):
k = int(input())
s = input()

if len(s) > 7:
  print("{}...".format(s))
else:
  print(s)
  

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

if len(s) > k:
  print("{}...".format(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):
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[: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 K - len(S) >= 0:
    print(S)
else:
    print(S[0:K+1].format(...))

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

if K - len(S) >= 0:
    print(S)
else:
    print(S[0:K].format(...))

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

if K - len(S) >= 0:
    print(S)
else:
    print("{}...".format(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 = 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+1]+'...')

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):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
#from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_matrix
#from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
import sys

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
#from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_matrix
#from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
import sys

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

ni = lambda: int(ns())
nf = lambda: float(ns())
na = lambda: list(map(int, stdin.readline().split()))
nb = lambda: list(map(float, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

K = ni()
S = ns()
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 = input()
s = input(str())

# print(s[0:int(k)])

print('-------------')
if len(s) <= int(k):
    print(s)

else:

    print(s[0:int(k)] + '...')

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

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

else:
    print(s[0:int(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 math

def dict_sort(ans):
    ans=sorted(ans.items(),reverse=True,key=lambda kv:(kv[1]))
def is_prime(n,k):
    if n==1:
        return 0
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:
            res=i
            break
    return res
def inp():
    ls=list(map(int,input().split()))
    return ls
t=int(input())
s=input()
if len(s)<=t:
    print(s)
else:
    print(s[0:t],end="")
    for i in range(len(s)-t):
        print('.',end='')
    print()


import math

def dict_sort(ans):
    ans=sorted(ans.items(),reverse=True,key=lambda kv:(kv[1]))
def is_prime(n,k):
    if n==1:
        return 0
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:
            res=i
            break
    return res
def inp():
    ls=list(map(int,input().split()))
    return ls
t=int(input())
s=input()
if len(s)<=t:
    print(s)
else:
    print(s[0:t]+"...")


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 >= len(S):
  print(S)
else:
  print(S:[K]+"...")
  

K=int(input())
S=input()
if K >= len(S):
  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] + '...')

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)

elif len(s) > k:
  print(str(s)+"...")

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

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

elif len(s) > k:
  print(str(''.join(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):
import numpy as np
import sys
import math

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

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

import numpy as np
import sys
import math

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()

l = len(S)

if l < K+1:
  print(S)
else:
  print(S[:K])

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

l = len(S)

if l <= K:
  print(S)
else:
  print(S[:K] + '…')

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

l = len(S)

if l <= K:
  print(S)
else:
  print(S[:K])

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

l = len(S)

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

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[:K], end="")
    print("."*(len(S)-K))



K = int(input())
S = input()
if len(S)<=K:
    print(S)
else:
    print(S[:K],"."*(len(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):
def answer(k:int, s:str) -> str:
    if len(s) <= k:
        return s
    else:
        return s[:(k-1)] + '...'

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

print(answer(k, s))

def answer(k:int, s:str) -> str:
    if len(s) <= k:
        return s
    else:
        return s[:k] + '...'

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

print(answer(k, 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])

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] + '...')

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

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):
a = int(input())
s = input()
if len(s) > a:
  print(s[:a+1]+"...")
else:
  print(s)

a = int(input())
s = input()
if len(s) > a:
  print(s[:a]+"...")
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()
x = len(S)
 
if x <= K:
  print(S)
else:
  print(S[K - 1:])

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

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

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

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

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

x = len(s)

if x > K:
  print(S[1:] + '...')
else:
  print(S)

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

K = int(input())
S = input()
x = len(s)

if x <= K:
  print(S)
else:
  print(S[K -1:])

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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

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 len(s) > k:
    print(s + "...")
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 = 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

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:
  a = s+s[0:k]
  print(a)

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


k = int(input())
s = str(input())
if k>=len(s):
  print(s)
else:
  a = s+'...'
  print(a)


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


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=str(input())
if len(S) <= K:
    print(S)
elif len(S) > K:
    print(S[0:int(K)])

K=int(input())
S=str(input())
if len(S) <= K:
    print(S)
elif len(S) > K:
    print(S[0:int(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(K)
else:
  print(S.replace(S[K:len(S)],"..."))

k=int(input())
s=str(input())
if len(s)<=k:
  print(k)
  else:
    print(s.replace(s[K:len(s)],"..."))

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:
    print(s[0:k]+"...")

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 k >= len(s):
    print(s)
else:
    print(s[:8])

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):
K = str(input())
S = str(input())

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

else:
    print(S[0:len(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()

if len(S) > K:

    for i in range(0,K):

        print(S[i], end="")
    
    print("")

else:

    print(S)

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

if len(S) > K:

    for i in range(0,K):

        print(S[i], end="")
    
    print("...")

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)
else:
  print(S[:K])

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[0:K].join('...')

K = int(input())
S = raw_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

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):
ln=int(input())
st=input()
op=''
if len(st)<=ln:
  print(st)
else:
  ln1=len(st)-ln
  for i in range(ln1):
    op=op+'.'
  print(st[:ln]+op)
    

ln=int(input())
st=input()
op=''
if len(st)<=ln:
  print(st)
else:
  ln1=len(st)-ln
  for i in range(ln):
    op=op+'.'
  print(st[:ln]+op)
    

ln=int(input())
st=input()
op=''
if len(st)<=ln:
  print(st)
else:
  ln1=len(st)-ln
  for i in range(ln):
    op=op+'.'
  print(st[:ln]+op
    

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

elif ln>=l:
  print(s)
  

Verdicts: 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())
S = input()
list_s =list(S)
T = len(list_s)
if T > K:
    for i in range(K,T):
        list_s[i] = '.'
    S =""
    for i in range(T):
        S += list_s[i]
print(S)

K = int(input())
S = input()
list_s =list(S)
T = len(list_s)
if T > K:
    for i in range(K,T):
        del list_s[K]
    S =""
    for i in range(K):
        S += list_s[i]
    S += '...'
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-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):
40
ferelibenterhominesidquodvoluntcredunt

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()
w = input()
l = len(w)
if l <= k:
	print(w)
else:
    print(w[:k])


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


k = input()
w= input()
l = len(str)
	if l <= k:
  print(str)
  	else:
    print(w[:k])


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

k = input()
str = input()
l = len(str)
if l <= k:
  print(str)
  else:
    print(s[1:k])

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


k = input()
w= input()
l = len(w)
if l <= k:
 	 
    print(w)
else:
   	 print(w[:k])


k = input()
w = input()
l = len(w)
if l <= k:
	print(w)
else:
    print(w[:k])

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

k = input()
w = input()
l = len(w)
if l <= k:
 	 print(w)
else:
   	 print(w[:k])


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


k = input()
w= input()
l = len(w)
	if l <= k:
 	 print(w)
  	else:
   	 print(w[:k])


k = input()
w= input()
l = len(w)
if l <= k:
	print(w)
else:
	print(w[:k])


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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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 len(S) > K:
    S = S[:k] + "..."

print(s)

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

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

print(s)

import sys
input = sys.stdin.readline

def main():
    k = int(input())
    s = input().rstrip()

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

if __name__ == '__main__':
    main()


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 k < len(s):
  s = s[0,k]+"..."
print(s)



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

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

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

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

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

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


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

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

Verdicts: Runtime Error

Wrong Answer

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()
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