Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define int long long
- signed main()
- {
- int t;
- cin >> t;
- while(t--){
- string s;
- cin >> s;
- int n = s.size();
- if(n <= 10){
- cout << s << endl;
- }else{
- cout << s[0] << (n - 2) << s[n - 1] << endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement