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

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

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 = s[:k]
        corte += '...'
        return corte

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


main()

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    k = int(input())
    s = input()
    #k, n = map(int, input().split())
    ls = len(s)
    print(len(s))
    
    if ls<=k:
        print(s)
    else:
        print(s[0:k] + "...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math
a=int(stdin.readline())
b=stdin.readline()

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

Submission status: Wrong Answer

Solution code:
def main():
    k=int(input())
    s= list(input())

    if len(s) <= k:
        ans = ''.join(s)
        print(ans)
    else:
        del s[len(s)-k-1:]
        s.append('...')
        ans= ''.join(s)
        print(ans)


if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__=="__main__":
    # Problem B
    K = input()
    S = input()
    K_len = int(K)
    S_len = len(S)

    if S_len < K_len:
        print(S)
    else:
        print(S[:K_len]+str("..."))

Submission status: Wrong Answer

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

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

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 = s[:k]
        corte += '...'
        return corte

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


main()

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math
a=int(stdin.readline())
b=stdin.readline()

if len(b)<=a:
    print(b)
else:
    b=b[:7]
    print(b,end='')
    print('...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

N = len(S)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
K = int(input())
S = input()
print("{}{}".format(S[:6+1], '...' if len(S) > K else ''))

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

ss = list(s)

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

Submission status: Wrong Answer

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

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

else:
         m = S[0:K]
         m.append('...')
         print("".join([str(n) for n in m]))

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())
S = str(input()).lower()
if len(S)>K:
    print(f"{S[0:K]}...")
elif len(S)<K:
    print(S)

Submission status: Wrong Answer

Solution code:
a=input()
b=input()

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if s_2 > k:
    tmp = s[k:]
    s = s[:k]
    a = ["." for i in range(s_2-k)]
    s += "".join(a)
    ans = s
else:
    ans = s
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()

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def inp():
    return(int(input()))


k = inp()

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

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

Submission status: Wrong Answer

Solution code:
def main():
    k=int(input())
    s= list(input())

    if len(s) < k:
        ans = ''.join(s)
        print(ans)
    else:
        del s[-k-1:]
        s.append('...')
        ans= ''.join(s)
        print(ans)


if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k=int(input())
s=input()
l=len(s)
if(l<=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[:k]+'...')

Submission status: Wrong Answer

Solution code:
N = int(input())
M = str(input())

if len(M)>N:
    print(M[0:7]+'...')
else:
    print(M)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
#import time
#import copy
#from collections import deque, Counter, defaultdict
#from fractions import gcd
#import bisect
#import itertools
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
 
def ri():
    return list(map(int, input().split()))
def rs():
    return list(input().strip())
 
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 = 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())
s_len = len(s)
if s_len > k:
    print(s[0:7],"...")
else:
    print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
import os

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

if __name__ == "__main__":
    main()

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

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

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

t = ""
a = len(s)


if k >= a:
    print(s)
else:
    for i in range(k, len(s)):
        t += "."

    print(s[:k] + t)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k = int(input())
s = input()
if k >= len(s):
    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+1]+"...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math
a=int(stdin.readline())
b=stdin.readline()

if len(b)<=a:
    print(b)
else:
    for k in range(0,a):
        print(b[k],end='')
    print('...',end='')

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
k = int(input())
s = input()
print("{}{}".format(s[0:k], "..."))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(len(s))

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.replace(s[k:], '...')
print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
k = int(input())

s = str(input())

n = len(s)

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    K = int(input())
    S = input()
    if K > len(list(S)):
        print(S)
    else:
        print(S[:K], end='')
        print("...")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n= int(input())
L = list(input())

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

Submission status: Wrong Answer

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

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:
N = int(input())
B = str(input())
if N == len(B):
    print(B)
else:
    print(B[:(len(B)-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:
import sys

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


def main():
    K = II()
    S = input()
    Sl = len(S)
    print(Sl)
    if Sl <= K:
        print(S)
    else:
        ans = S[:K] + "..."
        print(ans)



if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
K = int(input())
S = input().replace('\n', '')
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:
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()
t=len(list(s))
print(t)
n=""
if(t<=k):
    print(s)
else:
    for i in range(k):
        n=n+s[i]
    n=n+"..."
    print(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:

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

ss = list(s)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def actual(k, s):
    if len(s) >= k:
        return f'{s[:k]}...'

    return s

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

print(actual(k, s))

Submission status: Wrong Answer

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

S = list(S)
out = []
for i in range(K):
    if i >= len(S):
        break
    out.append(S[i])


if i+1 != len(S):
    out.append('...')

print(''.join(out))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())
B = str(input())
if N == len(B):
    print(B)
else:
    print(B[:(len(B)-1)])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k=int(input())
s=input()
if k<=len(s):
    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[:7] + '...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

rslt = ""

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

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

print(rslt, flush=True)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math
a=int(stdin.readline())
b=stdin.readline()

if len(b)<=a:
    print(b)
else:
    for k in range(0,a):
        print(b[k],end='')
    print('...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=input().split()
num=len(S)
S=str(S[0])

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
k = int(input())
s = str(input())
if k > len(s):
  print(s)
else:
  print('{st}...'.format(st=s[0:k]))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys


def input():
    return sys.stdin.readline()


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

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


if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k = int(input())
s = input()
#print(n[len(n) - 1])
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[:k + 1] + "...")

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:
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()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))

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

    else:
        corte = s[:k]
        corte += '...'
        return corte

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


main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import itertools


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

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

Submission status: Wrong Answer

Solution code:
import itertools
import sys

def main():
    # n, m, x = map(int, input().split())
    k = int(input())
    s = input()
    print(len(s))
    if len(s) > k:
        s = s[:k] + '...'

    print(s)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
k = int(input())
s = input()
l = len(s)
S = s[:k]

if l >= k:
    print(S+'...')
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:
strLen = int(input())
str = input()
if len(str) <= strLen:
  print(str)
else:
  print(str[0:7] + "...")

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

K = min(len(S), K)
for i in range(K):
    print(S[i], end='')

print('...' if K > len(S) else '')

Submission status: Wrong Answer

Solution code:
k = int(input());
s = input();
n = int(len(s));
a = '…'

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

Submission status: Wrong Answer

Solution code:

#------------------------------warmup----------------------------
import os
import sys
from io import BytesIO, IOBase
import math 
BUFSIZE = 8192
 
 
class FastIO(IOBase):
    newlines = 0
 
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
 
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
 
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
 
 
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
 
#-------------------game starts now----------------------------------------------------
# n,q=map(int,input().split())
# l=list(map(int,input().split()))
k=(int)(input())
n=(input())
if(k==len(n)):
    print(n)
else:
    print(n[0:k],end='')
    print('...')

Submission status: Wrong Answer

Solution code:
K = int(input())
S = str(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:
    c=[]
    c[0:0]=s
    del c[k:]
    print(''.join(c))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys


def input():
    return sys.stdin.readline()


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

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


if __name__ == "__main__":
    resolve()