problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02676
u736443076
2,000
1,048,576
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.
['k = int(input())\ns = input()\nS = len(s)\nif S >= k or S == k:\n print(s[:k],"...")\nelse:\n print(s)', 'k = int(input())\ns = input()\nS = len(s)\nif S <= k:\n print(s)\nelse:\n print(s[:k],"...")', 'k = int(input())\ns = input()\nS = len(s)\nif S < k:\n print(s)\nelse:\n print(s[:k],"...")\n', 'k = int(input())\ns = str(input())\nS = len(s)\nif S <= k:\n print(s)\nelse:\n print(s[:k],"...")\n', 'k = int(input())\ns = input()\nS = len(s)\nif S > k :\n print(s[:k],"...")\nelse:\n print(s)', "k = int(input())\ns = input()\nif len(s) > k:\n print(s[:k]+'...')\nelse:\n print(s)\n"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s406103310', 's539830866', 's555143612', 's638745717', 's822851717', 's056661563']
[9168.0, 9164.0, 9152.0, 8996.0, 9084.0, 9104.0]
[24.0, 20.0, 22.0, 24.0, 23.0, 30.0]
[102, 92, 92, 98, 92, 86]
p02676
u737377822
2,000
1,048,576
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.
['k = int(input())\ns = str(input())\nprint(s[:k])', '\nk = int(input())\ns = str(input())\nif k < len(s):\n print(s[:k] + "...")\nelse:\n print(s[:k])']
['Wrong Answer', 'Accepted']
['s922003786', 's136137776']
[9164.0, 9172.0]
[23.0, 24.0]
[46, 97]
p02676
u739843002
2,000
1,048,576
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.
['K = int(input())\nstr = list(input())\n\nif len(str) <= K:\n print("".join(str))\nelse:\n print("".join(str[0:K]))', 'K = int(input())\nstr = list(input())\n \nif len(str) <= K:\n print("".join(str))\nelse:\n print("".join(str[0:K]) + "...")']
['Wrong Answer', 'Accepted']
['s800476025', 's537677687']
[9056.0, 9144.0]
[27.0, 28.0]
[110, 119]
p02676
u746627216
2,000
1,048,576
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.
['S = input()\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[0:K] + "...")', 'K = int(input())\nS = input()\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[0:K] + "...")']
['Runtime Error', 'Accepted']
['s634339789', 's864305398']
[9092.0, 9160.0]
[23.0, 23.0]
[73, 90]
p02676
u747427153
2,000
1,048,576
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.
['k=int(input())\ns=input()\nn=len(s)\nif k>=n:\n print(s)\nelse:\n ans =""\n for i in range(k):\n ans+=s[i]\n s+="..."\n print(s)\n', 'k=int(input())\ns=input()\nn=len(s)\nif k>=n:\n print(s)\nelse:\n ans =""\n for i in range(k):\n ans+=s[i]\n ans+="..."\n print(ans)\n']
['Wrong Answer', 'Accepted']
['s848356309', 's813679567']
[9108.0, 9080.0]
[22.0, 23.0]
[127, 131]
p02676
u749491107
2,000
1,048,576
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.
['k = int(input())\ns = input()\nlists = list(s)\nnews = list()\nif len(lists) <= k:\n print(s)\nelse:\n for i in range(k):\n news.append(lists[i])\nprint("".join(news))', 'k = int(input())\ns = input()\nlists = list(s)\nnews = list()\nif len(lists) <= k:\n print(s)\nelse:\n for i in range(k):\n news.append(lists[i])\n result = "".join(news)\n print(result + "...")']
['Wrong Answer', 'Accepted']
['s962190194', 's045320153']
[9076.0, 9164.0]
[30.0, 26.0]
[171, 203]
p02676
u750958070
2,000
1,048,576
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.
['K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[K-1:-1]', "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K+1]+'...')\n", "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K]+'...')\n"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s042457340', 's938615290', 's886503146']
[8968.0, 9156.0, 9152.0]
[22.0, 24.0, 23.0]
[83, 89, 87]
p02676
u751077930
2,000
1,048,576
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.
["k = int(input())\ns = input()\nif len(s) < k:\n print(s)\nelse:\n print(s[:k+1]+'...')", "k = int(input())\ns = input()\nif len(s) <= k:\n print(s)\nelse:\n print(s[:k]+'...')"]
['Wrong Answer', 'Accepted']
['s095449078', 's040526738']
[9164.0, 9164.0]
[25.0, 19.0]
[87, 86]
p02676
u752236842
2,000
1,048,576
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.
['# -*- coding: utf-8 -*-\n\n\nS=input()\nK=input()\n\n\nif(len(K)>=S):\n print(K[0:S]+"...")\n\nelse:\n print(K)\n', '# -*- coding: utf-8 -*-\n\n\nS=int(input())\nK=input()\n\n\nif(len(K)>S):\n print(K[0:S]+"...")\n\nelse:\n print(K)\n']
['Runtime Error', 'Accepted']
['s023309116', 's987589960']
[9084.0, 9156.0]
[23.0, 22.0]
[107, 111]
p02676
u756282142
2,000
1,048,576
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.
["import sys\nimport math\ninput = sys.stdin.readline\n\n############ ---- Input Functions ---- ############\ndef inp():\n return(int(input()))\ndef inlt():\n return(list(map(int,input().split())))\ndef insr():\n s = input()\n\ndef invr():\n return(map(int,input().split()))\n\ndef solve(s,k):\n len1 = len(s)\n if len1 > k:\n corte = ''\n for i in range(k):\n corte += s[i]\n corte += '...'\n return corte\n\telse :\n return s\ndef main():\n k = inp()\n print(solve(input(),k))\n\n\nmain()\n\n\n", 'K = int(input())\nS = input()\n\nif len(S) > K:\n\n for i in range(0,K):\n\n print(S[i], end="")\n\n print("...")\n\nelse:\n\n print(S)\n']
['Runtime Error', 'Accepted']
['s908909189', 's661755879']
[9056.0, 9164.0]
[23.0, 23.0]
[528, 139]
p02676
u756311765
2,000
1,048,576
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.
["K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K],'...')", 'K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K], "...")', "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n str = S[:K]+'...'\n print(str)"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s467540352', 's796621683', 's777818266']
[9164.0, 9164.0, 9164.0]
[21.0, 22.0, 22.0]
[86, 87, 100]
p02676
u757274384
2,000
1,048,576
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.
['k = int(input())\ns = input()\nif len(s) <= k:\n print(s)\nelse:\n s[0:k] + "..."', 'k = int(input())\ns = input()\nif len(s) <= k:\n print(s)\nelse:\n print(s[0:k] + "...")']
['Wrong Answer', 'Accepted']
['s486452102', 's043453841']
[9188.0, 9164.0]
[23.0, 22.0]
[78, 85]
p02676
u762755436
2,000
1,048,576
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.
["K = int(input())\nS = str(input())\nsen = ''\nif len(S)<=K:\n print(S)\nelse:\n # print(S[0:K-1])\n sen = S[0:K-1] + '...'\n print(sen)", "K = int(input())\nS = str(input())\nsen = ''\nif len(S)<=K:\n print(S)\nelse:\n # print(S[0:K-1])\n sen = S[0:K] + '...'\n print(sen)"]
['Wrong Answer', 'Accepted']
['s842740414', 's502919476']
[9164.0, 9192.0]
[22.0, 21.0]
[130, 128]
p02676
u763628696
2,000
1,048,576
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.
['k = int(inpout())\ns = input()\n\nif len(s) < k :\n print(s)\nelse:\n print(substr(s,0,k)+"...")', 'k = int(input())\ns = input()\n \nif len(s) < k :\n print(s)\nelse:\n print(substr(s,0,k)+"...")', 'k = int(input())\ns = input()\n \nif len(s) <= k :\n print(s)\nelse:\n print(s[0:k]+"...")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s330046207', 's993524196', 's667660265']
[9000.0, 9168.0, 9092.0]
[22.0, 25.0, 27.0]
[92, 92, 86]
p02676
u764401543
2,000
1,048,576
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.
["K = int(input())\nS = input()\n\nK = min(len(S), K)\nfor i in range(K):\n print(S[i], end='')\n\nprint('...' if K > len(S) else '')", "K = int(input())\nS = input()\n\nK = min(len(S), K)\nfor i in range(K):\n print(S[i], end='')\n\nprint('...' if K < len(S) else '')"]
['Wrong Answer', 'Accepted']
['s537336122', 's160389456']
[9048.0, 9168.0]
[23.0, 21.0]
[127, 127]
p02676
u764604930
2,000
1,048,576
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.
['length=eval(input(""))\nstring = input("")\n\nif(len(string)==length):\n print(string)\nif(len(string)>length):\n print(string[0:length],end="...")', 'number=int(input())\nword=input()\nlength=len(word)\nif length<=number:\n print(word)\nif length>number:\n word=word[0:number]\n print(word+"...")']
['Wrong Answer', 'Accepted']
['s379853438', 's501732984']
[9132.0, 9168.0]
[21.0, 21.0]
[147, 142]
p02676
u767664985
2,000
1,048,576
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.
['N = int(input())\ns = int(str(N)[-1])\n\nif s in (2, 4, 5, 7, 9):\n print("hon")\nelif s in (0, 1, 6, 8):\n print("pon")\nelse:\n print("bon")\n', 'K = int(input())\nS = input()\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K]+"...")\n']
['Wrong Answer', 'Accepted']
['s635005967', 's042556052']
[9176.0, 9152.0]
[24.0, 24.0]
[144, 88]
p02676
u773793847
2,000
1,048,576
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.
['K=int(input())\nS=input()\n\nif len(S)<=K:\n print(S)\nelse:\n print(S[K:]+"...")', 'K=int(input())\nS=input()\n \nif len(S)<=K:\n print(S)\nelse:\n print(S[:K]+"...")']
['Wrong Answer', 'Accepted']
['s444920971', 's210854042']
[9124.0, 9164.0]
[23.0, 23.0]
[77, 78]
p02676
u775673382
2,000
1,048,576
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.
['k = int(input())\ns = input()\nprint((s[:k], s)[k >= len(s)])', "k = int(input())\ns = input()\nprint(('{}...'.format(s[:k]), s)[k >= len(s)])"]
['Wrong Answer', 'Accepted']
['s935837996', 's404777295']
[9108.0, 9168.0]
[23.0, 23.0]
[59, 75]
p02676
u779599374
2,000
1,048,576
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.
['K, S = input().split()\nK = int(k)\n\nif len(s) <= k:\n print(s)\nelse:\n print(s[0:k] + "...")', 'K, S = map(str, input().split())\nK = int(K)\n\nif len(S) <= K:\n print(S)\nelse:\n S = S[0:K]+"..."\n print(S)', "K, S = input().split()\nK = int(k)\n\nif len(s) <= k:\n print(s)\nelse:\n print(s[0:k] + '...')", 'K, S = map(str, input().split())\nK = int(K)\n\nif len(S) <= K:\n print(S)\nelse:\n S = (S[0:K]+"..."\n print(S)', 'k, s = input().split()\nk = int(k)\n\nif len(s) <= k:\n print(s)\nelse:\n print(s[0:k] + "...")', 'k, s = input().split()\nk = int(k)\n\nif len(s) <= k:\n print(s)\nelse:\n print(s[1:k] + "...")', 'K, S = map(str, input().split())\nK = int(K)\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[0:K]+"...")', 'k, s = input().split()\nk = int(k)\n\nif len(s) <= k:\n print(s)\nelse:\n print(s[0:k] + "...")\n', "K, S = input().split()\nK = int(K)\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[0:K] + '...')", 'K, S = map(str, input().split())\nK = int(K)\n\nprint(len(S))\nprint(K)\n\nprint(len(S) >= K)\nif len(S) <= K:\n print(S)\nelse:\n print(S[0:K]+"...")', 'K = int(input())\nS = input()\n\nif len(S) <= K:\n print(S)\nelse:\n S = S[0:K]+"..."\n print(S)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s054579472', 's083965367', 's143664468', 's335098660', 's445814680', 's591444819', 's635547195', 's761448769', 's952436636', 's990924516', 's279067010']
[9040.0, 8984.0, 9100.0, 8960.0, 8864.0, 9104.0, 8952.0, 9096.0, 9040.0, 9056.0, 9176.0]
[24.0, 24.0, 24.0, 24.0, 22.0, 24.0, 23.0, 21.0, 21.0, 23.0, 22.0]
[95, 113, 95, 114, 95, 95, 103, 96, 95, 146, 98]
p02676
u781267013
2,000
1,048,576
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.
["K = int(input())\nS = int(input())\nif K > len(S):\n print(S)\nelse:\n print(S[0:K] + '...')", "K = int(input())\nS = input()\nif K >= len(S):\n print(S)\nelse:\n print(S[0:K] + '...')"]
['Runtime Error', 'Accepted']
['s796926344', 's349365421']
[9156.0, 9164.0]
[35.0, 31.0]
[93, 89]
p02676
u782747058
2,000
1,048,576
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.
['keta = int(input())\nword = str(input())\n\nif len(word) <= keta:\n print(word)\nelse:\n print(word[:keta-1] + "...")', 'keta = int(input())\nword = str(input())\n \nif len(word) <= keta:\n print(word)\nelse:\n print(word[:keta] + "...")']
['Wrong Answer', 'Accepted']
['s421775786', 's716403762']
[9156.0, 9016.0]
[22.0, 23.0]
[113, 112]
p02676
u783004748
2,000
1,048,576
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.
['K = int(input())\nS = input()\n\nprint(S[:K])', "K = int(input())\nS = input()\n\nif len(S)<=K:\n print(S[:K])\nelse:\n print(S[:K] + '...')"]
['Wrong Answer', 'Accepted']
['s922343143', 's074537657']
[9164.0, 9120.0]
[22.0, 21.0]
[42, 87]
p02676
u783130961
2,000
1,048,576
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.
["n=int(input())\ns=input()\nif len(s)<=n:\n print(s)\nelse:\n print(s[:n,'...',sep=''])", "n=int(input())\ns=input()\nif len(s)<=n:\n print(s)\nelse:\n print(s[:n],'...',sep='')"]
['Runtime Error', 'Accepted']
['s742888846', 's743918415']
[8968.0, 9128.0]
[24.0, 22.0]
[83, 83]
p02676
u783206113
2,000
1,048,576
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.
['s = int(input())\nt = input() \n\nif len(t) <= s:\n print(t)\nelse:\n print(t[:s],"...")', 's = int(input())\nt = input() \n\nif len(t) <= s:\n print(t)\nelse:\n ans = t[:s] + "..."\n print(ans)\n ']
['Wrong Answer', 'Accepted']
['s173210311', 's222408940']
[9132.0, 9192.0]
[23.0, 25.0]
[84, 101]
p02676
u785354231
2,000
1,048,576
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.
["nb = int(input())\nsentence = input()\n\nif len(sentence) > nb:\n\tprint(sentence[0:nb-1] + '...')\nelse:\n\tprint(sentence)", "nb = int(input())\nsentence = input()\n\nif len(sentence) > nb:\n\tprint(sentence[0:nb] + '...')\nelse:\n\tprint(sentence)"]
['Wrong Answer', 'Accepted']
['s636372750', 's260111186']
[9016.0, 9144.0]
[30.0, 27.0]
[116, 114]
p02676
u788452182
2,000
1,048,576
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.
['\nn=int(input())\nst=input()\nif n>=len(st):\n print(st)\nelse:\n print(st[0:n-1])', '\nn=int(input())\nst=input()\nif n>=len(st):\n print(st)\nelse:\n print(st[0:n-1]+"...")', 'n=int(input())\nst=input()\nif n>=len(st):\n print(st)\nelse:\n print(st[0:n]+"...")\n ']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s520368084', 's962606047', 's734836789']
[9144.0, 9096.0, 9180.0]
[20.0, 23.0, 24.0]
[82, 88, 90]
p02676
u788608806
2,000
1,048,576
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.
["K = int(input()) \nS = input()\n\nif len(S) > K:\n S = S[:K] + '...'\n\nprint(a)", "K = int(input()) \nS = input()\n\nif len(S) > K:\n S = S[:K] + '...'\n\nprint(S)"]
['Runtime Error', 'Accepted']
['s074786322', 's147127062']
[9088.0, 9160.0]
[20.0, 21.0]
[78, 78]
p02676
u789854092
2,000
1,048,576
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.
["k = int(input())\ns = input()\nlen_s = len(s)\n \nif len_s <= k:\n print(s)\nelse:\n print(''.join([str(x) for x in [s[:k], '...']])", "k = input()\ns = int(input())\nlen_s = len(s)\n \nif len_s <= k:\n print(s)\nelse:\n print(''.join([str(x) for x in [s[:k], '...']])", "k = input()\ns = int(input())\nlen_s = len(s)\n\nif len_s <= k:\n print(s)\nelse:\n print(''.join([str(x) for x in [s[:k+1], '...']])\n ", "k = int(input())\ns = str(input())\nlen_s = len(s)\n \nif len_s <= k:\n print(s)\nelse:\n print(''.join([str(x) for x in [s[:k+1], '...']])", "k = int(input())\ns = input()\nlen_s = len(s)\n \nif len_s <= k:\n print(s)\nelse:\n print(''.join([str(x) for x in [s[:k+1], '...']])", "k = int(input())\ns = str(input())\nlen_s = len(s)\n \nif len_s <= k:\n print(s)\nelse:\n print(s[:k] + '...')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s377490522', 's399102165', 's442162725', 's797638859', 's881622301', 's557802159']
[9040.0, 9032.0, 9036.0, 8980.0, 8976.0, 9168.0]
[19.0, 24.0, 27.0, 23.0, 25.0, 24.0]
[127, 127, 131, 134, 129, 105]
p02676
u792578588
2,000
1,048,576
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.
['k = input()\ns = input()\nprint(s)\nif(len(s) <= int(k)):\n print(s)\nelse:\n print(s[:int(k)])', 'k = input()\ns = input()\nif(len(s) <= int(k)):\n print(s)\nelse:\n print(s[:int(k)])', "k = input()\ns = input()\nprint(s)\nif(len(s) <= int(k)):\n print(s)\nelse:\n print(s[:int(k)]+'...')", 'k = input()\ns = input()\nif(len(s)<=k):\n print(s)\nelse:\n print(s[:k])', "k = input()\ns = input()\nif(len(s) <= int(k)):\n print(s)\nelse:\n print(s[:int(k)]+'...')"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s009707032', 's399605807', 's622263938', 's660406062', 's653020626']
[9168.0, 9108.0, 9196.0, 9036.0, 9084.0]
[23.0, 24.0, 23.0, 25.0, 23.0]
[91, 82, 97, 70, 88]
p02676
u792671636
2,000
1,048,576
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.
['#!/usr/bin/env python3\nimport sys\n\n\ndef solve(K: int, S: str):\n if (len(S) <= K):\n print(S)\n else:\n print(K[0:K+1], "...", sep=\'\')\n return\n\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n K = int(next(tokens)) # type: int\n S = next(tokens) # type: str\n solve(K, S)\n\nif __name__ == \'__main__\':\n main()\n', '#!/usr/bin/env python3\n\nimport sys\n\ndef solve(K: int, S: str):\n if (len(S) <= K):\n print(S)\n else:\n print(S[0:K], "...", sep=\'\')\n return\n\n\n# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools (tips: You use the default template now. You can remove this line by using your custom template)\ndef main():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n K = int(next(tokens)) # type: int\n S = next(tokens) # type: str\n solve(K, S)\n\nif __name__ == \'__main__\':\n main()\n']
['Runtime Error', 'Accepted']
['s230543114', 's492273445']
[9132.0, 9184.0]
[24.0, 22.0]
[624, 622]
p02676
u793825184
2,000
1,048,576
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.
['k = int(input())\n s = str(input())\n if len(s) <= k:\n print(s)\n else:\n print(s[:k])', "k = int(input())\n s = input()\n if len(s) <= k:\n print(s)\n else:\n print(s[:k]+'...')", ' k = int(input())\n s = str(input())\n if len(s) <= k:\n print(str(s))\n else:\n print(s[:k])', "k = int(input())\n s = str(input())\n if len(s) <= k:\n print(s)\n else:\n print(s[:k]+'...')", 'k = int(input())\ns = input()\nif k >= len(s):\n print(s)\nelse:\n print(s[:k]+"...")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s117934522', 's147825399', 's832798845', 's861443401', 's367575891']
[8948.0, 9004.0, 8880.0, 8848.0, 9112.0]
[21.0, 22.0, 22.0, 21.0, 23.0]
[105, 106, 111, 111, 82]
p02676
u799300648
2,000
1,048,576
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.
['K = int(input())\nS = str(input())\n\nif len(S)>K:\n print(S[0:K], "...")\nelse:\n print(S)', 'K = int(input())\nS = str(input())\n\nif len(S)>K:\n print(S[0:K] + "...")\nelse:\n print(S)']
['Wrong Answer', 'Accepted']
['s041522165', 's992587993']
[9160.0, 9164.0]
[23.0, 22.0]
[87, 88]
p02676
u799428010
2,000
1,048,576
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.
["T=int(input())\nS=str(input())\ns=len(S)\nif s<T:\n print(S)\nelse:\n print(S+'...')", "T=int(input())\nS=str(input())\ns=len(S)\nif s<=T:\n print(S)\nelse:\n print(S[:T]+'...')"]
['Wrong Answer', 'Accepted']
['s289454788', 's146957252']
[9136.0, 9064.0]
[30.0, 28.0]
[84, 89]
p02676
u801676229
2,000
1,048,576
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.
["K = int(input())\nS = input()\nSS = (int(len(S)))\nif SS-K < 0:\n print(S)\nelse:\n print((S[:SS-K])+('.'*K))", "K = int(input())\nS = input()\nSS = (int(len(S)))\nif SS-K <= 0:\n print(S)\nelse:\n print((S[:K-SS])+('.'*(SS-K)))", "K = int(input())\nS = input()\nSS = (int(len(S)))\nif SS-K <= 0:\n print(S)\nelif K == 0:\n print(S)\nelse:\n print((S[:K-SS])+('.'*(SS-K)))", "K = int(input())\nS = input()\nSS = (int(len(S)))\nif S <= 0:\n print(s)\nelse:\nprint(S[:SS-K])+print('.',K)", "K = int(input())\nS = input()\nSS = (int(len(S)))\nif SS-K <= 0:\n print(S)\nelse:\n print((S[:SS-K])+('.'*K))", "K = int(input())\nS = input()\nSS = (int(len(S)))\nif SS-K <= 0:\n print(S)\nelse:\n print((S[:K-SS])+('.'*3))"]
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s097934260', 's264770644', 's378199267', 's759755961', 's925649800', 's200876583']
[9112.0, 9172.0, 9124.0, 8968.0, 9168.0, 9172.0]
[23.0, 24.0, 22.0, 21.0, 22.0, 21.0]
[105, 111, 135, 104, 106, 106]
p02676
u802796197
2,000
1,048,576
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.
['class Strs:\n def __init__(self, k, s):\n self.k = k\n self.s = s\n\n def triple_dods(self):\n if self.k >= len(self.s):\n print(self.s)\n elif self.k <= len(self.s):\n print(self.s[0: self.k] + "...")\n\nk = int(input())\ns = input()\nstrs = Strs(k, s)\nprint(strs)\n\nstrs.triple_dods()', 'k = int(input())\ns = input()\n\nif k >= len(s):\n print(s)\nelif k <= len(s):\n print(s[0: k] + "...")']
['Wrong Answer', 'Accepted']
['s439332910', 's821519572']
[8824.0, 9104.0]
[29.0, 25.0]
[328, 103]
p02676
u804048521
2,000
1,048,576
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.
["K = input()\nS = int(input())\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K] + '...')\n\n", "K = int(input())\nS = input()\n \nif len(S) <= K:\n print(S)\nelse:\n print(S[:K] + '...')"]
['Runtime Error', 'Accepted']
['s946998730', 's489929903']
[9164.0, 9164.0]
[24.0, 23.0]
[87, 86]
p02676
u805852597
2,000
1,048,576
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.
['from math import cos, sqrt, pi\na, b, h, m = map(int, input().split())\n\nang_a = pi * h / 6 + pi * m / 360\n\nang_b = pi * m / 30\n\nang = abs(ang_a-ang_b)\n\nc = sqrt(a**2 + b**2 - 2*a*b*cos(ang))\nprint(c)', "k = int(input())\ns = str(input())\nif k < len(s):\n ans = s[0:k+1]+'...'\n print(ans)\nelse:\n print(s)", "k = int(input())\ns = str(input())\nif k < len(s):\n ans = s[0:k]+'...'\n print(ans)\nelse:\n print(s)"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s859140973', 's935491012', 's528377932']
[9188.0, 9168.0, 9180.0]
[25.0, 23.0, 20.0]
[253, 107, 105]
p02676
u806779442
2,000
1,048,576
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.
["k = int(input())\ns = input()\nlength = len(s)\nif k < length:\n s = s[:k]\n for i in range(k, length):\n s += '.'\n\nprint(s)", "k = int(input())\ns = input()\nlength = len(s)\nif k < length:\n s = s[:k]\n s += '...'\n\nprint(s)"]
['Wrong Answer', 'Accepted']
['s263538905', 's846771076']
[9152.0, 9156.0]
[22.0, 22.0]
[131, 98]
p02676
u809963697
2,000
1,048,576
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.
["K = input()\nS = input()\nif len(K) >= len(S):\n print(S)\nelse:\n strings = S[:K + 1] + '...'\n print(strings)", "K = input()\nS = input()\nstrings = ''\nif len(K) >= len(S):\n print(S)\nelse:\n strings = str(S[:K]) + '...'\n print(strings)\n", "K = input()\nS = input()\nstrings = ''\nif len(K) >= len(S):\n print(S)\nelse:\n strings = str(S[:K + 1]) + '...'\n print(strings)\n", "N = str(input())\nidentify = N[-1]\nanswer = 'hon'\npon_list = ['0','1', '6', '8']\nbon_list = ['3']\nif identify in pon_list:\n answer = 'pon'\nelif identify in bon_list:\n answer = 'bon'\nprint(answer)", "K = input()\nS = input()\nif len(K) >= len(S):\n print(S)\nelse:\n strings = str(S[:K]) + '...'\n print(strings)", 'K = input()\nS = input()\nif len(K) > len(S):\n print(S)\nelse:\n strings = S[:K + 1]\n print(strings)', "K = int(input())\nS = input()\nstrings = ''\nif K >= len(S):\n print(S)\nelse:\n strings = str(S[:K]) + '...'\n print(strings)\n"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s103832962', 's594263045', 's600069761', 's719582233', 's736180556', 's855624825', 's842102949']
[9036.0, 9060.0, 9028.0, 9112.0, 9068.0, 9092.0, 9156.0]
[24.0, 24.0, 24.0, 24.0, 25.0, 25.0, 22.0]
[108, 123, 127, 196, 109, 99, 123]
p02676
u809986472
2,000
1,048,576
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.
["K=int(input())\nS=input()\nA=len(S)\nif A=K:\n print(S)\nif A>K:\n print(S[0:K:1]+'...')\n \n \n", "K=int(input())\nS=input()\nA=len(S)\nif A<=K:\n print(S)\nif A>K:\n print(S[0:K:1]+'...')\n \n \n"]
['Runtime Error', 'Accepted']
['s664158684', 's390218211']
[8932.0, 9164.0]
[22.0, 23.0]
[91, 92]
p02676
u810066979
2,000
1,048,576
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.
['k = int(input())\ns = input()\n\nprint(s if(k>=len(s)) else s[:k],"...")', 'k = int(input())\ns = input()\n\nif(len(s) <= k):\n\tprint(s)\nelse:\n\tprint(s[:k]+"...")']
['Wrong Answer', 'Accepted']
['s932624375', 's873790141']
[9108.0, 9076.0]
[28.0, 29.0]
[69, 82]
p02676
u811416874
2,000
1,048,576
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.
["K = int(input())\nS = input()\n\nif len(S) =< len(K):\n print(S)\n \nelse:\n print((str[1:S])+'...')", "K = int(input())\nS = input()\n \nif len(S) =< len(K):\n print(S)\n \nelse:\n print(S[1:len(S)]+'...')", "K = int(input())\nS = input()\n \nif len(S) <= K:\n print(S)\n \nelse:\n print(S[0:K]+'...')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s260613454', 's413904824', 's985789712']
[8948.0, 9020.0, 9072.0]
[23.0, 26.0, 23.0]
[102, 104, 94]
p02676
u813125722
2,000
1,048,576
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.
['K = int(input())\nS = input()\na = ""\nif len(S)<=K:\n print(S)\nelse:\n for i in range(K):\n a+=S[i]\n print(a,"...")', 'K = int(input())\nS = input()\na = ""\nif len(S)<=K:\n print(S)\n exit()\nelse:\n for i in range(K):\n a+=S[i]\nprint(a,"...")', 'K = int(input())\nS = input()\na = ""\nif len(S)<=K:\n print(S)\n exit()\nelse:\n for i in range(K):\n a+=S[i]\nprint(a,"...")\n', 'K = int(input())\nS = input()\na = ""\nif len(S)<=K:\n exit(S)\nelse:\n for i in range(K):\n a+=S[i]\nprint(a,"...")', 'K = int(input())\nS = input()\nif len(S)<=K:\n print(S)\nelse:\n print(S[:K]+"...")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s018383444', 's283760197', 's441938715', 's855390853', 's644459998']
[9172.0, 9172.0, 9160.0, 9108.0, 9192.0]
[21.0, 22.0, 22.0, 25.0, 22.0]
[126, 133, 134, 121, 84]
p02676
u813405587
2,000
1,048,576
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.
["n = int(input())\ns = input()\na = len(s)\nif s <= n:\n print(s)\nelse:\n print(s[0:n-1] + '...')\n", "n = int(input())\ns = input()\na = len(s)\nif a <= n:\n print(s)\nelse:\n print(s[0:n-1] + '...')\n", "n = int(input())\ns = input()\na = len(s)\nif a >= n:\n print(s)\nelse:\n print(s[0:n-1] + '...')\n", "n = int(input())\ns = input()\na = len(s)\nif a <= n:\n print(s)\nelse:\n print(s[0:n] + '...')\n"]
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s764479880', 's922326822', 's924886902', 's301519634']
[9104.0, 9080.0, 9156.0, 9160.0]
[21.0, 24.0, 19.0, 22.0]
[94, 94, 94, 92]
p02676
u816631826
2,000
1,048,576
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.
['#input an interget\nK=int(input())\n#input an string\nS=str(input())\n#get the length of the string\nx=int(len(str1))\n#get the difference in length between k and s\ni=x-k\n\n#make a second string for the appending\nS2="..."\n\n#if statement about how the string will function\n#if the string is the same length as k then print it\nif i==0:\n print(S)\n#if not, delete the last character of the string\nelse:\n while i>0:\n S=S[i]\n i+=1\n#and then join the two strings together\n newstr="".join((S,S2))\n print(newstr)\n', '#K is an input for the range of S\n#input from user to get lowercase the letters\nK = int(input())\nS = input()\nif len(S) > K:\n print(S[:K] + ".....")\nelse:\n print(S)', '\nwhile True:\n k = input()\n if 1 <= int(k) <= 100:\n break;\n print (\'Error Invalid Input for K\')\n\n\nwhile True:\n s = input().lower()\n if 1 <= len(s) <= 100:\n break;\n print (\'Error Invalid Input for s\')\n\n\nif len(s) > k:\n print(s[:k] + "...")\nelse:\n print(s)', 'def tripleDots(n, string):\n\tstring_len = len(string)\n\tif string_len > n : \n\t\tstring = string[ 0 : n ] + "..."\n\treturn string\n\narr = ["", ""]\n\nfor i in range(2):\n\tarr[i] = input()\n\n\ntripleDots(int(arr[0]), arr[1])', 'k=int(input())\ns=input()\ncharacters=len(s)\nempty=""\nif characters<=k:\n print(s)\nelse:\n i=0\n while i<=k-1:\n empty+=s[i]\n i=i+1\n print(f"{empty}...")']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s188877145', 's642710765', 's660147528', 's706772669', 's632657470']
[9132.0, 9160.0, 9076.0, 9004.0, 9200.0]
[20.0, 26.0, 23.0, 28.0, 28.0]
[523, 169, 299, 212, 168]
p02676
u819911285
2,000
1,048,576
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.
['k = input()\ns = input()\ni = 0\n\nwhile i < 7:\n\tprint(s[i])\n i = i + 1', 'k = input()\ns = input()\ni = 0\nlist = []\nl = int(k)\n\nwhile i < l:\n list.append(s[i])\n i = i + 1\n\nprint(list)', 'k = input()\ns = input()\ni = 0\nl = int(k)\np = None\n\nwhile i < l:\n p = p + s[i]\n i = i + 1\n\nprint(p)', 'k = input()\ns = input()\ni = 0\n\nwhile i < int(k):\n\tprint(s[i])\n i = i + 1', 'k = input()\ns = input()\ni = 0\nl = int(k)\n\nwhile i < l:\n p = p + s[i]\n i = i + 1\n\nprint(p)', 'k = input()\ns = input()\ni = 0\nl = int(k)\n\nwhile i < l:\n\tprint(s[i])\n i = i + 1', 'k = input()\ns = input()\ni = 0\nl = int(k)\np = str()\n\nwhile i < l:\n p = p + s[i]\n i = i + 1\n\nprint(p)', "k = input()\ns = input()\ni = 0\nl = int(k)\np = str()\n \nwhile i < l and len(s) > l:\n p = p + s[i]\n i = i + 1\nwhile i < len(s) and len(s) <=l:\n p = p + s[i]\n i = i + 1\nif len(s) > l:\n\tprint(p + '...')\nelse:\n\tprint(p)"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s012737304', 's327600043', 's399623040', 's414040265', 's527370567', 's620657976', 's823423106', 's819051179']
[8968.0, 9168.0, 9164.0, 9036.0, 9064.0, 8972.0, 9152.0, 9184.0]
[23.0, 20.0, 23.0, 22.0, 25.0, 20.0, 24.0, 22.0]
[70, 113, 104, 75, 95, 81, 105, 224]
p02676
u822871631
2,000
1,048,576
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.
['K = int(input())\nS = input()\n\nif K>=len(S):\n print(S)\nelse:\n print(S[:K+1]+"...")\n', 'K = int(input())\nS = input()\n\nif K>=len(S):\n print(S)\nelse:\n print(S[:K]+"...")\n']
['Wrong Answer', 'Accepted']
['s713488536', 's923503159']
[9044.0, 9088.0]
[22.0, 24.0]
[88, 86]
p02676
u824537226
2,000
1,048,576
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.
["K = int(input())\nS = str(input())\n\nprint(len(S))\n\nif len(S) <= K :\n print(S)\nelse :\n a = S[:K] + '...'\n print(a)\n", "K = int(input())\nS = str(input())\n\n\nif len(S) <= K :\n print(S)\nelse :\n a = S[:K] + '...'\n print(a)\n"]
['Wrong Answer', 'Accepted']
['s217074392', 's911130439']
[9164.0, 9160.0]
[23.0, 20.0]
[122, 108]
p02676
u829416877
2,000
1,048,576
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.
["K = int(input())\nS = input()\nif len(S) =< int(K):\n print(S)\nelse:\n print(S[0:K]+'...')\n", "K = int(input())\nS = input()\nif len(S) =< K:\n print(S)\nelse:\n print(S[:K+1] + '...')", "K = int(input())\nS = input()\nif len(S) =< K:\n print(S)\nelse:\n print(S[:K+1]+'...')\n", 'K = int(input())\nS = input()\n\nif len(S) =< int(K):\n print(S)\nelse:\n print(S[1:K+1])\n', "K = int(input())\nS = input()\nif len(S) =< int(K):\n print(S)\nelse:\n print(S[:int(K)+1]+'...')\n", "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K+1] + '...')", "K = int(input())\nS = input()\nif len(S) =< int(K):\n print(S)\nelse:\n print(S[:int(K)]+'...')\n", "K = int(input())\nS = input()\n\nif len(S) =< K:\n print(S)\nelse:\n print(S[1:K+1]+'...')\n", "K = int(input())\nS = input()\nif len(S) =< K:\n print(S)\nelse:\n print(S[:K+1]+'...')\n", 'K = int(input())\nS = input()\n\nif len(S) =< K:\n print(S)\nelse:\n print(S[1:K+1])', "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K] + '...')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s211412290', 's296919844', 's525790222', 's620412826', 's652265186', 's685533134', 's716849523', 's728955339', 's962780394', 's982974484', 's482763878']
[9016.0, 8948.0, 8952.0, 9016.0, 8784.0, 9164.0, 8948.0, 9012.0, 9012.0, 9012.0, 9164.0]
[22.0, 22.0, 24.0, 25.0, 22.0, 23.0, 23.0, 26.0, 23.0, 22.0, 23.0]
[87, 84, 83, 84, 93, 84, 91, 85, 83, 78, 82]
p02676
u829565258
2,000
1,048,576
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.
["K = int(input())\nS = list(input())\n\nif (len(S) <= K):\n\tprint(''.join(S))\nelse:\n\tstring = S[0:K+1]\n\tprint(''.join(string) + '...')", "K = int(input())\nS = list(input())\n\nif (len(S) <= K):\n\tprint(''.join(S))\nelse:\n\tstring = S[0:K]\n\tprint(''.join(string) + '...')"]
['Wrong Answer', 'Accepted']
['s116255148', 's565318472']
[9164.0, 9168.0]
[23.0, 24.0]
[129, 127]
p02676
u833382483
2,000
1,048,576
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.
['def cal():\n\n num = int(input())\n if num >= 10:\n ben = num % 10\n else:\n ben = num\n \n if ben == 3:\n print("bon")\n elif ben == 0 or ben == 1 or ben == 6 or ben == 8:\n print("pon")\n elif ben == 2 or ben == 4 or ben == 5 or ben == 7 or ben == 9:\n print("hon")\n \n\n\ncal()', 'def cal():\n k = int(input())\n string = input()\n if len(string) <= k:\n print(string)\n else:\n list1 = list(string)\n for i in range(k):\n print(list1[i], end=\'\')\n print("...")\n\ncal()']
['Wrong Answer', 'Accepted']
['s733175648', 's161188922']
[9180.0, 9172.0]
[22.0, 21.0]
[323, 229]
p02676
u834322852
2,000
1,048,576
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.
["S=input()\nK=input()\nif l>=int(S):\n print(K[:1]+'...')\nelse:\n print(K)", "S=int(input())\nK=input()\nk=len(K)\n\nif k>S:\n print(K[:S]+'...')\nelse:\n print(K)"]
['Runtime Error', 'Accepted']
['s333256387', 's412185668']
[9104.0, 9092.0]
[24.0, 23.0]
[75, 84]
p02676
u837501838
2,000
1,048,576
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.
["K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n S = S[0:K+1]\n print(S+'...')", "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n S = S[0:K]\n print(S+'...')"]
['Wrong Answer', 'Accepted']
['s494457886', 's330686489']
[9080.0, 8944.0]
[27.0, 33.0]
[93, 91]
p02676
u840964147
2,000
1,048,576
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.
['import numpy,math\n\nn = int(input())\ns = str(input())\n\nif(len(s) <= n):\n print(s)\nelse:\n print(s[:n+1 + "..."])', 'import numpy,math\n\nn = int(input())\ns = str(input())\n\nif(len(s) <= n):\n print(s)\nelse:\n print(s[:n] + "...")']
['Runtime Error', 'Accepted']
['s273805318', 's270007914']
[27112.0, 27120.0]
[115.0, 107.0]
[116, 114]
p02676
u844196583
2,000
1,048,576
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.
['S = input()\nK = int(input())\n\nif len(S) > K:\n print(S[0:K] + "...")\nelse:\n print(S)', "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[0:K] + '...')"]
['Runtime Error', 'Accepted']
['s198493065', 's011574266']
[9072.0, 9092.0]
[23.0, 27.0]
[89, 89]
p02676
u845650912
2,000
1,048,576
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.
["S = input()\nK = int(input())\n\nif len(S) <= K:\n print(S)\nelse:\n s = S[0:K]\n s1 = s + '...'\n print(s1)", "K = int(input())\nS = input()\n\n\nif len(S) <= K:\n print(S)\nelse:\n s = S[0:K]\n s1 = s + '...'\n print(s1)"]
['Runtime Error', 'Accepted']
['s018857138', 's546112985']
[9164.0, 9168.0]
[23.0, 23.0]
[112, 113]
p02676
u847402720
2,000
1,048,576
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.
['k = int(input())\ns = input()\nl = len(s)\nif l < k + 1:\n print(s)\nelse:\n print(s[:k],"...")', 'k = int(input())\ns = input()\nl = len(s)\nif l < k + 1:\n print(s)\nelse:\n print(s[:k]+"...")']
['Wrong Answer', 'Accepted']
['s567659491', 's475664417']
[9164.0, 9156.0]
[21.0, 23.0]
[95, 95]
p02676
u848680818
2,000
1,048,576
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.
["k = int(input())\ns = input()\n\nif len(s)<=k:\n print(s)\nelse:\nprint(s[:k]+'...')\n", "k = int(input())\ns = input()\nif len(s)<=k:\n print(s)\nelse:\n print(s[:k]+'...')"]
['Runtime Error', 'Accepted']
['s637929935', 's234265746']
[8972.0, 9168.0]
[22.0, 22.0]
[81, 80]
p02676
u854685063
2,000
1,048,576
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.
['import sys\nimport math\ndef I():return int(sys.stdin.readline().replace("\\n",""))\ndef I2():return map(int,sys.stdin.readline().replace("\\n","").split())\ndef S():return str(sys.stdin.readline().replace("\\n",""))\ndef L():return list(sys.stdin.readline().replace("\\n",""))\ndef intl():return [int(k) for k in sys.stdin.readline().replace("\\n","").split()]\ndef Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\\n","").split()))\nif __name__ == "__main__":\n k = I()\n s = S()\n print(s if len(s) <= k else print(s + "...")) ', 'import sys\nimport math\ndef I():return int(sys.stdin.readline().replace("\\n",""))\ndef I2():return map(int,sys.stdin.readline().replace("\\n","").split())\ndef S():return str(sys.stdin.readline().replace("\\n",""))\ndef L():return list(sys.stdin.readline().replace("\\n",""))\ndef intl():return [int(k) for k in sys.stdin.readline().replace("\\n","").split()]\ndef Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\\n","").split()))\nif __name__ == "__main__":\n k = I()\n s = S()\n print(s if len(s) <= k else print(s[:k] + "...")) ', 'import sys\nimport math\ndef I():return int(sys.stdin.readline().replace("\\n",""))\ndef I2():return map(int,sys.stdin.readline().replace("\\n","").split())\ndef S():return str(sys.stdin.readline().replace("\\n",""))\ndef L():return list(sys.stdin.readline().replace("\\n",""))\ndef intl():return [int(k) for k in sys.stdin.readline().replace("\\n","").split()]\ndef Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\\n","").split()))\nif __name__ == "__main__":\n k = I()\n s = S()\n str = s[:k] + "..."\n print(s if len(s) <= k else str)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s080754966', 's410402483', 's005371444']
[9220.0, 9152.0, 9220.0]
[23.0, 21.0, 22.0]
[545, 549, 556]
p02676
u860966226
2,000
1,048,576
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.
['i = int(input())\ns = input()\nprint(s[0:k-1] if len(s) > k else s)\n', 'k = int(input())\ns = input()\nprint(s[0:k] + "..." if len(s) > k else s)']
['Runtime Error', 'Accepted']
['s067093184', 's846707980']
[9068.0, 9076.0]
[23.0, 23.0]
[66, 71]
p02676
u863370423
2,000
1,048,576
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.
['\nk=int(input()) #take input as integer\ns=input()\ns1=len(s)\nz=0\n\n\nif k>1 and k<100: #make sure input A is 0<k<100\n if s1>1 and s1<100: #make sure input B is 1<S<100\n if s1<k:\n print(s) #When length k is more than S, print all S\n else:\n while z<k:\n print(s[z],end="") #When length k is less S, print just the index with length k\n z+=1\n else:\n print(\'Wrong input\') #tell the user that the input is wrong\nelse:\n print(\'Wrong input\') #tell the user that the input is wrong\n \n \n\n\n\n', '#need to use a raw input for one line input because they both defer in data types i.e interger and float\na,b = input().split()\n#and then convert them back into respective data types\na=int(a)\nb=float(b)\n#multiply a and b and then round the answer up before printing\nmul=a*b\nans=round(mul)\nprint(ans)\n', '\n#DECLARE K AND S INPUT\nK = int(input())\nS = input()\n\nstr = S\n\n\n\n\nif lens(S) > K:\n print(str[0:K]+"...")\n\nelse:\n print(str)', '\nwhile True:\n k = input()\n if 1 <= int(k) <= 100:\n break;\n print (\'Error Invalid Input for K\')\n\n#Check constraint for K\n\n\nwhile True:\n s = input().lower()\n if 1 <= len(s) <= 100:\n break;\n print (\'Error Invalid Input for s\')\n\n#Check constraint for S\n\nif len(s) > k:\n print(s[:k] + "...")\nelse:\n print(s)', '# program to print the new string after performing append operation in the string s "..." \n# if only the character s is more than k but if the character s is at most k\n# the output will not change\n#first we will define the new string\n\nk =int(input())\ns = input()\n\nstr = s\ndots = "..."\nif len(S) == k:\nprint(S)\nelif len(S) > k:\nprint (str[0:k],"...")\n\n', '#firsts we declare string s and k, if character s is at most with char k, it will print char s, no change\n#if s i more than k it\n#time cpmlexity 0(1)\n\n\nk = int(input())\ns= input()\n\nstr = s\n\n\nif lens(s) == k:\n print(s)\n\nelse:\n print (str[0:k] +"...")\n', "K=int(input())\nS= input()\n\nif len(T) < K :\n print(S)\n\nelse:\n print (S[0:K]+'...')", 'a=input()\nb=input()\nc=b[:int(a)]\nif len(b)>int(a):\n print(c,". . .")\nelse:\n print(c)', '#input an interget\nk=int(input())\n#input an string\nstr1=str(input())\n#get the length of the string\nx=int(len(str1))\n#get the difference in length between k and s\ni=x-k\n\n#make a second string for the appending\nstr2="..."\n\n#if statement about how the string will function\n#if the string is the same length as k then print it\nif i==0:\n print(str1)\n#if not, delete the last character of the string\nelse:\n for i in range(x):\n str1=str1[0 : i : ] + str1[i+1 : : ]\n#and then join the two strings together\n newstr="".join((str1,str2))\n print(newstr)', "#input an interget\nk=int(input())\n#input an string\ns=str(input())\n#get the length of the string\nx=int(len(s))\n#get the difference in length between k and s\ni=k-x\n\n#if statement about how the string will function\n#if the string is the same length as k then print it\nif i==0:\n print(s)\n#if not, append it\nelse:\n for i in range(x):\n s=s[0 : i : ] + s[i+1 : : ]\n for i in range(x):\n fix=str('.')\n lenfix=int(len(fix))=x\n\n print(s.append(fix))", 'a=input() \nb=input() #string input\nif len(b)>int(a): # if exceed the len given\n print(b[:int(a)],". . .")\nelse:\n print(c)', '#input an interget\nk=int(input())\n#input an string\nstr1=str(input())\n#get the length of the string\nx=int(len(str1))\n#get the difference in length between k and s\ni=x-k\n\n#make a second string for the appending\nfor i in range(k):\n str2="..."\n\n#if statement about how the string will function\n#if the string is the same length as k then print it\nif i==0:\n print(str1)\n#if not, delete the last character of the string\nelse:\n for i in range(x):\n str1=str1[0 : i : ] + str1[i+1 : : ]\n#and then join the two strings together\n newstr="".join((str1,str2))\n print(newstr)\n', '\nwhile True:\n k = int(input())\n if 1 <= int(k) <= 100:\n break;\n print (\'Error Invalid Input for K\')\n#Check constraint k\n\nwhile True:\n s = input()\n if 1 <= len(s) <= 100:\n break;\n print (\'Error Invalid Input for s\')\n#Check constraint s\n\nif len(s) > k:\n print(s[:k] + "...") #append\nelse:\n print(s)']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s007544181', 's046373553', 's256635877', 's296165271', 's418899952', 's580872365', 's586668673', 's730448412', 's746715559', 's749660664', 's865800088', 's960013012', 's460687197']
[9044.0, 8832.0, 9160.0, 9064.0, 8880.0, 9060.0, 9136.0, 9116.0, 9116.0, 9000.0, 9172.0, 9132.0, 9144.0]
[28.0, 28.0, 25.0, 25.0, 25.0, 24.0, 25.0, 32.0, 29.0, 29.0, 27.0, 28.0, 27.0]
[563, 299, 173, 348, 351, 301, 87, 90, 560, 483, 137, 584, 343]
p02676
u863433366
2,000
1,048,576
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.
["k = int(input())\ns = input()\n\nif s <= k :\nprint(s)\n\nelse s >= k :\nprint(s[:k]+'...')", 'K = int(input())\nS = input()\n\nif len(S) < K:\n print(s)\nelse:\n print(s[:k] + "...")', "k = int(input())\ns = str(input())\n\nif k >= len(s):\n print(s)\nelse:\n print('s[:k]'+'...')", "k = int(input())\ns = input()\nn = len(s)\n\nif n <= k \nprint(s)\n\nif n >= k\nprint(s[:k]+'...')", "k = int(input())\ns = raw_input()\nn = len(s)\n \nif n <= k:\n\tprint(s)\nelse:\n\tprint(s[:k] + '...')", 'K = int(input())\nS = input()\n\nif len(S) <= K:\n print(s)\nelse:\n print(s[:k] + "...")', "k = int(input())\ns = input()\n\nif s <= k \nprint(s)\n\nif s >= k\nprint(s[:k]+'...')", "k = int(input())\ns = input()\nn = len(s)\n\nif s <= k :\nprint(s)\n\nelse :\nprint(s[:k] + '...')", "k = int(input())\ns = intput()\n\nif len(s) <= k \nprint(s)\n\nif len(s) >= k\nprint(s[:k]+'...')", 'k = int(input())\ns = input()\nif k < len(s):\n print(s[:k] + "...")\nelse:\n print(s)']
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s075286106', 's374825242', 's410366942', 's411311732', 's463839119', 's632537226', 's832145068', 's860697769', 's943597637', 's792394880']
[8936.0, 9164.0, 9140.0, 9040.0, 9092.0, 9036.0, 8952.0, 8912.0, 8952.0, 9160.0]
[22.0, 22.0, 23.0, 21.0, 24.0, 22.0, 23.0, 23.0, 21.0, 23.0]
[84, 88, 90, 90, 98, 89, 79, 90, 90, 83]
p02676
u865119809
2,000
1,048,576
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.
['k = int(input())\n\ns = str(input())\n\nn = len(s)\n\nif n <= k:\n print(s)\nelse:\n print(s[0:k+1] + "...")\n', 'k = int(input())\n\ns = str(input())\n\nn = len(s)\n\nif n <= k:\n print(s)\nelse:\n print(s[0:k+1] + "...")\n', 'k = int(input())\n\ns = str(input())\n\nn = len(s)\n\nif n <= k:\n print(s)\nelse:\n print(s[0:k] + "...")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s186168959', 's474080121', 's246174447']
[9160.0, 9156.0, 9172.0]
[21.0, 22.0, 24.0]
[106, 106, 103]
p02676
u869917163
2,000
1,048,576
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.
["K = int(input())\nS = input()\nif len(S) >= K:\n print(S)\nelse:\n print(S[:K-1]+'...')", "K = int(input())\nS = input()\nif len(S) >= K:\n print(S)\nelse:\n print(S[:K]+'...')", "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[0:K]+'...')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s360990244', 's673875275', 's383259172']
[9088.0, 9188.0, 9092.0]
[24.0, 23.0, 24.0]
[84, 82, 83]
p02676
u871867619
2,000
1,048,576
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.
["K = int(input())\nS = input()\n\nlength = len(s)\nif K <= length:\n print(S)\nelse:\n print(S[:K] + '...')\n", "K = int(input())\nS = input()\n\nlength = len(s)\nif K >= length:\n print(S)\nelse:\n print(S[:K] + '...')\n", "K = int(input())\nS = input()\n\nif K >= len(S):\n print(S)\nelse:\n print(S[:K] + '...')\n"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s351526896', 's591463718', 's883437850']
[9132.0, 9096.0, 9156.0]
[24.0, 24.0, 20.0]
[106, 106, 90]
p02676
u876616721
2,000
1,048,576
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.
["n = int(input())\n#print('n=',n)\nm = input()\n#print('m=',m)\no = len(m)\n#print('o=',o)\nif o <= n:\n print(m)\nelif o > n:\n print(m[0:n],'...')", "n = int(input())\n#print('n=',n)\nm = input()\n#print('m=',m)\no = len(m)\n#print('o=',o)\nif o <= n:\n print(m)\nelif o > n:\n print(m[0:n],'...',sep='')"]
['Wrong Answer', 'Accepted']
['s696837824', 's138527848']
[9192.0, 9164.0]
[23.0, 22.0]
[140, 147]
p02676
u878173555
2,000
1,048,576
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.
["k = int(input())\nn = input()\n\nif len(n)<=k:\n print(n)\n else:\n print(n[:k] + '...')\n \n ", "k = int(input())\nn = input()\n \nif len(n)<=k:\n print(n)\nelse:\n print(n[:k] + '...')"]
['Runtime Error', 'Accepted']
['s446007705', 's134278256']
[9020.0, 9164.0]
[19.0, 21.0]
[93, 84]
p02676
u879901633
2,000
1,048,576
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.
['k = int(input())\ns = int(input())\nif len(s) > k:\n print(s[:k])\nelse:\n print(s)', 'k = int(input())\ns = input()\nif len(s) > k:\n print(s[:k])\nelse:\n print(s)\n', "k = int(input())\ns = input()\nif len(s) > k:\n print(s[:k] + '...')\nelse:\n print(s)\n"]
['Runtime Error', 'Wrong Answer', 'Accepted']
['s150229412', 's330511761', 's339176095']
[9100.0, 9096.0, 9148.0]
[23.0, 21.0, 23.0]
[80, 76, 84]
p02676
u882389182
2,000
1,048,576
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.
["k = int(input())\ns = input()\n\nslist = list(s)\nif len(slist) > k:\n print('...' + slist[0])\nelse:\n print(s)", "k = int(input())\ns = input()\n\nslist = list(s)\nif len(slist) > k:\n l = ''\n for i in range(k):\n k += slist[i]\n print('...' + l)\nelse:\n print(s)\n", "k = int(input())\ns = input()\n\nslist = list(s)\nif len(slist) > k:\n l = ''\n for i in range(k):\n l += slist[i]\n print('...' + l)\nelse:\n print(s)\n", "k = int(input())\ns = input()\n\nslist = list(s)\nif len(slist) > k:\n l = ''\n for i in range(k):\n l += slist[i]\n print(l + '...')\nelse:\n print(s)\n"]
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s009420257', 's113826419', 's222792397', 's153542014']
[8968.0, 9100.0, 9168.0, 9128.0]
[23.0, 24.0, 22.0, 21.0]
[107, 149, 149, 149]
p02676
u886297662
2,000
1,048,576
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.
["K = int(input())\nS = input()\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[:5]+'...')\n", "K = int(input())\nS = input()\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K]+'...')\n"]
['Wrong Answer', 'Accepted']
['s238851114', 's016439831']
[9180.0, 9156.0]
[22.0, 21.0]
[84, 84]
p02676
u886545507
2,000
1,048,576
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.
["abc166b\nk=int(input())\ns=input()\nif len(s)<=k:\n print(s)\nelse:\n ss=s[:k]\n print(ss+'...')\n", "#abc168b\nk=int(input())\ns=input()\nif len(s)<=k:\n print(s)\nelse:\n ss=s[:k]\n print(ss+'...')\n"]
['Runtime Error', 'Accepted']
['s950094618', 's163121361']
[9024.0, 9096.0]
[23.0, 22.0]
[90, 91]
p02676
u886718563
2,000
1,048,576
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.
["K = int(input())\nS = input()\n\nif len(S) <= K:\n print(S)\nelse:\n print(s[:K] + '...')", "K = int(input())\nS = input()\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K] + '...')"]
['Runtime Error', 'Accepted']
['s504417255', 's476679031']
[9160.0, 9144.0]
[27.0, 30.0]
[85, 85]
p02676
u891202624
2,000
1,048,576
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.
['K=int(input())\nS=input()\nif len(S)<=K:\n print(S)\nelse:\n T=[]\n S=list(S)\n for i in range(K):\n T.append(S[i])\n K="".join(T)\n print(K,"...")', 'K=int(input())\nS=input()\nif len(S)<=K:\n print(S)\nelse:\n T=[]\n S=list(S)\n for i in range(K):\n T.append(S[i])\n K="".join(T)\n print(K+"...")']
['Wrong Answer', 'Accepted']
['s767851744', 's118286263']
[8952.0, 9100.0]
[30.0, 29.0]
[166, 166]
p02676
u893661063
2,000
1,048,576
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.
['K = int(input())\nS = input()\nif len(S) <= K:\n print (S)\nelse:\n print (S[0:K], "...")\n', 'K = int(input())\nS = input()\nif len(S) <= K:\n print (S)\nelse:\n print (S[0:K]+ "...")']
['Wrong Answer', 'Accepted']
['s294840455', 's244302354']
[9088.0, 8904.0]
[30.0, 27.0]
[91, 90]
p02676
u895758938
2,000
1,048,576
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.
['K = int(input())\nS = str(input())\n\nif len(S) >= K-1:\n print(S[:K-1]+"...")\nelse:\n print(S)', 'K = int(input())\nS = str(input())\n\nif len(S) > K:\n print(S[:K]+"...")\nelse:\n print(S)\n']
['Wrong Answer', 'Accepted']
['s830129829', 's423118803']
[9148.0, 9036.0]
[20.0, 23.0]
[92, 88]
p02676
u899711906
2,000
1,048,576
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.
['K=int(input())\nS=str(input())\nif len(S)<=K:\n print(S)\nelse:\n print(S+"...")\n ', 'K=int(input())\nS=str(input())\nif len(S)<=K:\n print(S)\nelse:\n b=""\n for i in range(K):\n b+=S[i]\n print(b+"...")\n ']
['Wrong Answer', 'Accepted']
['s953469599', 's705320709']
[9152.0, 9096.0]
[20.0, 21.0]
[80, 120]
p02676
u901144784
2,000
1,048,576
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.
["k=int(input())\ns=input()\nif(len(s)<=k):\n print(s)\nelse:\n print(s[:k+1]+'...')", "k=int(input())\ns=input()\nif(len(s)<=k):\n print(s)\nelse:\n print(s[:k]+'...')"]
['Wrong Answer', 'Accepted']
['s126904373', 's818425596']
[9172.0, 9164.0]
[22.0, 22.0]
[79, 77]
p02676
u902917675
2,000
1,048,576
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.
['k = int(input())\ns = input()\n\nprint(len(s))\n\nif len(s) <= k:\n print(s)\nelse:\n print(s[:k] + "...")', 'k = int(input())\ns = input()\n\nif len(s) <= k:\n print(s)\nelse:\n print(s[:k] + "...")\n ']
['Wrong Answer', 'Accepted']
['s093718319', 's626218548']
[9112.0, 9056.0]
[27.0, 31.0]
[100, 88]
p02676
u904331908
2,000
1,048,576
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.
['k = int(input())\ns = input()\nx = len(s)\n\nif k >= x:\n print(s)\n\nelse:\n print(s + "...")\n', 'k = int(input())\ns = input()\nx = len(s)\n\nif k >= x:\n print(s)\n\nelse:\n print(s + "...")\n', 'k = int(input())\ns = input()\nx = len(s)\n\nif k >= x:\n print(s)\n\nelse:\n print(s[0:k+1] + "...")\n', 'k = int(input())\ns = inpur()\nx = len(s)\n\nif k >= s:\n print(s)\n\nelse:\n print(s + "...")', 'k = int(input())\ns = inpur()\nx = len(s)\n\nif k >= x:\n print(s)\n\nelse:\n print(s + "...")\n', 'k = int(input())\ns = input()\nx = len(s)\nif x <= k :\n print(s)\nelse:\n print(s[0:k] + "...")\n \n ']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s265709887', 's403514626', 's691852387', 's921146550', 's976064459', 's094680174']
[9096.0, 9068.0, 9060.0, 9128.0, 9052.0, 9020.0]
[28.0, 29.0, 25.0, 25.0, 28.0, 28.0]
[89, 89, 96, 88, 89, 98]
p02676
u904811150
2,000
1,048,576
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.
["K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n _S = S[K:] + '...'\n print(_S)", "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nif len(S) > K:\n _S = S[:K] + '...'\n print(_S)"]
['Wrong Answer', 'Accepted']
['s000513602', 's078124292']
[9088.0, 9172.0]
[21.0, 23.0]
[100, 109]
p02676
u905276896
2,000
1,048,576
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.
['\n k = int(input())\n\n s = input()\n\n\nif k < len(s): \n print(s[:k] + "...")\nelse:\n print(s)', 'k = int(input())\n\ns = input()\n\n\nif k < len(s): \n print(s[:k] + "...")\nelse:\n print(s)\n']
['Runtime Error', 'Accepted']
['s342032578', 's775747774']
[8944.0, 9152.0]
[20.0, 22.0]
[109, 107]
p02676
u909815117
2,000
1,048,576
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.
['n = int(input())\ns = input()\nif len(s) <= n:\n print(s)\nelse:\n print(s[:k] + "...")', 'n = int(input())\ns = input()\nif len(s) <= n:\n print(s)\nelse:\n print(s[:n] + "...")\n']
['Runtime Error', 'Accepted']
['s620558399', 's707753672']
[9164.0, 9152.0]
[21.0, 23.0]
[84, 85]
p02676
u910632349
2,000
1,048,576
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.
['k=int(input())\ns=input()\nif len(s)>k:\n s=s[:k]+"...."\nprint(s)', 'k=int(input())\ns=input()\nif len(s)>k:\n s=s[:k]+".."\nprint(s)', 'k=int(input())\ns=input()\nif len(s)>k:\n s=s[:k]+"."\nprint(s)', 'k=int(input())\ns=input()\nif k>=len(s):\n print(s)\nelse:\n print(s[:k]+"...")']
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s061538918', 's260581988', 's874494299', 's179571953']
[8972.0, 9088.0, 9048.0, 9132.0]
[28.0, 27.0, 27.0, 28.0]
[65, 63, 62, 80]
p02676
u911531682
2,000
1,048,576
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.
['K = int(input())\nS = input()\n\nprint(len(S), K)\nif K < len(S):\n print(f"{S[:K]}...")\nelse:\n print(S)\n', 'K = int(input())\nS = input()\n\nif K < len(S):\n print(f"{S[:K]}...")\nelse:\n print(S)\n']
['Wrong Answer', 'Accepted']
['s188712400', 's576650189']
[9160.0, 9160.0]
[23.0, 21.0]
[106, 89]
p02676
u919235786
2,000
1,048,576
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.
["k=int(input())\ns=input()\nif len(s)<=k:\n print(s)\nelse:\n c=[]\n c[0:0]=s\n del c[k:]\n print(''.join(c))", "k=int(input())\ns=input()\nif len(s)<=k:\n print(s)\nelse:\n c=[]\n c[0:0]=s\n del c[k:]\n c.append('...')\n print(''.join(c))"]
['Wrong Answer', 'Accepted']
['s354631597', 's343906698']
[9168.0, 9180.0]
[23.0, 25.0]
[115, 135]
p02676
u920194937
2,000
1,048,576
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.
["K = int(input())\nS = input()\n\nif len(S) <= K:\n print(S)\nelse:\n S_ = S[0:K-1]\n print(S+'...')", "K = int(input())\nS = input()\n\nif K == 1:\n print(S[0])\nelif len(S) <= K:\n print(S)\nelse:\n S_ = S[0:K-1]\n print(S+'...')", "K = int(input())\nS = input()\n\nif len(S) <= K:\n print(S)\nelse:\n S_ = S[0:K]\n print(S_+'...')"]
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s141068283', 's706445288', 's276176578']
[9168.0, 9168.0, 9108.0]
[24.0, 22.0, 19.0]
[95, 122, 94]
p02676
u920204936
2,000
1,048,576
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.
['K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n for i in range(K):\n print(S[i],end="")\n print("..."3)', 'K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n for i in range(K):\n print(S[i],end="")\n print("...")']
['Runtime Error', 'Accepted']
['s879386637', 's185346396']
[9028.0, 9172.0]
[24.0, 21.0]
[131, 130]
p02676
u921617614
2,000
1,048,576
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.
['k=int(input())\ns=input()\nprint(s[:k+1]+"{0}".format("..."*(len(s)>k)))', "k,s=open(0)\nk=int(k)\nprint(s[:k]+'...'*(len(s)-1>k))\n"]
['Wrong Answer', 'Accepted']
['s655406065', 's801510176']
[9020.0, 9076.0]
[28.0, 27.0]
[70, 53]
p02676
u921729430
2,000
1,048,576
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.
["K = int(input())\nS = input()\nfor s in S[K:]:\n s = '.'\nprint(S)", 'K = int(input())\nS = input()\nif len(S) > K:\n S = S[:K] + "..."\nprint(S)']
['Wrong Answer', 'Accepted']
['s908163345', 's637919433']
[9156.0, 9160.0]
[24.0, 22.0]
[63, 72]
p02676
u923010184
2,000
1,048,576
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.
['K = int(input())\nS = str(input())\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K+1])', 'K = int(input())\nS = str(input())\n\nif len(S) <= K:\n print(S)\nelse:\n\n print(S[:K+1]+...)', 'K = int(input())\nS = str(input())\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K] + "...")']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s099304239', 's250199720', 's199358705']
[9160.0, 9100.0, 9168.0]
[23.0, 23.0, 22.0]
[88, 93, 94]
p02676
u929996201
2,000
1,048,576
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.
['k = int(input())\na = str(input())\n\nif len(a) <= k:\n\tprint(a)\nelse\n\tprint(a[:k] + "...")', 'k = int(input())\na = str(input())\n \nif len(a) <= k:\n\tprint(a)\nelse:\n\tprint(a[:k] + "...")']
['Runtime Error', 'Accepted']
['s194468786', 's050072400']
[9016.0, 9164.0]
[22.0, 23.0]
[87, 89]
p02676
u930574673
2,000
1,048,576
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.
['K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K])', "K = int(input())\nS = input()\nif len(S) <= K:\n print(S)\nelse:\n print(S[:K] + '...')"]
['Wrong Answer', 'Accepted']
['s475691735', 's037435248']
[9160.0, 9164.0]
[22.0, 22.0]
[76, 84]
p02676
u933751828
2,000
1,048,576
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.
["s = [input() for i in range(2)]\nif len(s[1]) > int(s[0]):\n print(s[1])\nelif len(s[1]) <= int(s[0]):\n print(s[1][0:int(s[0])] + '...')\n\n", "s = [input() for i in range(2)]\nif len(s[1]) <= int(s[0]):\n print(s[1])\nelif len(s[1]) > int(s[0]):\n print(s[1][0:int(s[0])] + '...')\n\n"]
['Wrong Answer', 'Accepted']
['s648235790', 's639339655']
[9156.0, 9040.0]
[23.0, 22.0]
[141, 141]
p02676
u934615959
2,000
1,048,576
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.
["\nimport sys\n\ndef test(k,s):\n cnt=0\n\n length = len(s)\n if k<length:\n return s[:k]+'...'\n return s\n\nif __name__ == '__main__':\n print(test(sys.argv[0],sys.argv[1]))", "\n\nif __name__ == '__main__':\n k = int(input());\n s = input();\n\n cnt=0\n for i in s:\n print(i, end='')\n cnt+=1\n if cnt>=k:\n break\n\n if k < len(s):\n print('...')\n"]
['Runtime Error', 'Accepted']
['s876336720', 's577206088']
[9100.0, 9004.0]
[20.0, 21.0]
[184, 213]
p02676
u938718404
2,000
1,048,576
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.
['S=str(input())\nK=int(input())\nif len(S)<=K:\n print(S)\nelse:\n print(S[:K]+"...")', 'S=input()\nK=int(input())\nif len(S)<=K:\n print(S)\nelse:\n print(S[:K]+"...")', 'S=input()\nK=input()\nif len(S)<=K:\n print(S)\nelse:\n print(S[:K]+"...")', 'S=str(input())\nK=int(input())\nif len(S)<=K:\n print(S)\nelse:\n print(S[0:K]+"...")', 'K=int(input())\nS=input()\nif len(S)<=K:\n print(S)\nelse:\n print(S[:K]+"...")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s029614055', 's184480272', 's199099512', 's822918529', 's149518433']
[9172.0, 9124.0, 9108.0, 9180.0, 9168.0]
[21.0, 23.0, 24.0, 20.0, 20.0]
[85, 80, 75, 86, 80]
p02676
u939949527
2,000
1,048,576
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.
["n = int(input())\ns = input()\nl = len(s)\nif len <= n:\n print(s)\nelse:\n print(s[:n] + '...')\n ", "n = int(input())\ns = input()\nl = len(s)\nif l <= n:\n print(s)\nelse:\n print(s[:n] + '...')\n "]
['Runtime Error', 'Accepted']
['s804651486', 's315345014']
[9084.0, 9172.0]
[23.0, 25.0]
[101, 99]
p02676
u943004959
2,000
1,048,576
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.
["k = int(input())\ns = input()\nprint(s[:k] + '.' * (len(s) - k))", "k=int(input());s=input();print(s[:k]+'.'*3*(len(s)>k))\n"]
['Wrong Answer', 'Accepted']
['s824238137', 's997753338']
[9164.0, 9156.0]
[22.0, 23.0]
[62, 55]
p02676
u944886577
2,000
1,048,576
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.
['k=int(input())\ns=str(input())\nif len(s)<=k:\n print(s)\n exit()\nelse:\n print(s[:len(s)-1]+"...")', 'k=str(input())\ns=int(input())\nif len(s)<=k:\n print(s)\n exit()\nelse:\n print(s[len(s-1):]+"...")\n', 'k=int(input())\ns=str(input())\nif len(s)<=k:\n print(s)\n exit()\nelse:\n print(s[0:k-1]+"...")', 'k=int(input())\ns=str(input())\nif len(s)<=k:\n print(s)\n exit()\nelse:\n print(s[0:k]+"...")']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s558065661', 's719466045', 's997816074', 's496428854']
[9132.0, 9088.0, 9108.0, 9164.0]
[29.0, 27.0, 29.0, 30.0]
[97, 98, 93, 91]
p02676
u947123009
2,000
1,048,576
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.
["K = int(imput())\nS = imput()\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[0: K] + '...')", "if len(S) <= K:\n print(S)\nelse:\n print(S[0: K] + '...')", "K = int(input('数字:'))\nS = input('文字列:')\n\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[0: K] + '...')", "K = int(input())\nS = input()\n\n\nif len(S) <= K:\n print(S)\nelse:\n print(S[0: K] + '...')"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s011795897', 's153918406', 's868098602', 's414096588']
[9024.0, 8980.0, 9028.0, 9056.0]
[26.0, 24.0, 28.0, 25.0]
[91, 61, 117, 92]