Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <iostream>
- #include <algorithm>
- #include <cmath>
- #include <string>
- #include <vector>
- #include <map>
- #include <set>
- #include <queue>
- #include <assert.h>
- using namespace std;
- #define ll long long
- #define ull unsigned long long
- const ll INF = 1e18;
- const double PI = acos(-1.0);
- int main()
- {
- //freopen("INPUT.TXT", "r", stdin);
- //freopen("OUTPUT.TXT", "w", stdout);
- ios::sync_with_stdio(false);
- int m;
- cin >> m;
- for (int i = 0; i < m; i++)
- {
- string s;
- cin >> s;
- int n = s.size();
- if (n <= 10)
- {
- cout << s << endl;
- }
- else
- {
- cout << s[0] << n - 2 << s[n - 1] << endl;
- }
- }
- //system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement