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()
s_list = list(s)#文字列をリストに
long = len(s_list)

if(long <= k):
    print(k)
else:
    print(''.join(s_list[: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:
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])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
k=int(input())
s=input()
n=len(s)
if k>n:
  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:
    kotae = []
    for i in range(k):
        kotae.append(s[i])
    kotae.append("...")

    kotae2 = "".join(kotae)
    print(kotae2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-05-17 21:05:31 +0900
# LastModified: 2020-05-17 21:07:49 +0900
#


import os
import sys
#import numpy as np
#import pandas as pd


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

if __name__ == "__main__":
    main()

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

Submission status: Wrong Answer

Solution code:
# print('input >>')
K = int(input())
S = input()

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

# print('-----output-----')

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:
# ABC168 B ... (Triple Dots)

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
length=eval(input(""))
string = input("")

if(len(string)==length):
    print(string)
if(len(string)>length):
    print(string[0:length],end="...")

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:7],end='')
    print('...')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    K = int(input())
    S = input()
    if len(S) <= K:
        print(S)
    else:
        print(S[0:7]+"...")
    #a = list(map(int, input().split()))
    #print(a)
    
    
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], end="")
    print("."*(len(S)-K))

Submission status: Wrong Answer

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

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[0:(k-1)])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
import sys

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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()
l = len(S)
if l <= K:
    print(S)
else:
    SS = S[:K]+"…"
    print(SS)

Submission status: Wrong Answer

Solution code:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))
if __name__ == "__main__":
    k = I()
    s = S()
    print(s if len(s) <= k else print(s[:k] + "..."))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

leng = len(S)
print(leng)

if(leng > K):
  word = S[0:K] + '...'
else:
  word = S

print(word)

Submission status: Wrong Answer

Solution code:
def main():
  k = int(input())
  s = input()
  val = len(s)-k
  if val > 0:
    print(s[:k]+'...')


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#import re
import sys
input = sys.stdin.readline
#import heapq
#import bisect
#from collections import deque
#import math

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

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

Submission status: Wrong Answer

Solution code:
def solve():
    K = int(input())
    S = input()
    if len(S) < K:
        print(S)
        exit()
    for i in range(K):
        print(S[i], end="")
    print('...')


solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

    print(s)


if __name__ == '__main__':
    main()

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:
k = int(input())
s = input()
ans= str()
for i in s:
    ans+=i
if len(s)<=k:
    print(ans)
else:
    print(ans+'...')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

#k = 7
#s = 'nikoandsolstice'

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math

#tmp = input().split()
#n,m = list(map(lambda a: int(a), tmp))

k = int(input())
s = input()
#tmp = input().split()
#n,m,k = list(map(lambda a: int(a), tmp))


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

Submission status: Wrong Answer

Solution code:
n=int(input())
if n==3:
    print("bon")
elif n<=1 or n==6 or n==8:
    print("pon")
else:
    print("hon")

Submission status: Wrong Answer

Solution code:
#import numpy as np
#a,b,c=map(int,input().split())
z=int(input())
a=input()
if len(a)>z:
    b=a[:7]
    print(b+"...")
else:
    print(a)

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
input=sys.stdin.readline


k=int(input())
s=input()
#d=list(map(int,input().split()))
if len(s)<=k:
    print(s)
else:
    s=s[:k]
    s=s+"..."
    print(s)

Submission status: Wrong Answer

Solution code:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))
if __name__ == "__main__":
    k = I()
    s = S()
    print(s if len(s) <= k else print(s + "..."))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

readline = stdin.buffer.readline

INF = 10 ** 10

K = int(readline())
S = str(input())

if len(S) < K:
    print(S)
else:
    tmp = "".join([c for c in S[:K]])
    print(tmp + "...")

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

sys.setrecursionlimit(10 ** 7)

# 1 ✕ 1 (int)
K = int(input().rstrip())

# 1 ✕ 1 (str)
S = input().rstrip()

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

Submission status: Wrong Answer

Solution code:
# coding=UTF-8
from collections import deque
from operator import itemgetter
from bisect import bisect_left, bisect
import itertools
import sys
import math
import numpy as np
import time
sys.setrecursionlimit(10**6)
input = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K = int(input())
S = str(input())
if len(S) == K:
    print(K)
if len(S) > K:
    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:
k = int(input())
s = input()

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

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 = input()
length = len(s)
if k < length:
    s = s[:k]
    for i in range(k, length):
        s += '.'

print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
S=list(input())
if len(S)<=K:
    print(*S,sep="")
else:
    kari=S[:K]
    kari.append("…")
    print(*kari,sep="")

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

nagasa = len(S)

P = '...'

if nagasa < K:
	print(S)
else:
	S = S[0:K]+P
	print(S)

Submission status: Wrong Answer

Solution code:
import math
#def main(S, b):
if __name__ == '__main__':
    #a, b, c, k = map(int, input().split())
    k = int(input())
    n = input()
    #print(n[-1])
    if (len(n) < k):
        print(n)
    else:
        print(n[:k] + "...")

    # if (s == t[:(len(s))] and len(t) == len(s) + 1):

    #     print("Yes")
    # else:
    #     print("No")
    # s = sum(a)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    k = i_input()
    s = s_input()

    len_s = len(s)

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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



if __name__ == '__main__':
    K = int(input())
    S = input()
    main(K, S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
b,= map(int, input().split())
a= input().split()
c= list(a)
if len(c)<=b:
  print(a)
else:
  print(str(a[:b])+"...")

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys
import math

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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:
def cin(): # To take limited number of inputs
	return map(int,input().split())

def cino(test=False): # To take individual int input (test = False)
    if not test:
        return int(input())
    else: # To take string input (test = True)
        return input()

def cina(): # array input
  return list(map(int,input().split()))

def ssplit(): # multiple string input
    return list(input().split())

def printlist(l): # to print space seperated array
    for i in l:
        print(i,end=" ")

def main():
    a = cino()
    b = cino(True)
    l = len(b)
    print(len(b))
    if l<=a:
        print(b)
    else:
        print(b[:a]+"...")

if __name__=="__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

s = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


def solve(K: int, S: str):
    if len(S) < K:
        return S
    return S[:K] + '...'


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    print(solve(K, S))

def test():
    import doctest
    doctest.testmod()

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

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

Submission status: Wrong Answer

Solution code:
#N, M = map(int, input().split())
#A = list(map(int, input().split()))
K = int(input())
S = str(input())

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

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:
#n = int(input())
#a,b = map(int,input().split())
#a_L = list(map(int,input().split()))
k = int(input())
s = list(input())

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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





if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
def main():
    K = int(input())  # 文字列または整数(一変数)
    S = input()

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

    print(S)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
def Int():
    return int(input())
def Ints():
    return map(int,input().split())
def IntList():
    return list(Ints())
def IntMat(N):
    return [IntList() for i in range(N)]

import sys
sys.setrecursionlimit(4100000)
rl = sys.stdin.readline

K = Int()
S = input()

if len(S) <= K:
    print(S)
else:
    ans = ''
    c = 0
    for i in S:
        if c < K:
            ans += i
        else:
            ans += '.'
        c += 1
    print(ans)

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[:K] + "…")

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

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

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:
import sys
N = input()
s = N[-1]
if s in ['2','4','5','7','9']:
  print('hon')
  sys.exit(0)
if s in ['0','1','6','8']:
  print('pon')
  sys.exit(0)
if s == '3':
  print('bon')

Submission status: Wrong Answer

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

if len(S)<=K:
    print("".join(S))
    exit()
ans = S[0:7]+[".",".","."]
print("".join(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    if K > len(S):
        print(S)
        return

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


resolve()

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    input = sys.stdin.readline

    K = int(input())
    S = list(input().rsplit()[0])

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys


input = sys.stdin.readline


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


if __name__ == "__main__":
    K = int(input())
    S = input()
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os
import math
import bisect
import collections
import itertools
import heapq
import re
import queue

# import fractions

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    K = ii()
    S = iss()

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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