Skip to content

Commit bf8325c

Browse files
committed
Create way_too_long_words_71A.cpp
1 parent 7f47658 commit bf8325c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

way_too_long_words_71A.cpp

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include <iostream>
2+
#include<string>
3+
using namespace std;
4+
5+
int main()
6+
{
7+
int n;
8+
string str;
9+
cin >> n;
10+
11+
while(n-- > 0)
12+
{
13+
cin >> str;
14+
15+
if(str.length() > 10)
16+
{
17+
cout << str.at(0) << str.length()-2 << str.at(str.length()-1) << endl;
18+
}
19+
else
20+
{
21+
cout << str << endl;
22+
}
23+
24+
}
25+
return 0;
26+
}
27+
28+

0 commit comments

Comments
 (0)