buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
K = int(input())
S = input()
leng = len(S)
print(leng)
if(leng > K):
word = S[0:K] + '...'
else:
word = S
print(word)
| K = int(input())
S = input()
leng = len(S)
#print(leng)
if(leng > K):
word = S[0:K] + '...'
else:
word = S
print(word)
| [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 51 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, panjangstring;
string s;
cin >> k;
cin >> s;
panjangstring = s.size();
if (panjangstring < k) {
cout << s << endl;
} else {
for (int i = 0; i < k; i++) {
cout << s[i];
}
cout << "..." << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int k, panjangstring;
string s;
cin >> k;
cin >> s;
panjangstring = s.size();
if (panjangstring <= k) {
cout << s << endl;
} else {
for (int i = 0; i < k; i++) {
cout << s[i];
}
cout << "..." << endl;
}
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 87 |
K=int(input())
S=input()
if (K>=len(S)):
print (S)
else:
print ((S[0:(K-1)]) + "...") | K=int(input())
S=input()
if (K>=len(S)):
print (S)
else:
print ((S[0:(K)]) + "...") | [["-", 0, 206, 206, 663, 0, 23, 0, 657, 17, 33], ["-", 0, 206, 206, 663, 0, 23, 0, 657, 12, 612]] | 5 | 48 |
k = int(input())
s = input()
print(s if len(s)<k else s[:k]+'...') | k = int(input())
s = input()
print(s if len(s)<=k else s[:k]+'...') | [["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 18], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 19]] | 5 | 34 |
#include <bits/stdc++.h>
#include <string.h>
using namespace std;
int main() {
int num, i = 0;
string a;
cin >> num >> a;
if (a.size() < num) {
cout << a;
} else {
for (; i < num;) {
cout << a[i];
i++;
}
cout << "...";
}
}
| #include <bits/stdc++.h>
#include <string.h>
using namespace std;
int main() {
int num, i = 0;
string a;
cin >> num >> a;
if (a.size() <= num) {
cout << a;
} else {
for (; i < num;) {
cout << a[i];
i++;
}
cout << "...";
}
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 75 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int K;
string S;
int size;
cin >> K >> S;
size = S.size();
if (K >= size) {
cout << S << endl;
} else {
cout << S[K - 1] << "..." << endl;
}
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
int K;
string S;
int size;
cin >> K >> S;
size = S.size();
if (K >= size) {
cout << S << endl;
} else {
cout << S.erase(K) << "..." << endl;
}
}
| [["-", 31, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["+", 31, 16, 31, 16, 12, 2, 63, 118, 17, 131], ["+", 31, 16, 31, 16, 12, 2, 63, 118, 119, 120], ["+", 31, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["-", 31, 16, 12, 69, 341, 342, 0, 16, 17, 33], ["-", 31, 16, 12, 69, 341, 342, 0, 16, 12, 13], ["-", 31, 16, 31, 16, 12, 69, 341, ... | 1 | 69 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, s, n) for (int i = s; i < n; i++)
int main() {
int K;
string S;
cin >> K >> S;
int str_len = S.length();
if (str_len < K) {
cout << S << endl;
return 0;
} else {
for (int i = 0; i < K; i++)
cout << S[i];
cout << "..." << endl... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, s, n) for (int i = s; i < n; i++)
int main() {
int K;
string S;
cin >> K >> S;
int str_len = S.length();
if (str_len <= K) {
cout << S << endl;
return 0;
} else {
for (int i = 0; i < K; i++)
cout << S[i];
cout << "..." << end... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 95 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int k = sc.nextInt();
String str = sc.next();
int len = str.length();
if (k >= len) {
System.out.println(str);
} else {
for (int i = 0; i < 7; i++) {
cha... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int k = sc.nextInt();
String str = sc.next();
int len = str.length();
if (k >= len) {
System.out.println(str);
} else {
for (int i = 0; i < k; i++) {
cha... | [["-", 0, 57, 75, 196, 0, 7, 15, 16, 12, 499], ["+", 0, 57, 75, 196, 0, 7, 15, 16, 12, 22]] | 3 | 128 |
n = int(input())
s = input()
a = len(s)
if a <= n:
print(s)
else:
print(s[0:n-1] + '...')
| n = int(input())
s = input()
a = len(s)
if a <= n:
print(s)
else:
print(s[0:n] + '...')
| [["-", 0, 657, 31, 206, 206, 663, 0, 657, 17, 33], ["-", 0, 657, 31, 206, 206, 663, 0, 657, 12, 612]] | 5 | 45 |
if __name__ == "__main__":
K = int(input())
S = input()
if len(S) < K:
print(S)
else:
print(S[:K]+"...") | if __name__ == "__main__":
K = int(input())
S = input()
if len(S) <= K:
print(S)
else:
print(S[:K]+"...") | [["-", 0, 57, 64, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 667, 19]] | 5 | 46 |
#include <stdio.h>
int main() {
char str[100];
int n, K;
scanf("%d", &K);
scanf("%s", str);
n = 0;
while (str[n] !=
'\0') { /* str[n] が終端文字(ヌル文字 '\0')でない間繰り返す */
n++;
}
// printf("Length of \"%s\" is %d.\n", str, n);
if (K >= n) {
printf("%s\n", str);
// printf("AAAA\n");
} els... | #include <stdio.h>
int main() {
char str[100];
int n, K;
scanf("%d", &K);
scanf("%s", str);
n = 0;
while (str[n] !=
'\0') { /* str[n] が終端文字(ヌル文字 '\0')でない間繰り返す */
n++;
}
// printf("Length of \"%s\" is %d.\n", str, n);
// printf("%d %d\n",K ,n);
if (K >= n) {
printf("%s\n", str);
... | [["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22]] | 1 | 123 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K;
string S;
cin >> K;
cin >> S;
if (S.size() < K) {
cout << S << endl;
} else {
for (int i = 0; i < K; i++) {
cout << S.at(i);
}
cout << "..." << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int K;
string S;
cin >> K;
cin >> S;
if (S.size() <= K) {
cout << S << endl;
} else {
for (int i = 0; i < K; i++) {
cout << S.at(i);
}
cout << "..." << endl;
}
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 83 |
K=int(input())
S=str(input())
if len(S) <= K :
print(S)
else :
print(S[1:K]+"...") | K=int(input())
S=str(input())
if len(S) <= K :
print(S)
else :
print(S[0:K]+"...") | [["-", 3, 4, 0, 657, 31, 206, 206, 663, 0, 612], ["+", 3, 4, 0, 657, 31, 206, 206, 663, 0, 612]] | 5 | 43 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll unsigned long long int
#define pb push_back
#define pii pair<int, int>
#define F first
#define S second
#define vi vector<int>
#define vli vector<ll>
#defin... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ll unsigned long long int
#define pb push_back
#define pii pair<int, int>
#define F first
#define S second
#define vi vector<int>
#define vli vector<ll>
#defin... | [["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 16, 31, 16, 12, 2, 3, 4, 0, 21]] | 1 | 338 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char S[256];
int K, len_s, i;
scanf("%d", &K);
scanf("%s", S);
len_s = strlen(S);
if (len_s <= K) {
printf("%s\n", S);
} else if (len_s > K) {
for (i = 0; i < K; i++) {
printf("%c", S[i]);
}
printf(". . .\n");
... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char S[256];
int K, len_s, i;
scanf("%d", &K);
scanf("%s", S);
len_s = strlen(S);
if (len_s <= K) {
printf("%s\n", S);
} else if (len_s > K) {
for (i = 0; i < K; i++) {
printf("%c", S[i]);
}
printf("...\n");
}... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 116 |
#include <stdio.h>
#include <string.h>
int main() {
int K;
char S[100];
int i, num = 0;
int len;
scanf("%d", &K);
scanf("%s", S);
len = strlen(S);
if (len < K) {
printf("%s\n", S);
} else {
for (i = 0; i < K; i++) {
printf("%c", S[i]);
}
printf("...\n");
}
return 0;
}
| #include <stdio.h>
#include <string.h>
int main() {
int K;
char S[100];
int i, num = 0;
int len;
scanf("%d", &K);
scanf("%s", S);
len = strlen(S);
if (len <= K) {
printf("%s\n", S);
} else {
for (i = 0; i < K; i++) {
printf("%c", S[i]);
}
printf("...\n");
}
return 0;
}
| [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19]] | 0 | 114 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using P = pair<int, int>;
int main() {
int K;
string S;
cin >> K >> S;
if (S.size() <= K)
cout << S << endl;
else {
S = S.substr(0, K - 1);
cout << S << "..." << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using P = pair<int, int>;
int main() {
int K;
string S;
cin >> K >> S;
if (S.size() <= K)
cout << S << endl;
else {
S = S.substr(0, K);
cout << S << "..." << endl;
}
} | [["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 90 |
K = int(input())
S = input()
Sl = len(S)
if Sl <= K:
ans = S
else:
newS = S[0 : K-1]
ans = (newS + "...")
print(ans) | K = int(input())
S = input()
Sl = len(S)
if Sl <= K:
ans = S
else:
newS = S[0 : K]
ans = (newS + "...")
print(ans) | [["-", 0, 662, 12, 206, 206, 663, 0, 657, 17, 33], ["-", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612]] | 5 | 52 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K;
string S;
cin >> K >> S;
if (S.size() < K) {
cout << S << endl;
} else {
cout << S.substr(0, K) << "..." << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int K;
string S;
cin >> K >> S;
if (S.size() <= K) {
cout << S << endl;
} else {
cout << S.substr(0, K) << "..." << endl;
}
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 62 |
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... | #!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... | [["-", 0, 14, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 667, 47]] | 5 | 381 |
s = [input() for i in range(2)]
s0 = int(s[0])
l0 = len(s[1])
if s0 >= l0:
print(s[1])
if s0 < l0:
print(s[1][:s0],'...') | s = [input() for i in range(2)]
s0 = int(s[0])
l0=len(s[1])
if s0 >= l0:
print(s[1])
if s0 < l0:
print(s[1][:s0]+'...') | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72]] | 5 | 64 |
k = int(input())
s = str(input())
if k>=len(s):
print(s)
else:
a = s+'...'
print(a)
| k = int(input())
s = str(input())
if k>=len(s):
print(s)
else:
a = s[0:k]+'...'
print(a)
| [["+", 0, 1, 0, 662, 12, 657, 31, 206, 0, 70], ["+", 0, 662, 12, 657, 31, 206, 206, 663, 0, 612], ["+", 0, 662, 12, 657, 31, 206, 206, 663, 0, 102], ["+", 0, 662, 12, 657, 31, 206, 206, 663, 0, 22], ["+", 0, 1, 0, 662, 12, 657, 31, 206, 0, 73]] | 5 | 41 |
#include <stdio.h>
#include <string.h>
int main() {
int k;
char ch[100];
int i;
scanf("%d", &k);
scanf("%s", ch);
int n = strlen(ch);
if (n <= k) {
printf("%s", ch);
} else {
for (i = 0; i <= k - 1; i++) {
printf("%c", ch[i]);
printf("...");
}
}
} | #include <stdio.h>
#include <string.h>
int main() {
int k;
char ch[100];
int i;
scanf("%d", &k);
scanf("%s", ch);
int n = strlen(ch);
if (n <= k) {
printf("%s", ch);
} else {
for (i = 0; i <= k - 1; i++) {
printf("%c", ch[i]);
}
printf("...");
}
} | [["+", 75, 76, 0, 9, 0, 7, 8, 9, 0, 46], ["-", 75, 76, 0, 9, 0, 7, 8, 9, 0, 46]] | 0 | 105 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int k;
string s, ans;
vector<char> t(0);
cin >> k >> s;
if ((int)s.length() <= k)
ans = s;
else {
rep(i, k) { t.push_back(s[i]); }
rep(i, 3... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int k;
string s, ans;
vector<char> t(0);
cin >> k >> s;
if ((int)s.length() <= k)
ans = s;
else {
rep(i, k) { t.push_back(s[i]); }
rep(i, 3... | [["-", 8, 9, 0, 9, 0, 1, 0, 16, 31, 22], ["-", 8, 9, 0, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 17, 107], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 145 |
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] + '...')
| [["-", 0, 657, 31, 206, 206, 663, 0, 657, 17, 72], ["-", 0, 657, 31, 206, 206, 663, 0, 657, 12, 612]] | 5 | 51 |
#include <iostream>
using namespace std;
int main() {
int x;
string word;
cin >> x >> word;
if (x >= word.size())
cout << word;
else {
for (int i = 0; i < x; i++)
cout << word.at(i);
}
} | #include <iostream>
using namespace std;
int main() {
int x;
string word;
cin >> x >> word;
if (x >= word.size())
cout << word;
else {
for (int i = 0; i < x; i++)
cout << word.at(i);
cout << "...";
}
} | [["+", 75, 76, 0, 9, 0, 1, 0, 16, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]] | 1 | 64 |
k=int(input())
s=list(input())
if len(s)<=k:
print(str(s))
else:
print(str(''.join(s[:k]))+'...') | k=int(input())
s=list(input())
if len(s)<=k:
print(str(''.join(s)))
else:
print(str(''.join(s[:k]))+'...') | [["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 654], ["+", 3, 4, 0, 652, 63, 319, 500, 557, 0, 655], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 54 |
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int k;
cin >> k;
string s;
cin >> s;
int n = s.length();
if (n <= k) {
cout << s << endl;
} else {
s.erase(0, k);
s.append("...");
cout << s << ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int k;
cin >> k;
string s;
cin >> s;
int n = s.length();
if (n <= k) {
cout << s << endl;
} else {
s.erase(k, n);
s.append("...");
cout << s << ... | [["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 97 |
K = input()
S = str(input())
if len(S)<=len(K):
print(S)
if len(S)>len(K):
K = int(K)
S = str(S[0:K])+ "..."
print(S) | K = input()
S = str(input())
if len(S)<=int(K):
print(S)
if len(S)>int(K):
K = int(K)
S = str(S[0:K])+ "..."
print(S) | [["-", 0, 656, 0, 57, 15, 666, 0, 652, 63, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 652, 63, 22]] | 5 | 64 |
#include <bits/stdc++.h>
#include <string>
using namespace std;
int main() {
int k;
scanf("%i", &k);
string s;
cin >> s;
int n;
n = s.size();
if (n <= k) {
cout << s << endl;
} else {
for (int i = 0; i < k; i++) {
printf("%c", s[i]);
}
for (int i = k; i < n; i++) {
printf("."... | #include <bits/stdc++.h>
#include <string>
using namespace std;
int main() {
int k;
scanf("%i", &k);
string s;
cin >> s;
int n;
n = s.size();
if (n <= k) {
cout << s << endl;
} else {
for (int i = 0; i < k; i++) {
printf("%c", s[i]);
}
for (int i = 0; i < 3; i++) {
printf("."... | [["-", 0, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 0, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 12, 13]] | 1 | 123 |
K=int(input())
S=input()
if len(S) > K:
S = S[:K]
print(S+"...") | K=int(input())
S=input()
if len(S) > K:
S = S[:K]+"..."
print(S) | [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 36 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a;
string b, c;
cin >> a >> b;
if (a > b.size()) {
cout << b << endl;
} else {
for (int i = 0; i < a; i++) {
c = c + b.at(i);
}
cout << c + "..." << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a;
string b, c;
cin >> a >> b;
if (a >= b.size()) {
cout << b << endl;
} else {
for (int i = 0; i < a; i++) {
c = c + b.at(i);
}
cout << c + "..." << endl;
}
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 84 |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#inclu... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#inclu... | [["-", 36, 36, 36, 36, 0, 30, 0, 340, 0, 233], ["-", 36, 36, 36, 36, 0, 30, 0, 340, 0, 256], ["-", 36, 36, 36, 36, 0, 30, 0, 340, 0, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 340, 0, 35], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22]] | 1 | 130 |
#include "bits/stdc++.h"
using namespace std;
#define rep(i, a, n) for (ll i = a; i < n; i++)
#define rerep(i, a, n) for (ll i = n; i >= a; i--)
#define elif else if
#define all(s) s.begin(), s.end()
typedef long long ll;
int gcd(int a, int b) {
if (a < b)
swap(a, b);
if (a % b == 0)
return b;
else
re... | #include "bits/stdc++.h"
using namespace std;
#define rep(i, a, n) for (ll i = a; i < n; i++)
#define rerep(i, a, n) for (ll i = n; i >= a; i--)
#define elif else if
#define all(s) s.begin(), s.end()
typedef long long ll;
int gcd(int a, int b) {
if (a < b)
swap(a, b);
if (a % b == 0)
return b;
else
re... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 159 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K, s;
string S;
cin >> K >> S;
s = S.size();
if (s <= K)
cout << S << endl;
else {
for (int i = 0; i < s; i++) {
cout << S.at(i);
if (i == 6) {
cout << "..." << endl;
break;
}
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int K, s;
string S;
cin >> K >> S;
s = S.size();
if (s <= K)
cout << S << endl;
else {
for (int i = 0; i < s; i++) {
cout << S.at(i);
if (i == K - 1) {
cout << "..." << endl;
break;
}
}
}
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 92 |
#include <iostream>
using namespace std;
int N;
string s;
int main() {
cin >> N;
cin >> s;
if (s.length() <= N)
cout << s;
else {
for (int i = 0; i <= 6; i++) {
cout << s[i];
}
cout << "...";
}
return 0;
} | #include <iostream>
using namespace std;
int N;
string s;
int main() {
cin >> N;
cin >> s;
if (s.length() <= N)
cout << s;
else {
for (int i = 0; i <= N - 1; i++) {
cout << s[i];
}
cout << "...";
}
return 0;
} | [["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["+", 0, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 0, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 75 |
K = int(input())
S = input()
if len(S) <= K:
print(S)
else:
M = S[0:K+1]
print(M + "...") | K = int(input())
S = input()
if len(S) <= K:
print(S)
else:
M = S[0:K]
print(M + "...") | [["-", 0, 662, 12, 206, 206, 663, 0, 657, 17, 72], ["-", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612]] | 5 | 45 |
k = int(input())
s = input()
if len(s) > k:
print(f'{s[:7]}...')
else:
print(s) | k = int(input())
s = input()
if len(s) > k:
print(f'{s[:k]}...')
else:
print(s) | [["-", 0, 557, 0, 284, 205, 206, 206, 663, 0, 612], ["+", 0, 557, 0, 284, 205, 206, 206, 663, 0, 22]] | 5 | 40 |
def main():
K = int(input())
S = input()
if len(S) < K:
print(S)
else:
print(S[:K]+"...")
if __name__ == "__main__":
main() | def main():
K = int(input())
S = input()
if len(S) <= K:
print(S)
else:
print(S[:K]+"...")
if __name__ == "__main__":
main() | [["-", 0, 14, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 54 |
#include <functional>
#include <iostream>
#include <string>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define chmax(x, y) x = max(x, y)
const ll INF = 1e18;
ll dp[200005][4];
// cp temp.cpp abc160_e.cpp
int main() {
int k;
string s;
cin... | #include <functional>
#include <iostream>
#include <string>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define chmax(x, y) x = max(x, y)
const ll INF = 1e18;
ll dp[200005][4];
// cp temp.cpp abc160_e.cpp
int main() {
int k;
string s;
cin... | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22]] | 1 | 117 |
#include <iostream>
#include <string.h>
using namespace std;
int main() {
int K;
char S[105];
cin >> K >> S;
int i;
int len_s = strlen(S);
if (len_s < K) {
cout << S;
return 0;
}
for (i = 0; i < len_s; i++) {
if (i >= K) {
S[i] = '.';
S[i + 1] = '.';
S[i + 2] = '.';
... | #include <iostream>
#include <string.h>
using namespace std;
int main() {
int K;
char S[105];
cin >> K >> S;
int i;
int len_s = strlen(S);
if (len_s < K) {
cout << S;
return 0;
}
for (i = 0; i < len_s; i++) {
if (i >= K) {
S[i] = '.';
S[i + 1] = '.';
S[i + 2] = '.';
... | [["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35]] | 1 | 127 |
length=eval(input(""))
string = input("")
if(len(string)==length):
print(string)
if(len(string)>length):
print(string[0:length],end="...") | length=eval(input(""))
string = input("")
if(len(string)<=length):
print(string)
if(len(string)>length):
print(string[0:length],end="...") | [["-", 0, 656, 0, 57, 15, 23, 0, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 23, 0, 666, 667, 19]] | 5 | 56 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int K = scan.nextInt();
String S = scan.next();
char[] X = S.toCharArray();
if (X.length <= K) {
System.out.println(S);
} else {
for (int i = 0; i <= K;... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int K = scan.nextInt();
String S = scan.next();
char[] X = S.toCharArray();
if (X.length <= K) {
System.out.println(S);
} else {
for (int i = 0; i < K; ... | [["-", 0, 57, 75, 196, 0, 7, 15, 16, 17, 19], ["+", 0, 57, 75, 196, 0, 7, 15, 16, 17, 18]] | 3 | 125 |
K = int(input())
T = input()
S = list(T)
if len(S) <= K:
print(T)
else:
A = ''.join(S[:K])
print(A, '...') | K = int(input())
T = input()
S = list(T)
if len(S) <= K:
print(T)
else:
A = ''.join(S[:K])
print(A, '...', sep='') | [["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 653, 51, 557, 0, 655]] | 5 | 54 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string str;
ll k;
str s, s1;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> k;
cin >> s;
s1 = "";
if (s.length() == k) {
cout << s;
return 0;
}
for (ll i = 0; i <= k - 1; i++)
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string str;
ll k;
str s, s1;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> k;
cin >> s;
s1 = "";
if (s.length() <= k) {
cout << s;
return 0;
} else {
for (ll i = 0; i <= k -... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]] | 1 | 129 |
#include <iostream>
using namespace std;
int main() {
int k;
cin >> k;
string s;
cin >> s;
int t = s.size();
if (t <= k) {
cout << s << endl;
} else {
for (int i = 0; i <= k; i++) {
cout << s[i];
}
cout << "..." << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int k;
cin >> k;
string s;
cin >> s;
int t = s.size();
if (t <= k) {
cout << s << endl;
} else {
for (int i = 0; i < k; i++) {
cout << s[i];
}
cout << "..." << endl;
}
return 0;
} | [["-", 75, 76, 0, 9, 0, 7, 15, 16, 17, 19], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 17, 18]] | 1 | 86 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k;
string s;
cin >> k >> s;
if (k > s.length()) {
cout << s << endl;
} else {
for (int i = 0; i < k; i++) {
cout << s[i];
}
cout << "..." << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int k;
string s;
cin >> k >> s;
if (k >= s.length()) {
cout << s << endl;
} else {
for (int i = 0; i < k; i++) {
cout << s[i];
}
cout << "..." << endl;
}
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 76 |
#include <iostream>
using namespace std;
int main() {
int k;
cin >> k;
string s, t;
cin >> s;
if (s.size() < k) {
// cout<<s.size()<<endl;
cout << s;
} else {
for (int i = 0; i < k; i++) {
t += s[i];
}
for (int i = 0; i < 3; i++) {
t.push_back('.');
}
cout << t << end... | #include <iostream>
using namespace std;
int main() {
int k;
cin >> k;
string s, t;
cin >> s;
if (s.size() <= k) {
// cout<<s.size()<<endl;
cout << s;
} else {
for (int i = 0; i < k; i++) {
t += s[i];
}
for (int i = 0; i < 3; i++) {
t.push_back('.');
}
cout << t << en... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 102 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int n;
cin >> n >> str;
if ((int)str.length() <= n) {
cout << str << endl;
} else {
cout << str.erase(n + 1) << "..." << endl;
}
return 0;
}
| #include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int n;
cin >> n >> str;
if ((int)str.length() <= n) {
cout << str << endl;
} else {
cout << str.erase(n) << "..." << endl;
}
return 0;
}
| [["-", 31, 16, 12, 2, 3, 4, 0, 16, 17, 72], ["-", 31, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 70 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K;
cin >> K;
string str;
cin >> str;
if (str.size() <= K) {
cout << str << endl;
} else {
for (int i = 0; i < K; i++) {
cout << str.at(i);
}
cout << "…" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int K;
cin >> K;
string str;
cin >> str;
if (str.size() <= K) {
cout << str << endl;
} else {
for (int i = 0; i < K; i++) {
cout << str.at(i);
}
cout << "..." << endl;
}
}
| [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 80 |
#include <bits/stdc++.h>
#include <vector>
#define ll long long int
using namespace std;
int main() {
int i, j, k, n;
string s;
cin >> n;
cin >> s;
j = s.length();
if (n >= j) {
cout << s;
} else {
for (i = 0; i < n; i++) {
cout << s[i];
}
}
} | #include <bits/stdc++.h>
#include <vector>
#define ll long long int
using namespace std;
int main() {
int i, j, k, n;
string s;
cin >> n;
cin >> s;
j = s.length();
if (n >= j) {
cout << s;
} else {
for (i = 0; i < n; i++) {
cout << s[i];
}
cout << "...";
}
} | [["+", 75, 76, 0, 9, 0, 1, 0, 16, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]] | 1 | 82 |
<?php
$k = (int)trim(fgets(STDIN));
$s = trim(fgets(STDIN));
$len = strlen($s);
if ($s<=$k) {
echo $s;
} else {
echo substr($s, 0, $k).'...';
}
| <?php
$k = (int)trim(fgets(STDIN));
$s = trim(fgets(STDIN));
$len = strlen($s);
if ($len<=$k) {
echo $s;
} else {
echo substr($s, 0, $k).'...';
} | [["-", 0, 57, 15, 23, 0, 16, 31, 606, 0, 141], ["+", 0, 57, 15, 23, 0, 16, 31, 606, 0, 141]] | 6 | 68 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int k;
cin >> k >> s;
int size = s.size();
if (size <= k) {
cout << s << endl;
} else {
for (int i = 0; i < k; i++) {
cout << s.at(i);
}
cout << "…" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int k;
cin >> k >> s;
int size = s.size();
if (size <= k) {
cout << s << endl;
} else {
for (int i = 0; i < k; i++) {
cout << s.at(i);
}
cout << "..." << endl;
}
} | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 83 |
k = int(input())
s = input()
l = len(s)
if k <= l:
print(s)
if k > l:
print(s[0:k]+"...")
| k = int(input())
s = input()
l = len(s)
if k >= l:
print(s)
if k < l:
print(s[0:k]+"...",end='')
| [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 141, 22], ["+", 0, 1, 0, 652, 3, 4, 0, 653, 0, 32]... | 5 | 46 |
#include <bits/stdc++.h>
using namespace std;
#include <string>
int main() {
int k;
cin >> k;
string s;
string str = "...";
cin >> s;
string temp = "";
if (s.length() > k) {
for (int i = k; i < s.length(); i++) {
char c = s[i];
temp += c;
}
temp += str;
cout << temp << endl;
... | #include <bits/stdc++.h>
using namespace std;
#include <string>
int main() {
int k;
cin >> k;
string s;
string str = "...";
cin >> s;
string temp = "";
if (s.length() > k) {
for (int i = 0; i < k; i++) {
char c = s[i];
temp += c;
}
temp += str;
cout << temp << endl;
} else {
... | [["-", 64, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 64, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 7, 15, 16, 12, 2, 63, 118, 28, 22], ["-", 0, 7, 15, 16, 12, 2, 63, 118, 17, 131], ["-", 0, 7, 15, 16, 12, 2, 63, 118, 119, 120], ["-", 0, 7, 15, 16, 12, 2, 3, 4, 0, 24], ["-", 0, 7, 15, 16, 12, 2, 3, 4, 0, 25], ["+", 0, 57... | 1 | 107 |
n = int(input())
a = input()
if len(a) > n:
print(a[0:n+1]+'...')
else:
print(a ) | n = int(input())
a = input()
if len(a) > n:
print(a[0:n]+'...')
else:
print(a ) | [["-", 0, 657, 31, 206, 206, 663, 0, 657, 17, 72], ["-", 0, 657, 31, 206, 206, 663, 0, 657, 12, 612]] | 5 | 42 |
k = input()
s = input()
if len(s)>=int(k):
print(s)
else:
print(s[0:int(k)]+'...') | k = input()
s = input()
if len(s)<=int(k):
print(s)
else:
print(s[0:int(k)]+'...') | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19]] | 5 | 43 |
K = gets.to_i
S = gets.chomp
k = K - 1
if S.length > k
s = S.slice(0..k)
puts s + "..."
else
puts S
end | K = gets.to_i
S = gets.chomp
k = K - 1
if S.length > K
s = S.slice(0..k)
puts s + "..."
else
puts S
end | [["-", 36, 36, 0, 493, 0, 121, 15, 738, 12, 22], ["+", 36, 36, 0, 493, 0, 121, 15, 738, 12, 743]] | 4 | 41 |
k = int(input())
s = input()
ls = len(s)
if k >= ls:
print(s)
else:
for i in range(k):
print(s[i], end = "")
print("…") | k = int(input())
s = input()
ls = len(s)
if k >= ls:
print(s)
else:
for i in range(k):
print(s[i], end = "")
print("...") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 56 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e16;
const ll mod = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a,... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e16;
const ll mod = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a,... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 75, 76, 0, 9, 0, 14, 8, 9, 0, 46], ["-", 75, 76, 0, 9, 0, 14, 8, 9, 0, 46]] | 1 | 391 |
#include <bits/stdc++.h>
#include <string>
using namespace std;
int main() {
int K;
string str;
cin >> K;
cin >> str;
int len;
len = str.length();
if (len <= K)
cout << K << endl;
else {
for (int i = 0; i < K; i++) {
cout << str[i];
}
cout << "..." << endl;
}
return 0;
}
|
#include <bits/stdc++.h>
#include <string>
using namespace std;
int main() {
int K;
string str;
cin >> K;
cin >> str;
int len;
len = str.length();
if (len <= K)
cout << str << endl;
else {
for (int i = 0; i < K; i++) {
cout << str[i];
}
cout << "..." << endl;
}
return 0;
}
| [["-", 0, 57, 64, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 57, 64, 1, 0, 16, 31, 16, 12, 22]] | 1 | 88 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define rep1(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define repr(i, n) for (int i = 0, i##_len = (n); i < i##_len; --i)
#define REP(i, m, n) for (int i = int(m), i##_len = (n); i < i##_len; ++i)
#define VV(T) ve... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define rep1(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define repr(i, n) for (int i = 0, i##_len = (n); i < i##_len; --i)
#define REP(i, m, n) for (int i = int(m), i##_len = (n); i < i##_len; ++i)
#define VV(T) ve... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 151 |
K = int(input())
S = input()
if len(S) <= K:
print(S)
else:
print(S[K:] + "." * 3)
| K = int(input())
S = input()
if len(S) <= K:
print(S)
else:
print(S[0:K] + "." * 3)
| [["-", 3, 4, 0, 657, 31, 206, 206, 663, 0, 22], ["+", 3, 4, 0, 657, 31, 206, 206, 663, 0, 612], ["+", 3, 4, 0, 657, 31, 206, 206, 663, 0, 22]] | 5 | 41 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K;
string S;
cin >> K >> S;
if (S.size() < K) {
cout << S << endl;
return 0;
}
cout << S.substr(0, K) + "..." << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int K;
string S;
cin >> K >> S;
if (S.size() <= K) {
cout << S << endl;
return 0;
}
cout << S.substr(0, K) + "..." << endl;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 62 |
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
string s;
int k;
cin >> k >> s;
string ans = "";
if (s.length() == k)
ans = s;
else
ans = s.substr(0, k) + "...";
... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
string s;
int k;
cin >> k >> s;
string ans = "";
if ((int)s.length() <= k)
ans = s;
else
ans = s.substr(0, k) + ".... | [["+", 0, 57, 15, 339, 51, 16, 31, 74, 0, 24], ["+", 15, 339, 51, 16, 31, 74, 39, 77, 39, 40], ["+", 0, 57, 15, 339, 51, 16, 31, 74, 0, 25], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 95 |
#include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (i = 0; i < n; i++)
int main() {
int K;
string S;
cin >> K >> S;
if (S.size() < K) {
cout << S;
} else {
int i;
for (int i = 0; i < K; i++) {
cout << S[... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (i = 0; i < n; i++)
int main() {
int K;
string S;
cin >> K >> S;
if (S.size() <= K) {
cout << S;
} else {
int i;
for (int i = 0; i < K; i++) {
cout << S... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 94 |
K = int(input())
S = list(input())
length = len(S)
if length < K:
print(("".join(S)))
else:
result = S[:K]
print(("".join(result))+"...") | K = int(input())
S = list(input())
length = len(S)
if length <= K:
print(("".join(S)))
else:
result = S[:K]
print(("".join(result))+"...") | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19]] | 5 | 64 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
string s;
cin >> n >> s;
if (s.length() < n)
cout << s << endl;
else {
cout << s.substr(0, n) << "..." << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
string s;
cin >> n >> s;
if (s.length() <= n)
cout << s << endl;
else {
cout << s.substr(0, n) << "..." << endl;
}
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 61 |
k = int(input())
s = input()
s = s.lower()
ls = []
if len(s) < k:
print(s)
else:
result = s[:k]+"..."
print(result)
| k = int(input())
s = input()
s = s.lower()
ls = []
if len(s) <= k:
print(s)
else:
result = s[:k]+"..."
print(result)
| [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19]] | 5 | 53 |
K = int(input())
S = input()
if len(S)<=K:
print(S)
elif len(S) > K:
print(S[0:-K-1], end="...") | K = int(input())
S = input()
if len(S)<=K:
print(S)
elif len(S) > K:
print(S[0:K], end="...") | [["-", 0, 206, 206, 663, 0, 657, 31, 664, 17, 33], ["-", 3, 4, 0, 206, 206, 663, 0, 657, 17, 33], ["-", 3, 4, 0, 206, 206, 663, 0, 657, 12, 612]] | 5 | 51 |
import sys
input = sys.stdin.readline
def main():
if len(S) <= K:
print(S)
else:
print(S[:K]+"...")
if __name__ == "__main__":
K = int(input())
S = input()
main()
| import sys
input = sys.stdin.readline
def main():
if K >= len(S)-1:
print(S)
else:
print(S[:K]+"...")
if __name__ == "__main__":
K = int(input())
S = input()
main()
| [["+", 0, 14, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 14, 8, 196, 0, 57, 15, 666, 667, 20], ["-", 0, 14, 8, 196, 0, 57, 15, 666, 667, 19], ["-", 0, 14, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 33], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612]] | 5 | 63 |
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]+'...') | [["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72]] | 5 | 40 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int k, l;
char s[120];
scanf("%d", &k);
for (int i = 0; i < 120; ++i) {
scanf("%s", &s[i]);
}
l = strlen(s);
if (k >= l) {
for (int i = 0; i < l; ++i) {
printf("%c", s[i]);
}
return 0;
}
if (k < l) {
... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
int k, l;
char s[120];
scanf("%d", &k);
for (int i = 0; i < 120; ++i) {
scanf("%s", &s[i]);
}
l = strlen(s);
if (k >= l) {
for (int i = 0; i < l; ++i) {
printf("%c", s[i]);
}
return 0;
}
if (k < l) {
... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22]] | 0 | 155 |
#include <bits/stdc++.h>
using namespace std;
int arr[1000];
int main() {
int k;
string s;
cin >> k >> s;
if (s.size() <= k)
cout << s << endl;
else {
string s1 = "";
for (int i = 0; i < 7; i++)
cout << s[i];
cout << "..." << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int arr[1000];
int main() {
int k;
string s;
cin >> k >> s;
if (s.size() <= k)
cout << s << endl;
else {
string s1 = "";
for (int i = 0; i < k; i++)
cout << s[i];
cout << "..." << endl;
}
return 0;
} | [["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 13], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22]] | 1 | 87 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string n;
int k;
cin >> n >> k;
if (k < n.size()) {
n.erase(n.begin() + k, n.end());
cout << n;
cout << "...";
} else
cout << n;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
int k;
cin >> k >> n;
if (k < n.size()) {
n.erase(n.begin() + k, n.end());
cout << n;
cout << "...";
} else
cout << n;
return 0;
}
| [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 73 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K;
cin >> K;
string S;
cin >> S;
if (S.size() <= K) {
cout << S << endl;
}
if (S.size() > K) {
std::string str = S;
cin >> S;
std::string substr = str.substr(0, S.size() - K);
std::cout << substr << "..." << std::endl;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int K;
cin >> K;
string S;
cin >> S;
if (S.size() <= K) {
cout << S << endl;
}
if (S.size() > K) {
std::string str = S;
cin >> S;
std::string substr = str.substr(0, K);
std::cout << substr << "..." << std::endl;
}
}
| [["-", 3, 4, 0, 16, 31, 2, 63, 118, 28, 22], ["-", 3, 4, 0, 16, 31, 2, 63, 118, 17, 131], ["-", 3, 4, 0, 16, 31, 2, 63, 118, 119, 120], ["-", 3, 4, 0, 16, 31, 2, 3, 4, 0, 24], ["-", 3, 4, 0, 16, 31, 2, 3, 4, 0, 25], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33]] | 1 | 101 |
#include <bits/stdc++.h>
#include <cmath>
using namespace std;
int main() {
long long n;
cin >> n;
string s;
cin >> s;
if (s.size() >= n)
cout << s << endl;
else {
for (int i = 0; i < n; i++)
cout << s[i];
cout << "..." << endl;
}
}
| #include <bits/stdc++.h>
#include <cmath>
using namespace std;
int main() {
long long n;
cin >> n;
string s;
cin >> s;
if (s.size() <= n)
cout << s << endl;
else {
for (int i = 0; i < n; i++)
cout << s[i];
cout << "..." << endl;
}
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 77 |
K = input()
S = input()
K = int(K)
if (len(S) <= K):
print(S)
elif (len(S) > K):
M = S[K:]
print(M + "...") | K = input()
S = input()
K = int(K)
if (len(S) <= K):
print(S)
elif (len(S) > K):
M = S[:K]
print(M + "...") | [["-", 0, 1, 0, 662, 12, 206, 206, 663, 0, 22], ["+", 0, 1, 0, 662, 12, 206, 206, 663, 0, 22]] | 5 | 55 |
k = int(input())
s = input()
if len(s.lower())< k:
print(s)
else:
print(s.lower()[:k]+'...') | k = int(input())
s = input()
if len(s.lower())<= k:
print(s)
else:
print(s.lower()[:k]+'...') | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19]] | 5 | 47 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int K;
string S;
cin >> K;
cin >> S;
if (K >= sizeof(S)) {
cout << S << endl;
} else {
S = S.erase(K);
S = S + "...";
cout << S << endl;
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int K;
string S;
cin >> K;
cin >> S;
if (K >= S.length()) {
cout << S << endl;
} else {
S = S.erase(K);
S = S + "...";
cout << S << endl;
}
return 0;
} | [["-", 0, 57, 15, 339, 51, 16, 12, 105, 0, 150], ["-", 15, 339, 51, 16, 12, 105, 51, 23, 0, 24], ["+", 15, 339, 51, 16, 12, 2, 63, 118, 17, 131], ["+", 15, 339, 51, 16, 12, 2, 63, 118, 119, 120], ["+", 15, 339, 51, 16, 12, 2, 3, 4, 0, 24]] | 1 | 74 |
#include <stdio.h>
#include <string.h>
int main(void) {
char s[200];
int k;
scanf("%d", &k);
scanf("%s", s);
if (strlen(s) <= k) {
printf("%s", s);
} else {
for (int i = 0; i < k; i++) {
printf("%c", s[i]);
printf("...");
}
}
return 0;
} | #include <stdio.h>
#include <string.h>
int main(void) {
char s[200];
int k;
scanf("%d", &k);
scanf("%s", s);
if (strlen(s) <= k) {
printf("%s", s);
} else {
for (int i = 0; i < k; i++) {
printf("%c", s[i]);
}
printf("...");
}
return 0;
} | [["+", 75, 76, 0, 9, 0, 7, 8, 9, 0, 46], ["-", 75, 76, 0, 9, 0, 7, 8, 9, 0, 46]] | 0 | 100 |
k = int(input())
s = input()
i = ""
if len(s) <= k:
print(s)
else:
for j in range(k):
i = i + s[j]
print(i + '...') | k = int(input())
s = input()
i = ""
if len(s) <= k:
print(s)
else:
for j in range(k):
i = i + s[j]
print(i+"...") | [["-", 0, 652, 3, 4, 0, 657, 12, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 657, 12, 557, 0, 654], ["-", 0, 652, 3, 4, 0, 657, 12, 557, 0, 655], ["+", 0, 652, 3, 4, 0, 657, 12, 557, 0, 655]] | 5 | 55 |
#include <stdio.h>
#include <string.h>
int main(void) {
// Your code here!
int N, i;
char S[100];
scanf("%d", &N);
scanf("%s", S);
i = strlen(S);
if (i <= N) {
for (i = 0; S[i] != '\0'; i++) {
printf("%s\n", S);
break;
}
} else {
S[N] = '\0';
for (i = 0; S[i] != '\0'; i++)... | #include <stdio.h>
#include <string.h>
int main(void) {
// Your code here!
int N, i;
char S[100];
scanf("%d", &N);
scanf("%s", S);
i = strlen(S);
if (i <= N) {
for (i = 0; S[i] != '\0'; i++) {
printf("%s\n", S);
break;
}
} else {
S[N] = '\0';
for (i = 0; S[i] != '\0'; i++)... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 136 |
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]}{'...'}")
| 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]}{'...'}") | [["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 18], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 19], ["-", 0, 57, 75, 665, 15, 679, 12, 666, 667, 47], ["+", 0, 57, 75, 665, 15, 679, 12, 666, 667, 20]] | 5 | 63 |
i = int(input())
s = list(input())
if i <= len(s):
for j in range(i):
print(s[j],end="")
print("...")
else:
for j in range(len(s)):
print(s[j],end="") | i = int(input())
s = list(input())
if i < len(s):
for j in range(i):
print(s[j],end="")
print("...")
else:
for j in range(len(s)):
print(s[j],end="") | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18]] | 5 | 75 |
#include <bits/stdc++.h>
using namespace std;
int main() {
unsigned int num;
cin >> num;
string str;
cin >> str;
if (num > str.size()) {
cout << str << endl;
} else {
string substr = str.substr(0, num);
cout << substr << flush;
cout << "..." << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
unsigned int num;
cin >> num;
string str;
cin >> str;
if (num >= str.size()) {
cout << str << endl;
} else {
string substr = str.substr(0, num);
cout << substr << flush;
cout << "..." << endl;
}
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 74 |
a = int(input())
b = input()
if len(b) < a:
print(b[:a]+'...')
else:
print(b) | a = int(input())
b = input()
if len(b) > a:
print(b[:a]+'...')
else:
print(b) | [["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 47]] | 5 | 39 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
string s;
int k, i;
cin >> k;
getline(cin, s);
if (s.size() <= k)
cout << s;
else {
for (i = 0; i < k; i++)
cout << s[i];
cout << "...";
}
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string s;
int k, i;
cin >> k;
cin >> s;
if (s.size() <= k)
cout << s;
else {
for (i = 0; i < k; i++)
cout << s[i];
cout << "...";
}
} | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25]] | 1 | 75 |
#pragma region Macros
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i >= b; --i)
#define pii pair<int, int>
#define pll pair<ll, ll>
#def... | #pragma region Macros
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i >= b; --i)
#define pii pair<int, int>
#define pll pair<ll, ll>
#def... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 3,770 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int K;
string S;
cin >> K >> S;
int len = S.size();
if (K >= len) {
cout << S;
} else {
cout << S.erase(K + 1) + "...";
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int K;
string S;
cin >> K >> S;
int len = S.size();
if (K >= len) {
cout << S;
} else {
cout << S.erase(K) + "...";
}
} | [["-", 12, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["-", 12, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 63 |
import java.lang.*;
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int K = sc.nextInt();
String S = sc.nextLine();
if (S.length() <= K) {
System.out.println(" " + S);
} else {
String str = S.substring(0, K);
s... | import java.lang.*;
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int K = sc.nextInt();
sc.nextLine();
String S = sc.nextLine();
if (S.length() <= K) {
System.out.println(" " + S);
} else {
String str = S.subst... | [["+", 0, 195, 8, 196, 0, 1, 0, 492, 500, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 0, 131], ["+", 0, 195, 8, 196, 0, 1, 0, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 492, 3, 4, 0, 25], ["+", 8, 498, 0, 195, 8, 196, 0, 1, 0, 35]] | 3 | 121 |
K = int(input())
S = input()
SS = (int(len(S)))
if SS-K <= 0:
print(S)
else:
print((S[:K-SS])+('.'*(SS-K))) | K = int(input())
S = input()
SS = (int(len(S)))
if SS-K <= 0:
print(S)
else:
print((S[:K-SS])+('.'*3)) | [["-", 0, 657, 12, 23, 0, 657, 12, 23, 0, 24], ["-", 12, 23, 0, 657, 12, 23, 0, 657, 31, 22], ["-", 12, 23, 0, 657, 12, 23, 0, 657, 17, 33], ["-", 12, 23, 0, 657, 12, 23, 0, 657, 12, 22], ["-", 0, 657, 12, 23, 0, 657, 12, 23, 0, 25], ["+", 3, 4, 0, 657, 12, 23, 0, 657, 12, 612]] | 5 | 61 |
k = int(input())
s = input()
if len(s) > k:
print(s[0] + '...')
else:
print(s) | k = int(input())
s = input()
if len(s) > k:
print(s[0:k] + '...')
else:
print(s) | [["+", 3, 4, 0, 657, 31, 206, 206, 663, 0, 102], ["+", 3, 4, 0, 657, 31, 206, 206, 663, 0, 22]] | 5 | 38 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int S, a;
string K;
cin >> S;
cin >> K;
a = K.size();
if (a > S) {
K.erase(S);
cout << K << endl;
} else {
cout << K << endl;
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int S, a;
string K;
cin >> S;
cin >> K;
a = K.size();
if (a > S) {
K.erase(S);
cout << K << "..." << endl;
} else {
cout << K << endl;
}
return 0;
} | [["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151]] | 1 | 71 |
#include <iostream>
using namespace std;
int main() {
int k;
string s;
cin >> k >> s;
if (s.size() < k) {
for (int i = 0; i < s.size(); i++) {
cout << s[i];
}
} else {
for (int i = 0; i < k; i++) {
cout << s[i];
}
cout << "...";
}
cout << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int k;
string s;
cin >> k >> s;
if (s.size() <= k) {
for (int i = 0; i < s.size(); i++) {
cout << s[i];
}
} else {
for (int i = 0; i < k; i++) {
cout << s[i];
}
cout << "...";
}
cout << endl;
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 102 |
#include <stdio.h>
#include <string.h>
int main(void) {
int i, k;
char str[101];
scanf("%d", &k);
scanf("%s", str);
i = strlen(str);
if (i <= k) {
printf("%s", str);
} else {
char str2[k + 1];
strncpy(str2, str, k);
if (k > 0) {
str2[k] = '\0';
} else {
}
puts(str2);
... | #include <stdio.h>
#include <string.h>
int main(void) {
int i, k;
char str[101];
scanf("%d", &k);
scanf("%s", str);
i = strlen(str);
if (i <= k) {
printf("%s", str);
} else {
char str2[k + 1];
strncpy(str2, str, k);
if (k > 0) {
str2[k] = '\0';
} else {
}
strcat(str2, ... | [["-", 75, 76, 0, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]] | 0 | 127 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int k, size;
string s;
cin >> k;
cin >> s;
size = s.length();
if (size < k)
cout << s << endl;
else
cout << s.erase(k) << "..." << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int k, size;
string s;
cin >> k;
cin >> s;
size = s.length();
if (size <= k)
cout << s << endl;
else
cout << s.erase(k) << "..." << endl;
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 67 |
a = gets.chomp
b = gets.chomp
if a.to_i < b.length
p b.slice!(0, a.to_i) + "..."
else
p b
end
| a = gets.chomp
b = gets.chomp
if a.to_i < b.length
puts b.slice!(0, a.to_i) + "..."
else
puts b
end
| [["-", 0, 493, 0, 121, 64, 749, 0, 652, 735, 22], ["+", 0, 493, 0, 121, 64, 749, 0, 652, 735, 22], ["-", 0, 493, 0, 121, 75, 95, 0, 652, 735, 22], ["+", 0, 493, 0, 121, 75, 95, 0, 652, 735, 22]] | 4 | 37 |
n=int(input())
w=input()
wordlength=len(w)
if n>=wordlength: print(w)
else: print(w[:n]) | n=int(input())
w=input()
wordlength=len(w)
if n>=wordlength: print(w)
else: print(w[:n]+'...') | [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 652, 3, 4, 0, 657, 12, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 657, 12, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 657, 12, 557, 0, 655]] | 5 | 38 |
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) | [["-", 0, 1, 0, 662, 31, 206, 206, 657, 17, 33], ["-", 0, 1, 0, 662, 31, 206, 206, 657, 12, 612], ["+", 0, 662, 12, 206, 206, 663, 0, 657, 17, 72], ["+", 0, 662, 12, 206, 206, 663, 0, 657, 12, 612]] | 5 | 82 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.