Skip to content

Instantly share code, notes, and snippets.

@fredbr
Created March 7, 2018 19:12
Show Gist options
  • Save fredbr/dd96e031c77b50d6977d287325b689a6 to your computer and use it in GitHub Desktop.
Save fredbr/dd96e031c77b50d6977d287325b689a6 to your computer and use it in GitHub Desktop.
// 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