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

if k < int(len(s)):
  print(s[0:int(e-k)-1]+'.'*3)
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 = list(input())
if k>=len(s):
    print(s)
else:
    for i in range (k):
        print(s[i],end="")
    print("...")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

k = [K]

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

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

Submission status: Wrong Answer

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

s = len(S)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k = int(input())
s = input()[:k] + '...'

print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3


def main():
    k = int(input())
    S = list(input())
    if len(S) <= k + 1:
        print(''.join(S))
    else:
        print(f'{"".join(S[:k])}...')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    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 = list(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def moji(S,K):
    if len(S)<=K:
        print(S)
    else:
        T=""
        for i in range(len(S)):
            if i <K:
                 T+=S[i]
            if i >=K:
                continue
        T+="..."
        print(T)

Submission status: Wrong Answer

Solution code:
Kkk = int(input())  
String = str(input())
res=""
if len(String)==Kkk :
  print(String) 
else : 
  for i in range (0,len(String)):
    if i<=Kkk-1:
      res=res+String[i]
  print(res+("..."))

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    a = len(S) - K
    b = a-2
    print(S[:b])

Submission status: Wrong Answer

Solution code:
k = int(input())
s = list(input())
if k>=len(s):
    print(s)
else:
    for i in range (k):
        print(s[i])
    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 K == 1:
  print(S[0])
elif len(S) <= K:
  print(S)
else:
  S_ = S[0:K-1]
  print(S+'...')

Submission status: Wrong Answer

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

if len(S) < K and len(S) < 1 and len(S) > 100:
    print(S)
elif len(S) > K and len(S) < 1 and len(S) > 100:
    print(S[0:K] + '...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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(1<= K <=100 and 1<= len(S) <=100):
    if(K == len(S)):
        print(S)
    else:
        print(S[0:K], end="...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=input()
if (K>=len(S)):
    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:
  S_ = S[0:K-1]
  print(S+'...')

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()
print(s[:7]+'...' if len(s)>k else s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
k = int(input())
s = str(input())
print(s[:k])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

#solve
def solve():
    k = II()
    s = list(S())
    if len(s) >= k:
        print("".join(s[:k]) + "...")
    else:
        print("".join(s))
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
B = str(input())
c = []
if N > len(B):
    print(B)
else:
    c.append(B[:(len(B)-1)] + "...")
    c.append
    print(c)

Submission status: Wrong Answer

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

s=len(S)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k=int(input())
s=input()
char=[]
if len(s) <= k:
    print(s)
else:
    for i in range(k):
        char.append((s[i]))
        
print(''.join(char) + "...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if K >= len(S):
  print(S)
else:
  print(f'{S[:-1*K - 1]}...')

Submission status: Wrong Answer

Solution code:
import sys
import math
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()

def invr():
    return(map(int,input().split()))

def solve(s,k):
    len1 = len(s)
    if len1 <= k:
        print(s)

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

def main():
    k = inp()
    solve(input(),k)


main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k = int(input())
s = input()
if len(s) > k:
    print(f'{s[:7]}...')
else:
    print(s)

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

if len(S) < K :
    print(S)
else:
    # print('{}{}'.format(S[0:K+1], '...'))
    print(S[0:K]+'...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

Solution code:
number=int(input())
word=input()
length=len(word)
if length<=number:
  print(word)
if length>number:
  word=word[0:number-1]
  print(word+"...")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if len(S)<=K:
  print(S)
elif len(S) > K:
  print(S[0:-K-1], end="...")

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
a = ""
if len(S)<=K:
    print(S)
    exit()
else:
    for i in range(K):
        a+=S[i]
print(a,"...")

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

Submission status: Wrong Answer

Solution code:
K = int(input())
S = list(input())
length = len(S)

if length < K:
    print(("".join(S)))
else:
    result = S[:K]
    print(("".join(result))+"...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if len(S)<=K:
  print(S)
elif len(S) > K:
  print(S[0:len(S)-K-1], end="...")
  print()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if len(S)<=K:
  print(S)
elif len(S) > K:
  print(S[0:len(S)-K-1], end="...")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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()
ls = []
if len(s) < k:
    print(s)
else:
    result = s[:k]+"..."
    print(result)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=str(input())
import sys
s=''
for i in range(K+1):
    try:
        s+=S[i]
    except IndexError:
        print (s)
        sys.exit()
s=s+'...'
print (s)

Submission status: Wrong Answer

Solution code:
K = int(input())
S = list(input())
length = len(S)

if length < K:
    print(S)
else:
    result = S[:K]
    print(("".join(result))+"...")

Submission status: Wrong Answer

Solution code:
number=int(input())
word=input()
length=len(word)
if length<=number:
  print(word)
if length>number:
  word=word[0:number-1]+"..."
  print(word)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math
def solution():
    k=int(input())
    s=input()
    if(k>len(s)):
        print(s)
    else:
        print(s[:k]+"...")

if __name__ == "__main__":
    solution()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

def inpl_strl(): return list(sys.stdin.readline())

K = inp()
S = inpl_strl()
if K >= len(S):
    print(S)
else:
    s = ''.join(S[:K])
    print(f'{s}...')

Submission status: Wrong Answer

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

if len(S)-str_len > 0:
  show_length = len(S)-str_len
  print(S[0:show_length-1], end="...")
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()

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

else:
    print(S)

Submission status: Wrong Answer

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

print(len(S))

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

Submission status: Wrong Answer

Solution code:
n = int(input())
#print('n=',n)
m = input()
#print('m=',m)
o = len(m)
#print('o=',o)
if o <= n:
  print(m)
elif o > n:
  print(m[0:n],'...')

Submission status: Wrong Answer

Solution code:
K = int(input())
S = str(input())
l = len(S)
ST = str()
if K >= l:
  print(S)
else:
  for i in range(K):
    ST += str(S[i])
print(ST +'...')

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

Solution code:
k = int(input())
s = []
s = str(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)
else:
    text=S[0:K]
    text=text+"..."
    print(text)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

val = input()
input_str = input()
 
if 0 > int(val) or int(val) > 100:
    sys.exit()
if 0 > len(input_str) or len(input_str) > 100:
    sys.exit()


if int(val) >= len(input_str):
    print(input_str)
else:
    new_str = input_str[0:7]
    print(new_str + '...')

Submission status: Wrong Answer

Solution code:
K=int(input())
S=str(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[0:K] + "...")

else:
    print(S)

Submission status: Wrong Answer

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

if len(S) > K:

    for i in range(0,K):

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

else:

    print(S)

Submission status: Wrong Answer

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

tail_str = ''
if K <= len(S):
    tail_str = '...'
print('%s%s' % (S[:K], tail_str))

Submission status: Wrong Answer

Solution code:
import sys
import math
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()

def invr():
    return(map(int,input().split()))

def solve(s,k):
    len1 = len(s)
    if len1 <= k:
        return s

    else:
        corte = ''
        for i in range(k):
            corte += s[i]
        corte += '...'
        return corte

def main():
    k = inp()
    print(solve(input(),k))


main()

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:
in_str = input()
in_str2 = input()

if (not in_str.isnumeric()) :
    print("error: 1st arg must be integer")
    exit()

num = int(in_str)
str = in_str2
str_len = len(in_str2)

if num > 100 :
    print("error: 1st arg must be under 100")
    exit()
if str_len> 100 :
    print("error: size of 2nd arg must be under 100")
    exit()

if num > str_len :
    print(str)
else :
    print(str[0:num] + "...")

Submission status: Wrong Answer

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

if len(S)-str_len < 0:
  show_length = 0
  print(S)
else:
  show_length = len(S)-str_len
  print_len = len(S)-show_length-1
  print(S[0:show_length-1], end="")
  print("...",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:
try:
  k=int(input())
  s=input()
  if len(s)>k:
      print(s[0:7]+"...")
  else:
      print(s)
except:
  pass

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
string_list = [input() for i in range(2)]

if int(string_list[0]) > len(str(string_list[1])):
    print(string_list[1])
else:
    print(str(string_list[1])[: int(string_list[0])] + "...")

Submission status: Wrong Answer

Solution code:
def cal():

    num = int(input())
    if num >= 10:
        ben = num % 10
    else:
        ben = num
    
    if ben == 3:
        print("bon")
    elif ben == 0 or ben == 1 or ben == 6 or ben == 8:
        print("pon")
    elif ben == 2 or ben == 4 or ben == 5 or ben == 7 or ben == 9:
        print("hon")
    


cal()

Submission status: Wrong Answer

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

s = int(len(S))
tmp = []

if s < K:
    print(S)
else:
    for i in range(K):
        tmp.append(S[i])
    tmp.append("...")

#print(tmp)
print("".join(map(str, tmp)))

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

if len(S) <= K:
    print(S)
else:
    S = S.replace(S[K:], '...')
    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[:k]+'...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

print(len(S), K)
if K < len(S):
    print(f"{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[K:] + "." * 3)

Submission status: Wrong Answer

Solution code:
s=[]
k=int(input())
s=list(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:
    print(s[0] + '...')
else:
    print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if len(s) <= 100:
    print(s)
else:
    print(s[0:k], end='...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

B = list(S)

L = len(S)


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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
score=''
if n>=len(s):
	print(s)
else:
	for i in range(n):
		score+=s[i]
print("{}...".format(score))

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()
l=len(s)
if l<=k:
  print(s)
else:
  p=s[0:k-1]
  q='...'
  r=p+q
  print(r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
in_str = input()
in_str2 = input()

if (not in_str.isnumeric()) :
    print("error: 1st arg must be integer")
    exit()

num = int(in_str)
str = in_str2
str_len = len(in_str2)

if num > str_len :
    print(str)
else :
    print(str[0:num] + "...")

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:
length = int(input())
input_str = input()

if len(input_str) > length:
    print(input_str + '...')
else:
    print(input_str)

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

Submission status: Wrong Answer

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

def main():
    K = int(input())
    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[0:k]+"...")
else:
    print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = [input() for i in range(2)]

k = int(n[0])
s = n[1]

print(k,s)

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

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

Submission status: Wrong Answer

Solution code:
#-*-coding:utf-8-*-

def main():
    k = int(input().strip())
    s = input().strip()
    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[:k]+"...")
print(len(s))

Submission status: Wrong Answer

Solution code:
k = int(input())
s = input()
con1 = k >= 1 and k <= 100
con2 = len(s) >= 1 and len(s) <= 100
con3 = s.islower() == True and con2 == True
if con1 == True and con3 == True:
    if k <= len(s):
        newstring = s[0:k] + "..."
        print(newstring)
    else:
        print(s)
else:
    print()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

a=int(stdin.readline())
b=stdin.readline()

if len(b)<=a:
    print(b)
else:
    b=b[:a]
    b=b+'...'
    print(b)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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:
  for i in range(K):
    print(S[i], end="")
print("...")

Submission status: Wrong Answer

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

def main():
    K = int(input())
    S = input()

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

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

print(K,len(S))

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

Submission status: Wrong Answer

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

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