criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
using namespace 

int main(void){

  char str[] ;
  cin >> str ;

  int i = 0;
  while(str[i] != "\0"){
    
    i ++ ;
    
  }

  cout << str[0] << i-2 << str[i]<<endl;

  return 0;
}

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main(void){
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main(void){
      | ~~~             
a.cc: In function 'int main()':
a.cc:6:8: error: storage size of 'str' isn't known
    6 |   char str[] ;
      |        ^~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> str ;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout << str[0] << i-2 << str[i]<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout << str[0] << i-2 << str[i]<<endl;
      |                                    ^~~~
      |                                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace 

int main(){

  char str[] ;
  cin >> str ;

  int i = 0;
  while(str[i] != "\0"){
    
    i ++ ;
    
  }

  cout << str[0] << i-2 << str[i]<<endl;

  return 0;
}

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main(){
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main(){
      | ~~~             
a.cc: In function 'int main()':
a.cc:6:8: error: storage size of 'str' isn't known
    6 |   char str[] ;
      |        ^~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> str ;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout << str[0] << i-2 << str[i]<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout << str[0] << i-2 << str[i]<<endl;
      |                                    ^~~~
      |                                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  int n = s.size();
  cout << s[0] + n + s[s.size] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
    8 |   cout << s[0] + n + s[s.size] << endl;
      |                       ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1076:7: note: declared here
 1076 |       size() const _GLIBCXX_NOEXCEPT
      |       ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string a;
	int len;
	cin>>a;
	len=a.size();
	cout<<a[0]<<len-2<<a[len-1]
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:36: error: expected ';' before '}' token
    9 |         cout<<a[0]<<len-2<<a[len-1]
      |                                    ^
      |                                    ;
   10 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    string s;
    cin>>s;
    cout<<s[0]+itoa(s.size()-2)+s[s.size()-1]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'itoa' was not declared in this scope
    7 |     cout<<s[0]+itoa(s.size()-2)+s[s.size()-1]<<endl;
      |                ^~~~
Language: C++

#include<bits/sdtdc++.h>
using namespace std;
int main(){
    char c,k;
    int ans=0;
    scanf("%c",&c);
    printf("%c",c);
    while(c=getchar()){
        if(c==' '||c=='\n')
            break;
        ans++;
        k=c;
    }
    printf("%d%c",ans-1,k);
    return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/sdtdc++.h: No such file or directory
    1 | #include<bits/sdtdc++.h>
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    char a[10000]
    cin>>s;
    cout<<a[0]<<strlen(a)-2<<a[strlen(a)-1];
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: expected initializer before 'cin'
    5 |     cin>>s;
      |     ^~~
a.cc:6:11: error: 'a' was not declared in this scope
    6 |     cout<<a[0]<<strlen(a)-2<<a[strlen(a)-1];
      |           ^
a.cc:7:14: error: expected '}' at end of input
    7 |     return 0;
      |              ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <string>
#include <iostream>

string st;

int main()
{
    cin>>st;
    cout<<st[0]<<st.size()-2<<st[st.size()-1]<<endl;
}

Compiler output:
a.cc:4:1: error: 'string' does not name a type; did you mean 'stdin'?
    4 | string st;
      | ^~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin>>st;
      |     ^~~
      |     std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:10: error: 'st' was not declared in this scope; did you mean 'std'?
    8 |     cin>>st;
      |          ^~
      |          std
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<st[0]<<st.size()-2<<st[st.size()-1]<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:48: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout<<st[0]<<st.size()-2<<st[st.size()-1]<<endl;
      |                                                ^~~~
      |                                                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
	string s;
	cin >> s;

	cout << s[0] << (s.size - 2) << s[(s.size - 1)] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |         cout << s[0] << (s.size - 2) << s[(s.size - 1)] << endl;
      |                          ~~^~~~
      |                                ()
a.cc:9:46: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |         cout << s[0] << (s.size - 2) << s[(s.size - 1)] << endl;
      |                                            ~~^~~~
      |                                                  ()
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
	string s;
	cin >> s;

	cout << s[0] << s.size - 2 << s[s.size - 1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |         cout << s[0] << s.size - 2 << s[s.size - 1] << endl;
      |                         ~~^~~~
      |                               ()
a.cc:9:43: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |         cout << s[0] << s.size - 2 << s[s.size - 1] << endl;
      |                                         ~~^~~~
      |                                               ()
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
	string s;
	cin>>s;
	cout<<s[0]<<s.size()-2<<c[s.size()-1]<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:33: error: 'c' was not declared in this scope
    6 |         cout<<s[0]<<s.size()-2<<c[s.size()-1]<<endl;
      |                                 ^
Language: C++

#include<cstdio>
#include<cstring>
using namespace std;
int main(){
    string s;
    getline(cin,s);
    printf("%c%d%c",s[0],s.length()-2,s[s.length()-1]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string s;
      |     ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    2 | #include<cstring>
  +++ |+#include <string>
    3 | using namespace std;
a.cc:6:13: error: 'cin' was not declared in this scope
    6 |     getline(cin,s);
      |             ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<cstring>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:6:17: error: 's' was not declared in this scope
    6 |     getline(cin,s);
      |                 ^
Language: C

#include<stdio.h>
#include<string.h>


int main(){
 char s[101];
 scnaf("%s", s);
 int str = strlen(s);
 printf("%c%d%c\n", s[0],str-2,s[str-1]);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:2: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |  scnaf("%s", s);
      |  ^~~~~
      |  scanf
Language: C

#include<stdio.h>

int str_length(const char s[]){
  int len = 0;
  while(s[len])
  len++;
  return len;
}
int main(){
 char s[101];
 scnaf("%s", s);
 int strlen = str_length(s);
 printf("%c%d%c\n", s[0],strlen-2,s[strlen-1]);
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:2: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   11 |  scnaf("%s", s);
      |  ^~~~~
      |  scanf
Language: C++

#include<algorithm>
#include <iostream>
#include<cstdio>
#include<cmath>
#include<iomanip>
#include<string>
using namespace std;
int main() {

	string s;
	cin >> s;

	int l = s.length();


	cout << s[0] << l << s[l - 1] << endl;


	}

	return 0;
}

Compiler output:
a.cc:21:9: error: expected unqualified-id before 'return'
   21 |         return 0;
      |         ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <iostream>
#include <string>
using name space
int  main() {
      string s;
      cin >> s;
      int num = s.length();
      
      cout << s[0] << num-2 << s[num-1] << endl;
      
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'name'
    3 | using name space
      |       ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
char a[1000001];
int la;
int main()
{
	cin>>a;
	la=strlen(a);
	cout<<a[0]<<la-2<<a[n-1]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |         cout<<a[0]<<la-2<<a[n-1]<<endl;
      |                             ^
      |                             yn
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  string s;
  cin >> s;

  cout << s[0](s.size - 2)s[n] << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    8 |   cout << s[0](s.size - 2)s[n] << endl;
      |                ~~^~~~
      |                      ()
a.cc:8:26: error: expression cannot be used as a function
    8 |   cout << s[0](s.size - 2)s[n] << endl;
      |                          ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  string s;
  cin >> s;
  int i =s,length();
  cout << s[1] << i-2 <<s[-1] <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in initialization
    8 |   int i =s,length();
      |          ^
      |          |
      |          std::string {aka std::__cxx11::basic_string<char>}
a.cc:8:18: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    8 |   int i =s,length();
      |                  ^~
a.cc:8:18: note: remove parentheses to default-initialize a variable
    8 |   int i =s,length();
      |                  ^~
      |                  --
a.cc:8:18: note: or replace parentheses with braces to value-initialize a variable
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main();
{
  string s;
  cin >> s;
  int i;
  i = len(s)-2;
  string(i);
  cout << s[0] + i + s[-1] <<endl;
}

Compiler output:
a.cc:5:1: error: expected unqualified-id before '{' token
    5 | {
      | ^
Language: C++

#include <iostream>
#include<algorithm>
#include<map>

using namespace std;
 
int main(void){
	
	string s;
	
	cout << s[0] << length(s)-2 << s[length(s)];
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: 'length' was not declared in this scope
   11 |         cout << s[0] << length(s)-2 << s[length(s)];
      |                         ^~~~~~
Language: C++

#incude<bits/stdc++.h>
using namespace std;

int main(){
  string s; cin>>s;
  int t=s.size()-2;
  cout<<s[0]<<t<<s.end()<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s; cin>>s;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #incude<bits/stdc++.h>
a.cc:5:13: error: 'cin' was not declared in this scope
    5 |   string s; cin>>s;
      |             ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incude<bits/stdc++.h>
a.cc:5:18: error: 's' was not declared in this scope
    5 |   string s; cin>>s;
      |                  ^
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout<<s[0]<<t<<s.end()<<endl;
      |   ^~~~
a.cc:7:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:27: error: 'endl' was not declared in this scope
    7 |   cout<<s[0]<<t<<s.end()<<endl;
      |                           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incude<bits/stdc++.h>
Language: C++

#include<iostream>
#include<stdio.h>

using namespace std;

int main()
{ string S; cin >> S;
 int c = S.size();
 cout << S[0] << c - 2 << s[c-1];
 return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: 's' was not declared in this scope
    9 |  cout << S[0] << c - 2 << s[c-1];
      |                           ^
Language: C++

#include "bits/stdc++.h"
using ll = long long;
using namespace std;
int main(){
string a,b="",c;
cin>>a;
c.pushback(a[0]);
int mm = a.size()-2;
string h = to_string(mm);
c+=h;
c.push_back(a[a.end()]);
cout<<c<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pushback'; did you mean 'push_back'?
    7 | c.pushback(a[0]);
      |   ^~~~~~~~
      |   push_back
a.cc:11:14: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator')
   11 | c.push_back(a[a.end()]);
      |              ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1247:29: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |                   ~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1265 |       operator[](size_type __pos)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1265:28: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1265 |       operator[](size_type __pos)
      |                  ~~~~~~~~~~^~~~~
Language: C++

#include "bits/stdc++.h"
using ll = long long;
using namespace std;
int main(){
string a,b="",c;
cin>>a;
c.pushback(a[0]);
int mm = a.size()-2;
string h = t_str0ing(mm);
c+=h;
c.push_back(a[a.end()]);
cout<<c<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pushback'; did you mean 'push_back'?
    7 | c.pushback(a[0]);
      |   ^~~~~~~~
      |   push_back
a.cc:9:12: error: 't_str0ing' was not declared in this scope
    9 | string h = t_str0ing(mm);
      |            ^~~~~~~~~
a.cc:11:14: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator')
   11 | c.push_back(a[a.end()]);
      |              ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1247:29: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |                   ~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1265 |       operator[](size_type __pos)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1265:28: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1265 |       operator[](size_type __pos)
      |                  ~~~~~~~~~~^~~~~
Language: C++

#include "bits/stdc++.h"
using ll = long long;
using namespace std;
int main(){
string a,b="",c;
cin>>a;
c.pushback(a[0]);
int mm = a.size()-2;
string h = t_string(mm);
c+=h;
c.push_back(a[a.end()]);
cout<<c<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pushback'; did you mean 'push_back'?
    7 | c.pushback(a[0]);
      |   ^~~~~~~~
      |   push_back
a.cc:9:12: error: 't_string' was not declared in this scope
    9 | string h = t_string(mm);
      |            ^~~~~~~~
a.cc:11:14: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator')
   11 | c.push_back(a[a.end()]);
      |              ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1247:29: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |                   ~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1265 |       operator[](size_type __pos)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1265:28: note:   no known conversion for argument 1 from 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1265 |       operator[](size_type __pos)
      |                  ~~~~~~~~~~^~~~~
Language: C++

#inclue <bits/stdc++.h>
using namespace std;
int main(){
  string s; cin >> s;
  cout << s[0] << s.size() << s.back() << endl;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue <bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s; cin >> s;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #inclue <bits/stdc++.h>
a.cc:4:13: error: 'cin' was not declared in this scope
    4 |   string s; cin >> s;
      |             ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclue <bits/stdc++.h>
a.cc:4:20: error: 's' was not declared in this scope
    4 |   string s; cin >> s;
      |                    ^
a.cc:5:3: error: 'cout' was not declared in this scope
    5 |   cout << s[0] << s.size() << s.back() << endl;
      |   ^~~~
a.cc:5:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:5:43: error: 'endl' was not declared in this scope
    5 |   cout << s[0] << s.size() << s.back() << endl;
      |                                           ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inclue <bits/stdc++.h>
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>

using namespace std;
typedef long long ll;

int main(){
    srting s;
    cin >> s;
    cout << s[0];
    cout << s.size()-2 << s[s.size()-1] << endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'srting' was not declared in this scope
   10 |     srting s;
      |     ^~~~~~
a.cc:11:12: error: 's' was not declared in this scope
   11 |     cin >> s;
      |            ^
Language: C++

#include<iostream>
using namespace std;
 
main(){
	str S;
	cin >> S;
	int L = S.size();
	cout << S[0] << L-2 << S[L-1] << endl;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |         str S;
      |         ^~~
      |         std
a.cc:6:16: error: 'S' was not declared in this scope
    6 |         cin >> S;
      |                ^
Language: C++

#include<iostream>
using namespace std;
 
main(){
	str S;
	cin >> S;
	int L = S.size();
	cout << S[0] + (L-2) + S[L-1] << endl;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |         str S;
      |         ^~~
      |         std
a.cc:6:16: error: 'S' was not declared in this scope
    6 |         cin >> S;
      |                ^
Language: C++

#include<iostream>
using namespace std;

main(){
	str S;
	int L = S.size();
	cout << S[0] + (L-2) + S[L] << endl;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |         str S;
      |         ^~~
      |         std
a.cc:6:17: error: 'S' was not declared in this scope
    6 |         int L = S.size();
      |                 ^
Language: C++

#include<iostream>
using namespace std;

main(){
	int S;
	int L = S.size();
	cout << S[0] + (L-2) + S[L] << endl;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:19: error: request for member 'size' in 'S', which is of non-class type 'int'
    6 |         int L = S.size();
      |                   ^~~~
a.cc:7:18: error: invalid types 'int[int]' for array subscript
    7 |         cout << S[0] + (L-2) + S[L] << endl;
      |                  ^
a.cc:7:33: error: invalid types 'int[int]' for array subscript
    7 |         cout << S[0] + (L-2) + S[L] << endl;
      |                                 ^
Language: C++

#include<iostream>
using namespace std;

main(){
	int S;
	int L = s.size();	
	cout << S[0] + (L-2) + S[L] << endl;
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:17: error: 's' was not declared in this scope
    6 |         int L = s.size();
      |                 ^
a.cc:7:18: error: invalid types 'int[int]' for array subscript
    7 |         cout << S[0] + (L-2) + S[L] << endl;
      |                  ^
a.cc:7:33: error: invalid types 'int[int]' for array subscript
    7 |         cout << S[0] + (L-2) + S[L] << endl;
      |                                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  
  cout << s.at(0) << s.size() - 2 << s.at(s.size - 1) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:45: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    8 |   cout << s.at(0) << s.size() - 2 << s.at(s.size - 1) << endl;
      |                                           ~~^~~~
      |                                                 ()
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
REP(i,v.size()){if(i)os<<" ";os<<v[i];}return os;}
template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
REP(i,v.size()){if(i)os<<endl;os<<v[i];}return os;}

int main() {
    // Write Your Code Below
   string a,;
   cin >>a;
   cout << s[0]<< s.size()-2 << s[s.size()-1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: expected unqualified-id before ';' token
   19 |    string a,;
      |             ^
a.cc:21:12: error: 's' was not declared in this scope
   21 |    cout << s[0]<< s.size()-2 << s[s.size()-1] << endl;
      |            ^
Language: C++


#include <iostream>
int main() {
  string s; cin >> s;
string ans = s.front() + to_string(s.size()-2) + s.back();
cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string s; cin >> s;
      |   ^~~~~~
a.cc:4:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:13: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   string s; cin >> s;
      |             ^~~
      |             std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:20: error: 's' was not declared in this scope
    4 |   string s; cin >> s;
      |                    ^
a.cc:5:7: error: expected ';' before 'ans'
    5 | string ans = s.front() + to_string(s.size()-2) + s.back();
      |       ^~~~
      |       ;
a.cc:6:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 | cout << ans << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 | cout << ans << endl;
      |         ^~~
      |         abs
a.cc:6:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 | cout << ans << endl;
      |                ^~~~
      |                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

//#include <bits/stdc++.h>
#include <vector>
#include <iostream>
using namespace std;

int main(){
    string s;
    cin>>s;
    cout<<s[0]<<s.length()-2<<s[s.length()-1]<,endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:47: error: expected primary-expression before ',' token
    9 |     cout<<s[0]<<s.length()-2<<s[s.length()-1]<,endl;
      |                                               ^
Language: C++


#include<cmath>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
    string bs;
    getline(cin,bs);
    printf("%c %d %c",bs[0],bs.length()-2,bs[bs.length()-1]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'string' was not declared in this scope
    8 |     string bs;
      |     ^~~~~~
a.cc:6:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    5 | #include<algorithm>
  +++ |+#include <string>
    6 | using namespace std;
a.cc:9:13: error: 'cin' was not declared in this scope
    9 |     getline(cin,bs);
      |             ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include<algorithm>
  +++ |+#include <iostream>
    6 | using namespace std;
a.cc:9:17: error: 'bs' was not declared in this scope; did you mean 'abs'?
    9 |     getline(cin,bs);
      |                 ^~
      |                 abs
Language: C

#include<stdio.h>
#define N 100
int main(void){
  char a[N];
  int x=0;
  scanf("%s",a);
  while(*a ++! ='\0')
    ++x;
  printf("%d%d%d",a[0],x-2,a[x-1]);
 
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:12: error: lvalue required as increment operand
    7 |   while(*a ++! ='\0')
      |            ^~
main.c:7:14: error: expected ')' before '!' token
    7 |   while(*a ++! ='\0')
      |        ~     ^
      |              )
Language: C

#include<stdio.h>
#define N 100
int main(void){
  char a[N];
  int x=0;
  scanf("%s",a[N]);
  while(*a ++! ='\0')
    ++x;
  printf("%d%d%d",a[0],x-2,a[x-1]);
 
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:12: error: lvalue required as increment operand
    7 |   while(*a ++! ='\0')
      |            ^~
main.c:7:14: error: expected ')' before '!' token
    7 |   while(*a ++! ='\0')
      |        ~     ^
      |              )
Language: C

#include<stdio.h>
#define N 50
int main(void){
  int a[N];
  int x;
  scanf("%s",a[N]);
  while(*a ++! ='\0')
    ++x;
  printf("%d%d%d",a[0],x-2,a[x-1]);
 
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:12: error: lvalue required as increment operand
    7 |   while(*a ++! ='\0')
      |            ^~
main.c:7:14: error: expected ')' before '!' token
    7 |   while(*a ++! ='\0')
      |        ~     ^
      |              )
Language: C

#include<stdio.h>
int main(void){
  int a[];
  int x;
  scanf("%s",a[]);
  while(*a ++! ='\0')
    ++x;
  printf("%d%d%d",a[0],x-2,a[x-1]);
 
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:7: error: array size missing in 'a'
    3 |   int a[];
      |       ^
main.c:5:16: error: expected expression before ']' token
    5 |   scanf("%s",a[]);
      |                ^
main.c:6:12: error: lvalue required as increment operand
    6 |   while(*a ++! ='\0')
      |            ^~
main.c:6:14: error: expected ')' before '!' token
    6 |   while(*a ++! ='\0')
      |        ~     ^
      |              )
Language: C

    #include <stdio.h>
    #include<string.h>
    int main(void) {
      int i,j,A,cou;
      char S[101];
      scnaf("%s",S);
      A=strlen(S);
      for(i=1;i<A-1;i++){
          cou++;
      }
      printf("i%dn",cou);
      return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:6:7: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |       scnaf("%s",S);
      |       ^~~~~
      |       scanf
Language: C++

#include <bits/stdc++.h>
using namespace std;

int maiin(){
  string s;
  cin >>s;
  int l=s.size();
  cout <<s[0] <<l-2 <<s[l-1] <<endl;
}

Compiler output:
a.cc: In function 'int maiin()':
a.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
    9 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
    string s,ans;
    cin >> s;
  	ans="";
    int lon=s.len;
  ans[0]=s[0];
  if(lon-2>9){ ans[1]=lon/10;ans[2]=lon%10;ans[3]=s[lon-1];}
  else{ans[1]=lon%10;ans[2]=s[lon-1];}
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'len'
    9 |     int lon=s.len;
      |               ^~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
long long inf=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
long long gcd(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd(b,a%b);
  }
}
long long lcm(long long x, long long y){
  return (x/gcd(x,y))*y;
}

using namespace std;
int main(){
  string s;
  cin>>s;
  int num;
  num = s.size()-2;
  string ans="";
  ans += s[0];
  ans += (char)(num + '0');
  ans += s[s.size()-1];
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'long long int gcd(long long int, long long int)':
a.cc:12:5: error: 'swap' was not declared in this scope
   12 |     swap(a,b);
      |     ^~~~
a.cc:12:5: note: suggested alternatives:
In file included from /usr/include/c++/14/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
                 from a.cc:1:
/usr/include/c++/14/bits/regex.h:2230:5: note:   'std::__cxx11::swap'
 2230 |     swap(match_results<_Bi_iter, _Alloc>& __lhs,
      |     ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:61,
                 from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
  226 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
In file included from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/stdexcept:38,
                 from /usr/include/c++/14/system_error:43,
                 from /usr/include/c++/14/bits/ios_base.h:46,
                 from /usr/include/c++/14/streambuf:43,
                 from /usr/include/c++/14/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/14/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/bits/exception_ptr.h:229:5: note:   'std::__exception_ptr::swap'
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
In file included from /usr/include/c++/14/filesystem:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_path.h:736:15: note:   'std::filesystem::__cxx11::swap'
  736 |   inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); }
      |               ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
  string s;
  int count = s.size() - 2;
  cout << s[0] + itoa(count) + s[count + 1] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'itoa' was not declared in this scope
    7 |   cout << s[0] + itoa(count) + s[count + 1] << endl;
      |                  ^~~~
Language: C++

#include <iostream>
#include <string>
string s;
using namespace std;
int main() {
  int count = s.size() - 2;
  cout << s.begin() << count << s.end() << endl;
}

Compiler output:
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
    3 | string s;
      | ^~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:6:15: error: 's' was not declared in this scope
    6 |   int count = s.size() - 2;
      |               ^
Language: C++

#include <iostream>
#include <string>
string s;
int main() {
  int count = s.size() - 2;
  cout << s.begin() << count << s.end() << endl;
}

Compiler output:
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
    3 | string s;
      | ^~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:5:15: error: 's' was not declared in this scope
    5 |   int count = s.size() - 2;
      |               ^
a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout << s.begin() << count << s.end() << endl;
      |   ^~~~
      |   std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:44: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << s.begin() << count << s.end() << endl;
      |                                            ^~~~
      |                                            std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
  string s;
  cin >> s;
  int i = 0;
  int l = strlen(s.c_str());
  cout << s[0] << (l-2) << s[l-1] << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'strlen' was not declared in this scope
   11 |   int l = strlen(s.c_str());
      |           ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include <stdio.h>

using namespace std;

int main ()
{
  string in;

  cin >> in;

  printf("%c%d%c\n", in[0], in.size()-2, in[in.size()-1]);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'string' was not declared in this scope
    7 |   string in;
      |   ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include <stdio.h>
  +++ |+#include <string>
    2 | 
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> in;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | 
a.cc:9:10: error: 'in' was not declared in this scope; did you mean 'int'?
    9 |   cin >> in;
      |          ^~
      |          int
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <math.h>
#include <stdio.h>
#include <ctype.h>
#include <ios> 
#include <iomanip>
using namespace std;

#define N_MAX   (100000)
#define LL_MAX_NUM (1LL<<60)
#define INF 1e7

typedef long long ll;
typedef long long int lli;

int main() {
    string s, res;
	cin >> s;
    cout << s[0]+to_string(s.size()-2)+s[s.size()-1]; << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:55: error: expected primary-expression before '<<' token
   26 |     cout << s[0]+to_string(s.size()-2)+s[s.size()-1]; << endl;
      |                                                       ^~
Language: Java

import java.util.*;

public class i18n{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String S[] = s.split("");
    System.out.printf("%s",S[0]);
    System.out.printf("%d",s.length()-2);
    System.out.println(S[s.length()-1]);
  }
}


Compiler output:
Main.java:3: error: class i18n is public, should be declared in a file named i18n.java
public class i18n{
       ^
1 error
Language: Java

import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
	String a =	sc.next();
        System.out.println(a.charAt(0) + "" + a.length()-2 + "" + a.charAt(a.length()-1));
    }
}


Compiler output:
Main.java:6: error: bad operand types for binary operator '-'
        System.out.println(a.charAt(0) + "" + a.length()-2 + "" + a.charAt(a.length()-1));
                                                        ^
  first type:  String
  second type: int
1 error
Language: C

#include<stdio.h>

int main(){
    int len;
    char s[101];
    scanf("%s", s);

    for(int len=0; s[len]!='\0'; len++){
    printf("%c%d%c", s[0], len-2, s[len-1]);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:1: error: expected declaration or statement at end of input
   11 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int len,n;
string st;
int main()
{
    cin>>n;
    for(int i=1;i<=n;i++)
    {
    cin>>st;
    len=st.length();
    cout<<st[0]<<len-2<<st[len-1]<<endl;
    else cout<<st<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else cout<<st<<endl;
      |     ^~~~