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