Problem:


Score: 200 points

Problem Statement

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.

Constraints

K is an integer between 1 and 100 (inclusive).

S is a string consisting of lowercase English letters.

The length of S is between 1 and 100 (inclusive).

Input

Input is given from Standard Input in the following format:

K
S

Output

Print a string as stated in Problem Statement.

Sample Input 1

7
nikoandsolstice

Sample Output 1

nikoand...

nikoandsolstice has a length of 15, which exceeds K=7.

We should extract the first 7 characters in this string, append ... to the end of them, and print the result nikoand....

Sample Input 2

40
ferelibenterhominesidquodvoluntcredunt

Sample Output 2

ferelibenterhominesidquodvoluntcredunt

The famous quote from Gaius Julius Caesar.



Sample input:
7
nikoandsolstice


Sample output:
nikoand...

Submission status: Runtime Error

Solution code:
#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
#initialise y
y=0
#make a second string for the appending
str2="..."

#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 and then print it
else:
    while y<k:
        print(str1[y],end=(""))
        y+=1
    print(str2)

Submission status: Runtime Error

Solution code:
#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=round(mul)
print(ans)

Submission status: Runtime Error

Solution code:
#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)

Submission status: Runtime Error

Solution code:
#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
#time cpmlexity 0(1)


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

str = s

#if same, no change
if lens(s) == k:
                         print(s)

else:
         print (str[0:k] +"...")

Submission status: Runtime Error

Solution code:
#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 same, no change
if lens(s) == k:
         print(s)

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

Submission status: Runtime Error

Solution code:
#input an interget
K=int(input())
#input an string
S=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
S2="..."

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

Submission status: Runtime Error

Solution code:
#input an interget
K=int(input())
#input an string
S=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
S2="..."

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

Submission status: Runtime Error

Solution code:

while True:
     k = input()
     if 1 <= int(k) <= 100:
         break;
     print ('Error Invalid Input for K')


while True:
     s = input().lower()
     if 1 <= len(s) <= 100:
         break;
     print ('Error Invalid Input for s')


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

Submission status: Runtime Error

Solution code:

while True:
     k = input()
     if 1 <= int(k) <= 100:
         break;
     print ('Error Invalid Input for K')

#Check constraint for K


while True:
     s = input().lower()
     if 1 <= len(s) <= 100:
         break;
     print ('Error Invalid Input for s')

#Check constraint for S

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

Submission status: Runtime Error

Solution code:
def convert(S): 
  
    
    str1 = ""  # initialization of string to "" 
    return(str1.join(S))    # using join function join the list s by  
                            # separating words by str1


K = int(input())    # take K from user
readtext= str(input())  # take the input string 

S = list(readtext)   #split the string into charactrers and put them to list
list1=[]  #list 1 

for i in range (0 , K): # for looop to append the charachters to the new list
   
    list1.append(S[i]) # appending the charachters to the list
if len(S) > K:  # condition when number of charachters is big than K
    b = "..."
    list1.append(b) # append the 3 dots 

print(convert(list1)) # convert the list of characters back to the string format

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
K=int(input())
S= input()

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

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

Submission status: Runtime Error

Solution code:
# program to print the new string after performing append operation in the string s "..." 
# if only the character s is more than k but if the character s is at most k
# the output will not change
#first we will define the new string

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

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

Submission status: Runtime Error

Solution code:
# program to print the new string after performing append operation in the string s "..." 
# if only the character s is more than k but if the character s is at most k
# the output will not change
#first we will define the new string

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

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

Submission status: Runtime Error

Solution code:
#input an interget
k=int(input())
#input an string
s=str(input())
#get the length of the string
x=int(len(s))
#get the difference in length between k and s
i=k-x

#if statement about how the string will function
#if the string is the same length as k then print it
if i==0:
    print(s)
#if not, append it
else:
    for i in range(x):
        s=s[0 : i : ] + s[i+1 : : ]
        for i in range(x):
            fix=str('.')
            lenfix=int(len(fix))=x

    print(s.append(fix))

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

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

Submission status: Runtime Error

Solution code:
import math
list1=(input()).split()
A=int(list1[0])
B=int(list1[1])
H=int(list1[2])
M=int(list1[3])
p=math.pi
HM=(A**2+B**2-2*A*B*(math.cos(abs(p*H/6-p*M/30))))**0.5
print(HM)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
K = int(input())
S = list(input())
S2 = []

for i in range(K):
    n = S[i]
    S2.append(n)

S2.append('...')
print(''.join(S2))

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
s = int(input())
t = input()

if len(t) =< s:
  print(t)
  
else :
  tt =  t[0:s]
  print(tt + "...")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
k=int(input())
s=input()
import numpy as np
p=list(s)
l=len(p)
if l<=k:
  print(s)
else:
  arr=np.array(p)
  print(p+'...')

Submission status: Runtime Error

Solution code:
n = input()
s = input()

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

Submission status: Runtime Error

Solution code:
from math import cos, sqrt, pi
a, b, h, m = map(int, input().split())
#時針の角度
ang_a = pi * h / 6 + pi * m / 360
#分針の角度
ang_b = pi * m / 30
#角度差
ang = abs(ang_a-ang_b)
#余弦定理
c = sqrt(a**2 + b**2 - 2*a*b*cos(ang))
print(c)

Submission status: Runtime Error

Solution code:
K = input()
S = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
K=int(input())
S=input()
A=len(S)
if A=K:
  print(S)
if A>K:
  print(S[0:K:1]+'...')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = int(input())
K = input()

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

Submission status: Runtime Error

Solution code:
S = input()
K=int(input())

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

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  l = S.split()
  for i in range(len(S)-K):
    l.pop(-1)
  print(''.join(l))

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  l = S.split()
  l.pop(K:)
  print(''.join(l))

Submission status: Runtime Error

Solution code:
import java.util.Scanner;class Main{public static void main(String[] args){Scanner s = new Scanner(System.in);int i = s.nextInt();String str = s.nextLine();if(str.length()<=i){System.out.println(str);}else{System.out.println(str.substring(0,i-1)+"...");}}}

Submission status: Runtime Error

Solution code:
k = input()
a = input()
b = len(a)
if b <= k:
  ans = a
else :
  ans = a+"..."
print(ans)

Submission status: Runtime Error

Solution code:
k=int(input())
s=str(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if len(S)<=K:
  print(K)
else:
  print(S.replace(S[K:len(S)],"..."))

Submission status: Runtime Error

Solution code:
40
ferelibenterhominesidquodvoluntcredunt

Submission status: Runtime Error

Solution code:
k = int(input())
s = input()

slist = list(s)
if len(slist) > k:
  l = ''
  for i in range(k):
    k += slist[i]
  print('...' + l)
else:
  print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
K = int(input)
S = input()
if len(s) > K:
  print(s[:K]+"...")
elif :
  print(s)

Submission status: Runtime Error

Solution code:
k = int(input())
s = input()

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

Submission status: Runtime Error

Solution code:
k = int(input())
s = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
k = int(input())
s = input()

if  len(k)>len(s):
  print("s")

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
    K = int()
    S = input()
     
    if  len(S) ≤ K
    	print("K")
    	print("S[K]")
    if K < len(S)
    	print("K")
    	print("S[K]...")

Submission status: Runtime Error

Solution code:
K = input()
S = input()

if  len(S) ≤ K
	print("K")
	print("S[K]")
if K < len(S)
	print("K")
	print("S[K]...")

Submission status: Runtime Error

Solution code:
K = input()
S = input()

if  len(S) ≤ K
	print("K")
	print("S[K]")
if K < len(S)
	print("K")
    print("S[K]...")

Submission status: Runtime Error

Solution code:
k=int(input())
s=input()
 print(s[:k] + (len(s)>k)*'...')

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

a = len(S)


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

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

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

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

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

Submission status: Runtime Error

Solution code:
K = int( input() )
S = int( input() )

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
l = max(len(s)-n, 0)
if(l == 0):
  print(s)
else:
  k = s(:n)
  print(k + "...")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    num = int(K)
    if num >= len(S):
        print(S)
    else:
        print(S[:num]+'...')

K, S = input().split()

main()

Submission status: Runtime Error

Solution code:
k = input()
s = input()

l = len(s)

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

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

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

Submission status: Runtime Error

Solution code:
k = int(input())
s = input()
        
length = len(s)
if length > K:
    s = s[:K]+"..."
print(s)

Submission status: Runtime Error

Solution code:
k = int(input())
s = input()
        
length = len(s)
if length > K:
    S = S[:K]+"..."
print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
limit = int(input())
string = input()

if limit < len(string):
    ans = string[:limit] + '...'

print(ans)

Submission status: Runtime Error

Solution code:
limit = int(input())
string = input()

if limit <= len(string):
    ans = string[:limit] + '...'

print(ans)

Submission status: Runtime Error

Solution code:
limit = int(input())
string = input()

if limit <= len(string):
    print(string[:7] + '...')
else:
    print(stirng)

Submission status: Runtime Error

Solution code:
limit = int(input())
string = input()

if limit < len(string):
    print(string[:7] + '...')
else:
    print(stirng)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
K = int(input())
S = str(input()).lower()

if 0 < K < 101 and 0 < len(S) < 101:
    if len(S) =< K:
        print(S)
    else:
        print(S[:K] + "...") 
else:
    print("Try again with K and length of S between 1 and 100 ")

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

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

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

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

Submission status: Runtime Error

Solution code:
i = int(input())
s = input()
print(s[0:k-1] if len(s) > k else s)

Submission status: Runtime Error

Solution code:
n=int(input())
k=input()
l=[]
ol=len(k)
for i in range(n):
  l.append(k[i])
if(ol>n):
  print("".join(l)+"...")
elif(ol<=n):
  print(k)

Submission status: Runtime Error

Solution code:
n=int(input())
k=input()
l=[]
ol=len(k)
nl=len(l)
for i in range(n):
  l.append(k[i])
if(ol>n):
  print("".join(l)+"...")
elif(ol<=n):
  print(k)

Submission status: Runtime Error

Solution code:
n=int(input())
k=input()
l=[]
ol=len(k)
nl=len(l)
for i in range(n):
  l.append(k[i])
if(ol>nl):
  print("".join(l)+"...")
else:
  print(k)

Submission status: Runtime Error

Solution code:
K = int(input())
S = str(input())

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

Submission status: Runtime Error

Solution code:
k = input()
s = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()

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

Submission status: Runtime Error

Solution code:
K = input()

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

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

Submission status: Runtime Error

Solution code:
K = input()

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
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

Submission status: Runtime Error

Solution code:
import math
X=int(input())
count=0
atcor=100
p=0.01

while True:
    if atcor==X:
        print(count)
        break
    else:
        atcor=(atcor*p)+atcor
        atcor=math.floor(atcor)
        count+=1

Submission status: Runtime Error

Solution code:
k = int(input())
s = int(input())
if len(s) > k:
  print(s[:k])
else:
  print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

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

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

len = len(S)

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

Submission status: Runtime Error

Solution code:
S = input()
K = int(input())

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

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
if len(s)<=n:
  print(s)
else:
  print(s[:n,'...',sep=''])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
k = int(input())
s = input()
n = len(s)

if s <= k :
print(s)

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

Submission status: Runtime Error

Solution code:
k = int(input())
s = input()

if s <= k :
print(s)

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

Submission status: Runtime Error

Solution code:
k = int(input())
s = input()
n = len(s)

if n <= k 
print(s)

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

Submission status: Runtime Error

Solution code:
k = int(input())
s = intput()

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

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

Submission status: Runtime Error

Solution code:
k = int(input())
s = input()

if s <= k 
print(s)

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

Submission status: Runtime Error

Solution code:
k=int(input())
S=input()

if k>=len(S):
     print(S)
temp=""
for i in range(0,k):
    temp+=S[i]
temp+='...'
print(temp)

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

for i in range(K):
    print(S[i],end="")
if len(S) > K:
    print("...")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
K=int(input(""))
S=input("")
lens = len(S)

if lens = K:
  print(s)
else:
 ptint(S[:k]＋”...”）

Submission status: Runtime Error

Solution code:
K=int(input())
S=input()
s=list(S)

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

Submission status: Runtime Error

Solution code:
K=int(input())
S=input()
s=list(S)

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

Submission status: Runtime Error

Solution code:
K = map(int, input())
S = input()


if len(S) > K:
  print(S)
else:
  print(S[:K], '...')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
K = input()
S = input()

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

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

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

Submission status: Runtime Error

Solution code:
K=int(input())
S=input()

def printt(S,K):
	if len(S)<=K:
      print(S)
    else:
      print(s[:k]+'...')
      
printt(S,K)

Submission status: Runtime Error

Solution code:

import sys

def test(k,s):
    cnt=0

    length = len(s)
    if k<length:
        return s[:k]+'...'
    return s

if __name__ == '__main__':
    print(test(sys.argv[0],sys.argv[1]))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
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+"...")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(solution())

Submission status: Runtime Error

Solution code:
K = input()
S = input()
strings = ''
if len(K) >= len(S):
  print(S)
else:
  strings = str(S[:K + 1]) + '...'
  print(strings)

Submission status: Runtime Error

Solution code:
K = input()
S = input()
strings = ''
if len(K) >= len(S):
  print(S)
else:
  strings = str(S[:K]) + '...'
  print(strings)

Submission status: Runtime Error

Solution code:
K = input()
S = input()
if len(K) >= len(S):
  print(S)
else:
  strings = str(S[:K]) + '...'
  print(strings)

Submission status: Runtime Error

Solution code:
K = input()
S = input()
if len(K) >= len(S):
  print(S)
else:
  strings = S[:K + 1] + '...'
  print(strings)

Submission status: Runtime Error

Solution code:
K = input()
S = input()
if len(K) > len(S):
  print(S)
else:
  strings = S[:K + 1]
  print(strings)

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()

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

Submission status: Runtime Error

Solution code:
def main(k, s):
    result = ''
    for i in range(0, k):
        result += s[i]
    return result
main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
k = int(input())
S = input()
if len(S) > K:
  print(S[:K])
else:
  print(S)

Submission status: Runtime Error

Solution code:
k = input()
s = input()
i = 0
l = int(k)
p = str()

while i < l:
    p = p + s[i]
    i = i + 1

if len(s) > l:
	print(p + '...')
else:
	print(p)

Submission status: Runtime Error

Solution code:
k = input()
s = input()
i = 0
l = int(k)
p = str()

while i < l:
    p = p + s[i]
    i = i + 1

print(p)

Submission status: Runtime Error

Solution code:
k = input()
s = input()
i = 0
l = int(k)
p = None

while i < l:
    p = p + s[i]
    i = i + 1

print(p)

Submission status: Runtime Error

Solution code:
k = input()
s = input()
i = 0
l = int(k)

while i < l:
    p = p + s[i]
    i = i + 1

print(p)

Submission status: Runtime Error

Solution code:
k = input()
s = input()
i = 0
list = []
l = int(k)

while i < l:
    list.append(s[i])
    i = i + 1

print(list)

Submission status: Runtime Error

Solution code:
k = input()
s = input()
i = 0
l = int(k)

while i < l:
	print(s[i])
    i = i + 1

Submission status: Runtime Error

Solution code:
k = input()
s = input()
i = 0

while i < int(k):
	print(s[i])
    i = i + 1

Submission status: Runtime Error

Solution code:
k = input()
s = input()
i = 0

while i < 7:
	print(s[i])
    i = i + 1

Submission status: Runtime Error

Solution code:
K,S=input().split("\n")
K=int(K)
S=str(S)
longS=len(S)
if longS <= K :
    print(S)
else:
    head=S[0]
    print(head + "...")

Submission status: Runtime Error

Solution code:
K = input()
S = input()

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

Submission status: Runtime Error

Solution code:
s=input()
k=int(input())

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# atcoder 
# Türkçe konuşyorum
# Türkler var mı
# memnün oldum

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



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

Submission status: Runtime Error

Solution code:
# Below is Pythone code for input/output 

# import sys 
# # For getting input from input.txt file 
# sys.stdin = open('input.txt', 'r') 

# # Printing the Output to output.txt file 
# sys.stdout = open('output.txt', 'w') 


k = int(input())
n = raw_input()

lst = []
if(k>=len(n)):
	print(n)
else:
	for i in range(k):
		k= n[i]
		lst.append(k)

	x = ''.join(lst)

	print(x+ "...")

Submission status: Runtime Error

Solution code:
n=int(input())

s=input()
l=len(s)
if l>n:
  print(s[:n].join'...')
else:
  print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

K = int(input())
S = input()
sentence = list(S)
sentencelong = len(sentence)

if K < sentencelong:
  print(sentence[:K] + '...')
elif K > sentencelong:
  print(S)
  
else:
  sys.exit()

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()
sentence = list(S)

for i in range(K):
  print(sentence[i], end="")

sentencelong = len(sentence)

if K < sentencelong:
  print("...")

Submission status: Runtime Error

Solution code:
K = int(input())
S = input()
sentence = list(S)

for i in range(K):
  print(sentence[i], end="")
  
print("...")