fork download
  1. #include <iostream>
  2. #include<cstring>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int a;
  8. cin >>a;
  9. for(int i=0;i<a;i++) {
  10. string r;
  11. cin >>r;
  12. if (r.size() <=10){
  13. cout <<r<<endl;
  14. }else {
  15. cout <<r[0]<<r.size()-2<<r[r.size()-1];
  16. }
  17. }
  18.  
  19.  
  20. return 0;
  21. }
  22.  
Runtime error #stdin #stdout 0.18s 3144KB
stdin
Standard input is empty
stdout