TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
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)

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)

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="")
    if len(s)-k > 0:
        print('...',end="")
    print()
    
print_len(k,s)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = str(input()).lower()

if 0 < K < 101 and 0 < len(S) < 101:
    if len(S) =< K:
        print(S)
    else:
        print(S[:K] + "...") 
else:
    print("Try again with K and length of S between 1 and 100 ")

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


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

K = int(input())
S = str(input()).lower()

if 0 < K < 101 and 0 < len(S) < 101:
    if len(S) <= K:
        print(S)
    else:
        print(S[:K] + "...") 
else:
    print("Try again with K and length of S between 1 and 100 ")

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()
if K <= len(S):
  print(S)
else:
  print(S[:K]+"...")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def main():
  k = str(input())
  s = str(input())
  h = len(k)
  w = len(s)
  
  if w<=h:
    print(s)
  else:
    print(s[:h] + '...')
    
main()

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = int()
s = input()
 
if len(k) <= k:
  print(s)
  
else:
  print(s[:k] + "...")

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
K= int(input())
S=input()

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

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

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

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

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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = [input() for i in range(2)]

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

print(k,s)

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

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

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

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
7
nikoandsolstice

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
k=int(input)
s=input()
if s.len()<=k: print(s)
else: print(s[:k]+"...")

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


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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = str(input())
s = int(len(S))
if s <= K:
    print(S)
else:
    print(S[0:K + 1] + '...')


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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
s = input()
l = max(len(s)-n, 0)
if(l == 0):
  print(s)
else:
  k = s(:n)
  print(k + "...")

n = int(input())
s = input()
l = max(len(s)-n, 0)
if(l == 0):
  print(s)
else:
  k = s[:n]
  print(k + "...")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
num = int(input())
word = str(input())

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

num = int(input())
word = str(input())

if len(word) <= num:
    print(word)
else:
    word_r = word[:num] + '...'
    print(word_r)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()

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


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

K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  l = S.split()
  l.pop(K:)
  print(''.join(l))

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


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

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

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

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

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


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

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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def main():
    num = int(K)
    if num >= len(S):
        print(S)
    else:
        print(S[:num]+'...')

K, S = input().split()

main()


def main():
    num = int(K)
    if num >= len(S):
        print(S)
    else:
        print(S[:num]+'...')

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

main()


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S, K = input().split()
K = int(K)
if len(S) > K:
    S_dash = S[0:K]
    S_dash += '...'
    print(S_dash)
else:
    print(S)

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = str(input().lower())
if len(S) <= K:
    print(S)
elif len(S) > K:
    stol = list(S)
    stol[K] = "..."
    print(stol)

K = int(input())
S = str(input().lower())
if len(S) <= K:
    print(S)
elif len(S) > K:
    stol = list(S)
    stol[K-1] = "..."
    print(stol)

K = int(input())
S = str(input().lower())
if len(S) <= K:
    print(S)
elif len(S) > K:
    stol = list(S)
    stol[K-1] = "..."
    Cutlist = stol[0:K]
    LtoS = ''.join(map(str, Cutlist))
    print(LtoS)

K = int(input())
S = str(input().lower())
if len(S) <= K:
    print(S)
elif len(S) > K:
    stol = list(S)
    stol[K] = "..."
    Cutlist = stol[0:K+1]
    LtoS = ''.join(map(str, Cutlist))
    print(LtoS)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()

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

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

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = str(input())
if k > len(s):
    print(s[:k]+'...')
else:
    print(s)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys

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

k = int(input())
s = input()
        
length = len(s)
if length > K:
    s = s[:K]+"..."
print(s)


k = int(input())
s = input()
        
length = len(s)
if length > K:
    S = S[:K]+"..."
print(S)


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


Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = input()
S = input()
s = len(S)
if (s <= K):
  print(S)


K = input()
S = input()
count = len(S)
list = 0
a = ""
for i in raige(K):
  a = a+S[list]
  list = list + 1

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

K = input()
S = input()
count = len(S)
list = 0
List = []
for i in range(K):
  a = S[list]
  a.attend(List)
  list = list + 1
if (count <= K):
  print(S)
else:
  print(List+"...")

K = input()
S = input()
count = len(S)
list = 0
for i in range(K):
  i = S[list]
  list = list + 1
if (count <= K):
  print(S)
else:
  print(i+"...")

K = input()
S = input()
list = 0
a = ""
for i in raige(K):
  a = a+S[list]
  list = list + 1
print(S if len(S)<=K else a+"...")

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

K = input()
S = input()
count = len(S)
if (count <= K):
  print(S)
else:
  print('{:.Kg}.format(S)'+"...")


K = input()
S = input()
list = 0
a = ""
for i in raige(K):
  a = "a+S[list]"
  list = list + 1

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


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


K = input()
S = input()
print(S)

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

K = input()
S = input()
count = len(S)
list = 0
a = ""
for i in raige(K):
  a = a+S[list]
  list = list + 1

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

K = input()
S = input()
count = len(S)
list = 0
List = []
for i in range(K):
  print(S[list])
  list = list + 1
if count <= K:
  print(S)
else:
  print( *i +"...")

K = input()
S = input()
count = len(S)
list = 0
List = []
for i in range(K):
  print(S[list])
  list = list + 1
if (count <= K):
  print(S)
else:
  print( *i +"...")


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

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

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

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

K = input()
S = input()
count = len(S)
list = 0
a = ""
for i in raige(K):
  a = "a+S[list]"
  list = list + 1

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()

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


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

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n=int(input())
chara=input()
nc=len(chara)

if n=>nc:
  print(chara)
else:	
  print(chara[1:n])
  
  

n=int(input())
chara=input()
nc=len(chara)

if n>=nc:
  print(chara)
else:	
  print(chara[0:n]+"...")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
K=int(input())
S=input()

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()

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

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


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

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

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


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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()

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

length = int(input())
input_str = input()

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

length = input()
input_str = input()

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

length = input()
input_str = input()

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

from sys import stdin

k = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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)]+"…")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()

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

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

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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')


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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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)


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)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k=int(input());s=input();print(s[:k]+"…" if len(s)>k else s)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
s = input
if (len(s) <= n):
  print(s)
else:
  for i in range (n):
    print(s[i], end = '')
  print()

n = int(input())
s = input()
x = len(s)
if (x <= n):
  print(s)
else:
  for i in range (n):
    print(s[i], end = '')
  print("...")


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()
print(s if len(s) <= k else s+"...")  


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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def x(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        x = S[:K]
        return x + '...'

print(x)

def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        answer = S[:K]
        return answer + '...'


def x(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'

print(x)

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

def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        answer = S[:K]
        return answer + '...'


def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'

print(result)

def x(K: int, S: str) -> str:
     if len(S) <= K:
         return S
     else:
         x = S[:K]
         return x + '...'

print(x)


def x(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        x = S[:K]
        return x + '...'

def x(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'


def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'


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


def result(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        answer = S[:K]
        return answer + '...'

print(result(K, S))


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()
if S(len) < K:
    print(S)
else:
    print(S[:K] + '...')

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
numTest = int(input())

inputLine = input()

print(inputLine[0 : numTest] + '...' if len(inputLine) > numTest else inputLine

numTest = int(input())

inputLine = input()

print(inputLine[0 : numTest] + '...' if len(inputLine) > numTest else inputLine)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
K=int(input())
S=input()
if K>=len(S):
	print(S)
else:
	mae=S[0:len(S)-1]
	ans=mae + "..."
	print(ans)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
str = input()
print(str) if len(str) <= n else print(str[:n + 1] + '...')

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = input()
s = input()

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

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

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input().split()
if len(S) > K:
  print("S")
else:
  print(S [:K])


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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input().lower()

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


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

if S.islower() and len(S) < K and len(S) < 1 and len(S) > 100:
    print(S)
elif S.islower() and len(S) > K and len(S) < 1 and len(S) > 100:
    print(f"{S[0:K]}{'...'}")


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

if S.islower() and len(S) < K and len(S) <= 1 and len(S) >= 100 and K <= 1 and K >= 100:
    print(S)
elif S.islower() and len(S) > K and len(S) < 1 and len(S) > 100 and K <= 1 and K >= 10:
    print(f"{S[0:K]}{'...'}")


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

if S.islower() and len(S) < K and len(S) <= 1 and len(S) >= 100:
    print(S)
elif S.islower() and len(S) > K and len(S) <= 1 and len(S) >= 100:
    print(f"{S[0:K]}{'...'}")


K = int(input())
S = input().lower()

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

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

if S.islower() and len(S) <= K:
    print(S)
elif S.islower() and len(S) >= K:
    print(f"{S[0:K]}{'...'}")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = int(input())
s = input()
if(len(s) > a):
    print(s +"...")
else:
    print(s)

a = int(input())
s = input()
if(len(s) > a):
    print(s[:a] +"...")
else:
    print(s)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x = input()
y = input()
z = len(y)
if z <= x:
  print(y)
else:
  print(y[:x]

x = input()
y = input()
z = len(y)
if z <= int(x):
  print(y)
else:
  print(y[:int(x)])

x = input()
y = input()
z = len(y)
if z <= x:
  print(y)
else:
  print(y[:x])

x = input()
y = input()
z = len(y)
if z <= int(x):
  print(y)
else:
  print(y[:x])

x = input()
y = input()
z = len(y)
if z <= int(x):
  print(y)
else:
  print(y[:int(x)]+'...')

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()
if k >= len(s):
    print(s)
else:
    length = len(s)-k
    print(s[:k]+'.'*length)


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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
word = input()
ans = ""
if len(word) < n:
  print(word)
else:
  ans += word[0:n+1] + "..."

print(ans)

n = int(input())
word = input()
ans = ""
if len(word) <= n:
	print(word)
else:
	for i in range(n):
    	ans += word[i]
	ans +=("...")
	print(ans)

n = int(input())
word = input()
ans = ""
if len(word) < n:
	print(word)
else:
	for i in range(n):
    	ans += word[i]
print(ans + "...")

n = int(input())
word = input()
ans = ""
if len(word) <= n:
  print(word)
else:
  for i in range(n):
    ans += word[i]
    ans +=("...")
  print(ans)

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

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

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n = int(input())
s = str(input())
if len(s) <= n:
  print(s)
else:
  print(s[:k+1]+"...")

n = int(input())
s = str(input())
if len(s) <= n:
  print(s)
else:
  print(s[:n+1]+"...")

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


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = int(input())
t = input()

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

s = int(input())
t = input()

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

s = int(input())
t = input()

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
K=int(input())
S=list(input())
if len(S)<=K:
  print(S)
else:
  print(S[:K]+"...")

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
k = input()
s = input()
k = int(k)
if len(s) <= k:
    print(s)
else:
    print(s[0:k])

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K=int(input())
S=input()
l=[]

if len(S)<=K:
    print(S)
else:
    for i in range(K):
        l.append(S[i])
    print("".join(l),'...')
    
  

K=int(input())
S=input()
l=[]

if len(S)<=K:
    print(S)
else:
    for i in range(K):
        l.append(S[i])
    print("".join(l)+'...')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k=int(input())
s=input()
l=len(s)
if l<=k:
  print(s)
else:
  print(s[:k-1]+"...")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()

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


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

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()
if len(S) <= K:
    print(S)
else:
    print(S[:K],"...")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

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

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



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

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()
if len(S)<=K:
    print(S)
else:
    print(S[0:K+1]+"...")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = str(input())
if len(s) <= k:
    print(s)
else:
    print(s[:7],'...')

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def inp():
    return(int(input()))


k = inp()

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


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


k = inp()

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
#168b

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


def answer(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[K:] + '...'


print(answer(K, S))

#168b

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


def answer(K: int, S: str) -> str:
    if len(S) <= K:
        return S
    else:
        return S[:K] + '...'


print(answer(K, S))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()



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

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


if(len(s) <= k):
	print(s)
else:
	cnt = 0
	a = ""
	for i in s:
		a += i
		cnt += 1
		if cnt == k:
			break
	print(a + "...")




Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):

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)+"...")


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

ss = list(s)

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



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()
s = len(S)

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


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

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


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

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


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

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

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

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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = int(input())
s = input()

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

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

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

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

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

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
K = int(input())
S = input()
print(len(S))
if len(S) <= K:
    print(S)
else:
    print(f"{S[:K]}...")

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
k = input()
s = input()

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

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

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

Verdicts: Runtime Error

Accepted