Skip to content

Commit 265f0c3

Browse files
authored
Add files via upload
commit for the sol of 71A.cpp
1 parent 58b2107 commit 265f0c3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

71A.cpp

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include<bits/stdc++.h>
2+
//#include<conio.h>
3+
4+
5+
using namespace std;
6+
7+
int main()
8+
{
9+
int n;
10+
string s;
11+
cin >> n;
12+
13+
while (n--)
14+
{
15+
cin >> s;
16+
int x = s.length();
17+
if (x > 10)
18+
{
19+
cout << s[0] << x - 2 << s[x - 1] << endl;
20+
}
21+
else
22+
{
23+
cout << s << endl;
24+
}
25+
}
26+
return 0;
27+
}

0 commit comments

Comments
 (0)