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: Wrong Answer

Solution code:

k=int(input()) #take input as integer
s=input()
s1=len(s)
z=0


if k>1 and k<100: #make sure input A is 0<k<100
    if s1>1 and s1<100: #make sure input B is 1<S<100
        if s1<k:
            print(s) #When length k is more than S, print all S
        else:
            while z<k:
                print(s[z],end="") #When length k is less S, print just the index with length k
                z+=1
    else:
        print('Wrong input') #tell the user that the input is wrong
else:
    print('Wrong input') #tell the user that the input is wrong

Submission status: Wrong Answer

Solution code:

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

while k==1 and k<=100 and len(s)==1 and len(s)<=100: #check if k and s are between 1 to 100

    if len(s) > k:
        #s.slice(k)
        print (s.slice(k)+"...") #cut the str until value of k and add ... to the end

    else:
        print (s)

Submission status: Wrong Answer

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

#make a second string for the appending
for i in range(k):
    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
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)

Submission status: Wrong Answer

Solution code:
#define S as string
#print S until len is equal to K
#time complexity O(1)

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

str = S
dots = "..."
if len(S) == K:
    print(S)
elif len(S) > K:  
    print (str[0:K]+ "...")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#K is an input for the range of S
#input from user to get lowercase the letters
K = int(input())
S = input()
if len(S) > K:
    print(S[:K] + ".....")
else:
    print(S)

Submission status: Wrong Answer

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



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

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

Submission status: Wrong Answer

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

T= list(S)

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

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

Submission status: Wrong Answer

Solution code:
a=[] #create a list to append S and '...' if S less than K
k=int(input()) #get integer K from user
s=input() #get string S from user
size=len(s) #get length of the S to compare with K

if size<k: #compare S with K
    print (s)

else:
    a.append(s[0:k]) #append S into list a
    a.append('...') #append '...' at the end of S
    b=''.join(a) #used to print without whitespace
    print (b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a=input()
b=input()
c=b[:int(a)]
if len(b)>int(a):
    c+=". . ."
print(c)

Submission status: Wrong Answer

Solution code:
k=int(input())
s=input()
print(s[:k])
#get input k
#get input s
#print the characters before k

Submission status: Wrong Answer

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

if k < len(word):
  print(word[:7]+"...")

print(word)

Submission status: Wrong Answer

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

if k < len(word):
  print(word[0:7]+"...")
else:
  print(word)

Submission status: Wrong Answer

Solution code:
def Ii():return int(input())
def Mi():return map(int,input().split())
def Li():return list(map(int,input().split()))
 
k = Ii()
a = input()
m = len(a)
if k > m:
  print(a)
else:
  print(a[:k],end="")
  print('...')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
nb = int(input())
sentence = input()

if len(sentence) > nb:
	print(sentence[0:nb-1] + '...')
else:
	print(sentence)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

k, s = sys.stdin.readlines()
k = int(k)
if len(s) <= k:
    print(s)
else:
    print('{}...'.format(s[:k]))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
#input = sys.stdin.buffer.readline


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

#import numpy as np


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

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
















if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
#input = sys.stdin.buffer.readline


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

#import numpy as np


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

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
















if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
cnt = '...'

if len(S) <= K:
    print(S)
else:
    print(S[:7] + str(cnt))

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
cnt = '...'

if len(S) < K:
    print(S)
else:
    print(S[:7] + str(cnt))

Submission status: Wrong Answer

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

deffirence = len(S) - K

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=input()
if len(S)<=K:
    print(S)
else:
    T=[]
    S=list(S)
    for i in range(K):
        T.append(S[i])
        K="".join(T)
    print(K,"...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def triple_dot():
    k = int(input())
    s = list(input())
    len_s =len(s)
    result_s = []
    
    if len_s > k:
        for i in range(k):
            result_s.append(s[i])
    if len_s < k:
        print("".join(s))

triple_dot()

Submission status: Wrong Answer

Solution code:
def triple_dot():
    k = int(input())
    s = list(input())
    len_s =len(s)
    result_s = []
    
    if len_s > k:
        for i in range(k):
            result_s.append(s[i])
    print("".join(result_s) + "...")


triple_dot()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
k=int(input())
s=list(input())
if(len(s)<=k):
  print(s)
else:
  print(s[0:k-1],end="")
print("...")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if len(s) >= k:
    print(s[:k], '...', sep='')
else:
    print(s)

Submission status: Wrong Answer

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

if n < K :
    print(S)
    
elif K <= n:
    print(S[:K] + '...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i, s in enumerate(S):
    print(s, end='')
    if(i == K-1):
        print('...')
        break
print('')

Submission status: Wrong Answer

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



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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
a = []
for l in sys.stdin:
    a.append(l)

if int(a[0]) < len(a[1]):
  print(a[1][0:7] + '...')
else:
  print(a[1])

Submission status: Wrong Answer

Solution code:
import sys
a = []
for l in sys.stdin:
    a.append(l)

if int(a[0]) <= len(a[1]):
  print(a[1][0:7] + '...')
else:
  print(a[1])

Submission status: Wrong Answer

Solution code:
a = int(input());s = input()
print(s[:a] + "..." * (len(s) - 1 > a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

l = len(S)

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

Submission status: Wrong Answer

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

l = len(S)

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

Submission status: Wrong Answer

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

l = len(S)

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=input()
sbreak=list(S)
news=[]
if len(sbreak)<=K:
    print(S)
else:
    for num in sbreak:
        news.append(num)
        if num==sbreak[K-1]:
            break
    s=''.join(news)
    print(s+'...')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
l = int(input())
moji = input()

M = len(moji)

if(M < l):
  print(moji)
else:
  print(moji[:l])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
while len(s)<n:
    s=s[:n]+"..."
print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if len(moji) <= n:
    print(moji)
else:
    print(moji[:7]+'...')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#最初の1文字をインプット
k=int(input())
#文字列を1文字ずつ配列としてインプット
s=list(input())

#確認用
#print(k)
#print(s)

if len(s) <= k: #配列sの文字数がk以下なら
    print(s)
else: #配列sの文字数がkを超えているなら
    new_s=s[0:k] #配列の最初からk番目までを切りとる
    new_s.append("...") #末尾に...を加える
    print(new_s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

m=len(n)

t=int (k)



if(m<=t):
  print("n")
  
else:
  for i, name in enumerate(n):
    if i==t:
      print("...")
      break
    print(name,end='')

Submission status: Wrong Answer

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

m=len(n)

t=int (k)



if(m<=t):
  print("n")
  
else:
  for i, name in enumerate(n):
    if i==t:
      break
    print(name,end='')

Submission status: Wrong Answer

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

m=len(n)

t=int (k)



if(m==t):
  print("n")
  
else:
  for i, name in enumerate(n):
    if i==t:
      break
    print(name,end='')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
if(len(S)>K):
    for i in range(K):
        print(S[i],end="")
    print("…")
else:
    print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = len(S)


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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
k = int(input())
s = list(input())
result =[]
for i,letter in enumerate(s):
    result.append(letter)
    if k == 0:
        print("...")
        break
    elif i+1 == k:
        break
    elif i+1 > k:
        result.append("...")
        break
print("".join(result))

Submission status: Wrong Answer

Solution code:
k = int(input())
s = list(input())
result =[]
for i,letter in enumerate(s):
    result.append(letter)
    if k == 0:
        print("...")
        break
    elif i+1 >= k:
        result.append("...")
        break
print("".join(result))

Submission status: Wrong Answer

Solution code:
k = int(input())
s = list(input())
result =[]
for i,letter in enumerate(s):
    result.append(letter)
    if i+1 >= k:
        result.append("...")
        break
print("".join(result))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

S_len=len(S)

three_point='...'

if S_len<K:
  print(S)
else:
  print(S[0:K]+three_point)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
limit=int(input())
s=list(input())
if len(s)>limit:
	s=''.join(s[:limit])+'...'
print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(S)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
if len(s)>n:
    nl=s[0:n]
    print(nl,'...')
else:
    print(s)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
nl=s[0:n]
print(nl,'...')

Submission status: Wrong Answer

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

if len(s) <= k:
  print(s)
else:
  print("{}...".format(s[0:7]))

Submission status: Wrong Answer

Solution code:
a = int(input())
b = str(input())
print(b[0:a]+'...')

Submission status: Wrong Answer

Solution code:
try:
  k=int(input())
  s=input()
  if(len(s)<=k):
    print(s)
  else:
    ans=''
    ans=s[:7]+'...'
    print(ans)
except EOFError as e:
  pass

Submission status: Wrong Answer

Solution code:
num = int(input())
word = str(input())

if len(word) <= num:
    print(word)
else:
    word_r = word[:num]
    for _ in range(len(word) - num):
        word_r += '.'
    print(word_r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


K = int(K)
 
s_length = len(S)


if s_length > K:
    val = S[0:K]
    print(val,'...')
else :
    print(S)

Submission status: Wrong Answer

Solution code:
import sys

count = 0
for i in sys.stdin:
    if count == 0:
        K = int(i)
        count += 1
    else:
        S = i
        
length = len(S)
if length > K:
    S = S[:K]+"..."
print(S)

Submission status: Wrong Answer

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


K = int(K)
print(K) 
s_length = len(S)


if s_length > K:
    val = S[0:K]
    print(val,'...')
else :
    print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input = input()
last_char = input[-1]
if last_char == "3":
    print("bon")
elif last_char in ["0", "1", "6", "8"]:
    print("pon")
else:
    print("hon")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if len(s)<=k:
    print(s)
else:
    a=[]
    a.append(s[0:7])
    a.append("...")
    print("".join(a))

Submission status: Wrong Answer

Solution code:
import sys

count = 0
for i in sys.stdin:
    if count == 0:
        K = int(i)
        count += 1
    else:
        S = i
        
length = len(S)
if length <= K:
    print(S)
else:
    S_ = S[:K]+"..."
    print(S_)

Submission status: Wrong Answer

Solution code:
import sys

count = 0
for i in sys.stdin:
    if count == 0:
        K = int(i)
        count += 1
    else:
        S = i
length = len(S)
if length <= K:
    print(S)
else:
    print(S[0:K] + "...")

Submission status: Wrong Answer

Solution code:
import sys

count = 0
for i in sys.stdin:
    if count == 0:
        K = int(i)
        count += 1
    else:
        S = i
length = len(S)
if length <= K:
    print(S)
else:
    print(S[0:K] + "…")

Submission status: Wrong Answer

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

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

else:
    print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
k = int(input())
s = input()
#print(len(s))

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

Submission status: Wrong Answer

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

new_S = S[:K]
new_S += '...'

print(new_S)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
K = int(input(), 10)
S = 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: Wrong Answer

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

if 0 < K < 101 and 0 < len(S) < 101:
    if len(S) < K:
        print(S)
    else:
        print(S[:K] + "...") 
elif K > 100 or K < 1:
    print("Please choose an interger between 1 to 100")
elif len(S) > 100 or len(S) < 1:
    print("Please enter at least at least 1 string and not more than 100")

Submission status: Wrong Answer

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

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