Created
March 7, 2018 19:12
-
-
Save fredbr/dd96e031c77b50d6977d287325b689a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// codigo de gabriel pastori | |
#include <iostream> | |
#include <map> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
int main() { | |
int n; | |
cin>>n; | |
string s; | |
for(int i=0;i<n;i++){ | |
cin>>s; | |
if(s.size()>10){ | |
cout<<s[0]<<s.size()-2<<s[s.size()-1]<<endl; | |
}else{ | |
cout<<s<<endl; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment