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

if 0 < K < 101 and 0 < len(S) < 101:
    if len(S) < K:
        print(S.lower())
    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(), 10)
S = input()

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

if 0 < K < 101 and 0 < len(S) < 101:
    if len(S) < K:
        print(S)
    else:
        print(S[0:K] + "...") 
elif K > 100 or K < 1:
    print("Please choose an interger from 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 = input()

if 0 < K < 101 and 0 < len(S)+1 < 101:
    if len(S) < K:
        print(S)
    else:
        print(S[0:K] + "...") 
elif K > 100 or K < 1:
    print("Please choose an interger from 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 = input()

if 0 < K < 101 and 0 < len(S)+1 < 101:
    if len(S) < K:
        print(S)
    else:
        M = len(S) - K
        print(S[0:M] + "...") 
elif K > 100 or K < 1:
    print("Please choose an interger from 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("enter a number: "))
S = input("enter a random string: ")
def f(K, S):
    if 0 < K < 101 and 0 < len(S)+1 < 101:
        if len(S) < K:
            return S
        else:
            M = len(S) - K
            return S[0:M] + "..."
    elif K > 100 or K < 1:
        return "Please choose an interger from 1 to 100"
    elif len(S) > 100 or len(S) < 1:
        return "Please enter at least at least 1 string and not more than 100"

print (f(K, S))

Submission status: Wrong Answer

Solution code:
K = int(input())
S = input()
for s in S[K:]:
  s = '.'
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if l<=n:
  print(k)
else:
  ans=""
  for i in range(n):
    ans+=k[i]
  print(ans)

Submission status: Wrong Answer

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

if l<=n:
  print(k)
else:
  ans=""
  for i in range(n):
    ans+=k[n]
  print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if len(s) >= n:
    print(f'{s[:n]}...')
else:
    print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

k = int(k)
if length <= k:
    print(s)
else:
    string = ''
    for i in range(k):
        string += s[i]
    string += '...'
    print(string)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k = input()
s = len(input())
klen = len(k)
if s > klen:
    print(s)
else:
    print(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) <= len(str(K)):
    print(S)
else:
    print(S[:K], end='...')

Submission status: Wrong Answer

Solution code:
K = input()

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

#print(len(S))
#print(S[1:3])

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

Submission status: Wrong Answer

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

#print(len(S))
#print(S[1:3])

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

Submission status: Wrong Answer

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

#print(len(S))
#print(S[1:3])

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

@author: 17664
"""

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

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

Submission status: Wrong Answer

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

@author: 17664
"""

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

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

Submission status: Wrong Answer

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

@author: 17664
"""

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if len(word) <= keta:
  print(word)
else:
  print(word[:keta-1] + "...")

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def main():
    K = int(input())
    S = input()
    diff = K - len(S)
    if diff > 0:
        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])

Submission status: Wrong Answer

Solution code:
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('b1.in')


def read_int_list():
    return list(map(int, input().split()))


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    K = read_int()
    S = read_str()
    if len(S) >= K:
      res = S[0:K] + '...'
    else:
      res = S
    print(res)


main()

Submission status: Wrong Answer

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

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)
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:
#!/usr/bin/env python3


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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=str(input())
if K>1 and K<100 and len(S)>1 and len(S)<100:
    if len(S)==K or 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 or len(S)<K:
    print(S)
else:
    print(S[:7]+'...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

b = len(word)

if int(a) > b:
  print(word)
else:
  print(word[0:int(a)] + "...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

S_len = len(S)

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

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 k > len(s):
  print(s)
else:
  print("{}...".format(s[:k]))

Submission status: Wrong Answer

Solution code:
n = int(input())
p = list(input())
del p[n:]
p="".join(p)
print(p)

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:
value = int(input())
text = input()
if value < len(text):
    print(text[0]+'...')
else:
    print(text)

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

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

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-1):],"...")

Submission status: Wrong Answer

Solution code:
a=int(input())

b=input()

print(b[:a]+"...")

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k=int(input())
s=input()
n=len(s)
if k>=n:
  print(s)
else:
  ans =""
  for i in range(k):
    ans+=s[i]
  s+="..."
  print(s)

Submission status: Wrong Answer

Solution code:
n=int(input())
arr=input()
z=len(arr)
if z<=n:
    print(arr)
else:
    print(arr[:n],"...")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:


def say_trim_log_words():
    k = input()
    s = input()

    min_length = int(k)

    print(s if len(s) < min_length else '{}...'.format(s[:min_length]))


if __name__ == '__main__':
    say_trim_log_words()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if len(S) <+ K:
    print(S)
elif len(S) > K:
    SK = S[: K]+ "…"
    print(SK)

Submission status: Wrong Answer

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

if (k > len(s)):
  print(s)
elif(k < len(s)):
  ans = k-len(s)
  print(s[:ans]+'...')

Submission status: Wrong Answer

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

if (k > len(s)):
  print(s)
elif(k < len(s)):
  ans = k-len(s)
  print(s[:ans])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
b=input()
c=len(b)
if c==a-1 or c<a:
  print(b)
else:
  print(b[:a]+'...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

m_1 = list(m)

if len(m_1)>int(n):
  a = "".join(m_1[0:int(n)])
  print(a+"...")
else:
  print(n)

Submission status: Wrong Answer

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

if len(s) >= k:
    s = s[0:k]

s = s + '...'

print(s)

Submission status: Wrong Answer

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

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

print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = str(input())
identify = N[-1]
answer = 'hon'
pon_list = ['0','1', '6', '8']
bon_list = ['3']
if identify in pon_list:
  answer = 'pon'
elif identify in bon_list:
  answer = 'bon'
print(answer)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if len(S)<=K:
    print(S)
else:
    print(S[:-(K-len(S))-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:
input_1=input()
input_2=input()
#print(input_1)
#print(input_2)
    
length = len(input_2)
#print(length)

if int(length) <= int(input_1):
    print(input_2)
else:
    print(input_2[:int(input_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])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
k = int(sys.stdin.readline().rstrip())
s = sys.stdin.readline().rstrip()
l = len(s)
if l < k:
  print(s)
else:
  print(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:
import sys

input = sys.stdin.readline
sys.setrecursionlimit(4100000)


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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
k=int(input())
s=input()
l=len(s)
ans=''
for i in range(k):
  if i==l:
    break
  ans+=s[i]
else:
  ans+='...'
print(ans)

Submission status: Wrong Answer

Solution code:
k=int(input())
s=input()
l=len(s)
ans=''
for i in range(k):
  if i==l:
    break
  ans+=s[i]
else:
  print(ans)
  exit()
ans+='...'
print(ans)

Submission status: Wrong Answer

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

S = input()

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
k = int(input().rstrip())
s = list(input().rstrip())

def print_len(k,s):
    for i in range(min(k,len(s))):
        print(s[i],end="")
    for i in range(len(s)-k):
        print('.',end="")
    print()
    
print_len(k,s)

Submission status: Wrong Answer

Solution code:
k = int(input().rstrip())
s = list(input().rstrip())

print(s)
def print_len(k,s):
    for i in range(min(k,len(s))):
        print(s[i],end="")
    for i in range(len(s)-k):
        print('.',end="")
    print()
    
print_len(k,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,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]+'...')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

print(s[:k])

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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



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

Submission status: Wrong Answer

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

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



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

Submission status: Wrong Answer

Solution code:
a = int(input())
s = input()
if(len(s) > a):
    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:
n=int(input())
 
s=input()
l=len(s)
if l>n:
  print(s[:n].join('...'))
else:
  print(s)

Submission status: Wrong Answer

Solution code:
import sys

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

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

  print("...")
elif K > sentencelong:
  print(S)
  
else:
  sys.exit()

Submission status: Wrong Answer

Solution code:
import sys

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

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

  print("...")
elif K > sentencelong:
  print(S)
  
else:
  sys.exit()

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

len_S = len(S)

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:
	s = s.ljust(k)
	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 = input()
S = input()

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def solve():
    n = len(s)
    if n <= k:
        print(s)
    else:
        print(s[:n] + "...")
    return

#n, m = [int(ii) for ii in raw_input().split()]
k = int(input())
s = input()
solve()

Submission status: Wrong Answer

Solution code:
def solve():
    n = len(s)
    if n <= k:
        print(s)
    else:
        print(s + "...")
    return

#n, m = [int(ii) for ii in raw_input().split()]
k = int(input())
s = input()
solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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


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

else:
    print(K)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
k = int(input())
s = input()
ans = ""
if(k<len(s)):
    ans += s[0:k]
    ans.ljust(len(s)-k,'.')
else:
    ans+=s[0:k]

print(ans)

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
#a = []
#for l in sys.stdin:
#    a.append(int(l))
k = int(input())
s = input()
if len(s) <= k:
   print(s)
else:
   for i in range(k):
      print(s[i], end="")
   for i in range(len(s) - k):
      print('.', end="")

Submission status: Wrong Answer

Solution code:
import sys
#a = []
#for l in sys.stdin:
#    a.append(int(l))
k = int(input())
s = input()
if len(s) <= k:
   print(s)
else:
   for i in range(k):
      print(s[i])
   for i in range(len(s) - k):
      print('.')

Submission status: Wrong Answer

Solution code:
import sys
#a = []
#for l in sys.stdin:
#    a.append(int(l))
k = input()
s = input()
if len(s) <= len(k):
   print(s)
else:
   print(k)
   for i in range(len(k)-len(s)):
      print('.')

Submission status: Wrong Answer

Solution code:
import sys
#a = []
#for l in sys.stdin:
#    a.append(int(l))
k = input()
s = input()
if len(s) >= len(k):
   print(s)
else:
   print(k)
   while i in range(len(k)-len(s)):
      print('.')

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

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

while not 1 <= k <= 100:
    print('out of range! enter again')
    k = int(input(''))

while not s.islower():
    print('must be lowercase! enter again')
    s = str(input(''))

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

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