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

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<windows.h> 
using namespace std;
string s;
long long l,ans;
int main()
{
    cin>>s;
    l=s.size();
    ans=l-2;
    cout<<s[0]<<ans<<s[l-1];
    return 0;    
} 


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

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

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 's' was not declared in this scope
    9 |     l=s.size();
      |       ^
Language: C++


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

int main()
{
    string a;
    int l;
    cin>>a;
    len=s.size();
    cout<<a[0]<<l-2<<a[l-1];

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'len' was not declared in this scope
   10 |     len=s.size();
      |     ^~~
a.cc:10:9: error: 's' was not declared in this scope
   10 |     len=s.size();
      |         ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<string>
using namespace std;
char s[10000];
int main(){
    gets(s);
    cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(s);
      |     ^~~~
      |     getw
a.cc:9:17: error: 'strlen' was not declared in this scope
    9 |     cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
      |                 ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<cstdio>
  +++ |+#include <cstring>
    4 | #include<string>
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<cmath>
using namespace std;
char s[10000];
int main(){
    gets(s);
    cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
char s[10000];
int main(){
    gets(s);
    cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(s);
      |     ^~~~
      |     getw
a.cc:7:17: error: 'strlen' was not declared in this scope
    7 |     cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
      |                 ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include<iostream>
#include<string>

int main() {
  string str;
  std::cin >> str;
  std::cout << str.at(0) << str.size() -2 << str.back() << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string str;
      |   ^~~~~~
a.cc:5: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:1:
/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:6:15: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |   std::cin >> str;
      |               ^~~
      |               std
Language: C++

#include<iostream>
#include<string>
int main(void){
  std::string s;
  std::cin >> s;
  std::cout << s[0] << s.size() << s[s.end()] << std::endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:37: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::iterator')
    6 |   std::cout << s[0] << s.size() << s[s.end()] << std::endl;
      |                                     ^
In file included from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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 namespace std;
int main(){
  sting s;
  cin >> s;
  int x=s.size();
  string ans = s[0]+s.size()+s[x-1];
  cout << ans << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  sting s;
  cin >> s;
  int x=s.size();
  string ans = s[0]+s.size()+s[x-1];
  cout << ans << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'sting' was not declared in this scope
    4 |   sting s;
      |   ^~~~~
a.cc:5:10: error: 's' was not declared in this scope
    5 |   cin >> s;
      |          ^
a.cc:8:23: error: expected '}' at end of input
    8 |   cout << ans << endl;
      |                       ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
string s;
int main()
{
    gets(s);
    int l=strlen(s);
    cout<<s[0]<<l-2<<s[l-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(s);
      |     ^~~~
      |     getw
a.cc:7:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    7 |     int l=strlen(s);
      |                  ^
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |     gets(s);
      |     ^~~~
      |     getw
a.cc:6:40: error: expected ')' before ']' token
    6 |     cout<<s[0]<<strlen(s)-2<<s[strlen(s]-1];}
      |                                      ~ ^
      |                                        )
Language: C++

#include<iostream>
#include<bits/stdc++.h>
using namespace std;
char s[100000];
int main()
{
    gets(s);
    cout<<s[0]<<strlen(s)-2<<s[strlen(S)-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(s);
      |     ^~~~
      |     getw
a.cc:8:39: error: 'S' was not declared in this scope
    8 |     cout<<s[0]<<strlen(s)-2<<s[strlen(S)-1];
      |                                       ^
Language: C++

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

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

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

int main () {
    string s; cin >> s;
    char start = s[0], end = s[s.size() = 1];
    printf("%c%d%c", start, s.size() - 2, end);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:38: error: lvalue required as left operand of assignment
    7 |     char start = s[0], end = s[s.size() = 1];
      |                                ~~~~~~^~
Language: C++

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


Compiler output:
a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'?
    2 | string s;
      | ^~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin>>s;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:5:10: error: 's' was not declared in this scope
    5 |     cin>>s;
      |          ^
a.cc:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout<<s[0]<<s.size()-2<<s[s.size()-1];
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<string>
#include<iostream>
using namespace std;
int main()
{
    string str;
    cin>>str;
    cout<<str[0]<<str.length()-2<<str[sr.length()-1]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:39: error: 'sr' was not declared in this scope; did you mean 'str'?
    8 |     cout<<str[0]<<str.length()-2<<str[sr.length()-1]<<endl;
      |                                       ^~
      |                                       str
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<fstream>
#include<cstdlib>
#include<iomanip>
#include<string>
#include<cstring>
#include<cmath>
#include<cfloat>
using namespace std;

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

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

#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<string>
#include<cstring>

using namespace std;
string a;
int main()
{
	cin>>a;
	cout<<a[0]<<a.size()-2<<a[s.size()-1];
	return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
char s[10000];//定义
int main()
{
    gets(s);//输入
    cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];//输出
    return 0;//完美结束
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(s);//输入
      |     ^~~~
      |     getw
Language: C++

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

char str[110];

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:49: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |         printf("%c%d%c\n", str[1], len - 2, str[n]);
      |                                                 ^
      |                                                 yn
Language: C++

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

char str[110];

int main() {
	gets(str + 1);
	int len = strlen(str + 1);
	printf("%c%d%c\n", str[1], len - 2, str[n]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |         gets(str + 1);
      |         ^~~~
      |         getw
a.cc:9:49: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |         printf("%c%d%c\n", str[1], len - 2, str[n]);
      |                                                 ^
      |                                                 yn
Language: C++

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

char str[110];

int main() {
	gets(str + 1);
	int len = strlen(str + 1);
	printf("%c%d%c\n", str[1], len, str[n]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |         gets(str + 1);
      |         ^~~~
      |         getw
a.cc:9:45: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |         printf("%c%d%c\n", str[1], len, str[n]);
      |                                             ^
      |                                             yn
Language: C++

#include<bits/stdc++.h>
using namespace std;
string xxx[10020];
int main()
{
    gets(s);
    int y=strlen(s)-2;
    cout<<xxx[0]<<y<<xxx[y+1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 's' was not declared in this scope
    6 |     gets(s);
      |          ^
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include<bits/stdc++.h>
using namespace std;
char xxx[10020];
int main()
{
    gets(s);
    int y=strlen(s)-2;
    cout<<xxx[0]<<y<<xxx[y+1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 's' was not declared in this scope
    6 |     gets(s);
      |          ^
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include<bits/stdc++.h>
using namespace std;
char xxx[10020];
int main()
{
    gets(s);
    int y=strlen(s)-2;
    cout<<xxx[0]<<s<<xxx[y+1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 's' was not declared in this scope
    6 |     gets(s);
      |          ^
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

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

Compiler output:
a.cc: In function 'int mian()':
a.cc:7:1: warning: no return statement in function returning non-void [-Wreturn-type]
    7 | }
      | ^
/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 <bits/stdc++.h>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    8 |         cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
      |                            ^
      |                            |
      |                            std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:8:43: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    8 |         cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
      |                                           ^
      |                                           |
      |                                           std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char s;
    int n=0;
    int l=strlen(s);
    for(int i=2;i<=l-1;i++){
        n++;
    }
    cout<<s[0]<<n<<s[l]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    7 |     int l=strlen(s);
      |                  ^
      |                  |
      |                  char
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:11:12: error: invalid types 'char[int]' for array subscript
   11 |     cout<<s[0]<<n<<s[l]<<endl;
      |            ^
a.cc:11:21: error: invalid types 'char[int]' for array subscript
   11 |     cout<<s[0]<<n<<s[l]<<endl;
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
char s[10000];
int main()
{
    gets(s);
    printf("%c%d%c"，s[0],strlen(s)-2,s[strlen(s)-1]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(s);
      |     ^~~~
      |     getw
a.cc:7:12: error: unable to find string literal operator 'operator""\U0000ff0cs' with 'const char [7]', 'long unsigned int' arguments
    7 |     printf("%c%d%c"，s[0],strlen(s)-2,s[strlen(s)-1]);
      |            ^~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main (){
  string s;
  cin >> s;
  
  int A = s.length();
  
  B = A - 2;
  
  cout << s[0] + B + S[A - 1];
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'B' was not declared in this scope
   12 |   B = A - 2;
      |   ^
a.cc:14:22: error: 'S' was not declared in this scope
   14 |   cout << s[0] + B + S[A - 1];
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double lf;
#define reg register
#define gc() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
#define input(a){a=0;char c=gc();int f=1;while(c<'0'||c>'9'){if(c=='-')f=-1;c=gc();}while(c>='0'&&c<='9'){a=(a<<3)+(a<<1)+(c&15);c=gc();}a*=f;}
static char buf[1<<21],*p1=buf,*p2=buf;
char bu[1<<21],cha[20];int p,pp=-1;
#define flush(){fwrite(bu,1,pp+1,stdout),pp=-1;}
#define output(x){if(pp>1<<20)flush();if(x<0)bu[++pp]=45,x=-x;do{cha[++p]=x%10+48;}while(x/=10);do{bu[++pp]=cha[p];}while(--p);}
#define Endl bu[++pp]='\n'
#define Space bu[++pp]=' '
#define pc(c) bu[++pp]=c
const int N=110;
char s[N];
int main()
{
	gets(s);
	cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
	flush();
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   19 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

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

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int main()
      | ~~~
Language: C++

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

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

#include<iostream>
#include<cstdio>
#include<cstring>
int main(){
    string s;
    std::cin>>s;
    std::cout<<s[0]<<s.size()-2<<s[s.size()-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:5:5: 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:1:
/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:6:15: error: 's' was not declared in this scope
    6 |     std::cin>>s;
      |               ^
Language: C++

#include<iostream>
int main(){
    string s;
    std::cin>>s;
    std::cout<<s[0]<<s.size()-2<<s[s.size()-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string s;
      |     ^~~~~~
a.cc:3:5: 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:1:
/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:15: error: 's' was not declared in this scope
    4 |     std::cin>>s;
      |               ^
Language: C++

// luogu-judger-enable-o2
#include <bits/stdc++.h>
using namespace std;
int main(){
    char a[105]=;
    scanf("%s",a);
    printf("%c%d%c",a[0],strlen(a),a[strlen(a)-1]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: expected primary-expression before ';' token
    5 |     char a[105]=;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    char a[100000];
    gets(a);
    int n = 0;
    int len = strlen(a);
    for (int i = 1; i < len-1; i++)
        {
            n ++;
        }
    printf("%c%d%c\n", a[0], n, a[len-1]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(a);
      |     ^~~~
      |     getw
Language: C++

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

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

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

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

int main(){
  string S;
  cin >> S;
  string ans =S[0]+(S.size()-2)+S[-1];
  
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:32: error: conversion from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    8 |   string ans =S[0]+(S.size()-2)+S[-1];
Language: C++

#include<bits/stdc++.h>
using namespace std;
char a[10001];
int c;
int main()
{
    scanf("%s",&a);
    c=strlen(a);
    printf("%c%d%c\n",s[0],c-2,s[c-1]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 's' was not declared in this scope
    9 |     printf("%c%d%c\n",s[0],c-2,s[c-1]);
      |                       ^
Language: C++

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

const int MOD = 1000000007;
const int INF = 1e9;

//long long
using ll = long long;

//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
 
// begin() end()
#define all(x) (x).begin(),(x).end()

//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n, i##_len=(n); i>=0; i--)
#define FOR(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)

//最大公約数 
 ll gcd(ll a,ll b){
 if(b == 0) return a;
 return gcd(b,a%b);
 }

//最小公倍数
 ll lcm(ll a,ll b){
 ll g = gcd(a,b);
 return a / g * b; // Be careful not to overflow  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
} 

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

int cnt = s.length() - 2;
cout << s.at(0) << cnt << s.at(s.length - 1) << endl;

}

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

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

const int MOD = 1000000007;
const int INF = 1e9;

//long long
using ll = long long;

//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
 
// begin() end()
#define all(x) (x).begin(),(x).end()

//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n, i##_len=(n); i>=0; i--)
#define FOR(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)

//最大公約数 
 ll gcd(ll a,ll b){
 if(b == 0) return a;
 return gcd(b,a%b);
 }

//最小公倍数
 ll lcm(ll a,ll b){
 ll g = gcd(a,b);
 return a / g * b; // Be careful not to overflow  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
} 

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

int cnt = s.length() - 2;
cout << s.at(0) << cnt << s.at(S.length - 1) << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:32: error: 'S' was not declared in this scope
   48 | cout << s.at(0) << cnt << s.at(S.length - 1) << endl;
      |                                ^
Language: C++

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

const int MOD = 1000000007;
const int INF = 1e9;

//long long
using ll = long long;

//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
 
// begin() end()
#define all(x) (x).begin(),(x).end()

//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n, i##_len=(n); i>=0; i--)
#define FOR(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)

//最大公約数 
 ll gcd(ll a,ll b){
 if(b == 0) return a;
 return gcd(b,a%b);
 }

//最小公倍数
 ll lcm(ll a,ll b){
 ll g = gcd(a,b);
 return a / g * b; // Be careful not to overflow  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
} 

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

int cnt = S.length() - 2;
cout << s.at(0) << cnt << s.at(S.length - 1) << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:11: error: 'S' was not declared in this scope
   47 | int cnt = S.length() - 2;
      |           ^
Language: C++

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

const int MOD = 1000000007;
const int INF = 1e9;

//long long
using ll = long long;

//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
 
// begin() end()
#define all(x) (x).begin(),(x).end()

//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n, i##_len=(n); i>=0; i--)
#define FOR(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)

//最大公約数 
 ll gcd(ll a,ll b){
 if(b == 0) return a;
 return gcd(b,a%b);
 }

//最小公倍数
 ll lcm(ll a,ll b){
 ll g = gcd(a,b);
 return a / g * b; // Be careful not to overflow  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
} 

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

int cnt = S.length() - 2;
cout << x.at(0) << cnt << x.at(S.length - 1) << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:11: error: 'S' was not declared in this scope
   47 | int cnt = S.length() - 2;
      |           ^
a.cc:48:9: error: 'x' was not declared in this scope
   48 | cout << x.at(0) << cnt << x.at(S.length - 1) << endl;
      |         ^
Language: C++

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

const int MOD = 1000000007;
const int INF = 1e9;

//long long
using ll = long long;

//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
 
// begin() end()
#define all(x) (x).begin(),(x).end()

//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n, i##_len=(n); i>=0; i--)
#define FOR(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)

//最大公約数 
 ll gcd(ll a,ll b){
 if(b == 0) return a;
 return gcd(b,a%b);
 }

//最小公倍数
 ll lcm(ll a,ll b){
 ll g = gcd(a,b);
 return a / g * b; // Be careful not to overflow  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
} 

string s;
cin >> s;

int cnt = S.length() - 2;
cout << x.at(0) << cnt << x.at(S.length - 1) << endl;

}

Compiler output:
a.cc:44:1: error: 'cin' does not name a type
   44 | cin >> s;
      | ^~~
a.cc:46:11: error: 'S' was not declared in this scope
   46 | int cnt = S.length() - 2;
      |           ^
a.cc:47:1: error: 'cout' does not name a type
   47 | cout << x.at(0) << cnt << x.at(S.length - 1) << endl;
      | ^~~~
a.cc:49:1: error: expected declaration before '}' token
   49 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:56: error: expected '}' at end of input
    7 |   cout<<s[0]<<s.length()-2<<s[(int)s.length()-1]<<endl;
      |                                                        ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:31: error: 'n' was not declared in this scope
    7 |   cout<<s[0]<<s.length()-2<<s[n-1]<<endl;
      |                               ^
a.cc:7:42: error: expected '}' at end of input
    7 |   cout<<s[0]<<s.length()-2<<s[n-1]<<endl;
      |                                          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: expected initializer before 'int'
    6 | int len;
      | ^~~
a.cc:7:6: error: 's' was not declared in this scope
    7 | cin>>s;
      |      ^
a.cc:8:1: error: 'len' was not declared in this scope; did you mean 'mblen'?
    8 | len=s.length();
      | ^~~
      | mblen
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'len' was not declared in this scope; did you mean 'mblen'?
    7 | len=s.length();
      | ^~~
      | mblen
Language: C++

#include<iostream>
#include<cstring>
using namespace std;
char ss[1010];
int main()
{
	gets(ss);
	cout<<ss[0]<<strlen(ss)-2<<ss[strlen(ss)-1]<<endl;
	return 0;
 } 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |         gets(ss);
      |         ^~~~
      |         getw
Language: C++

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

int main() {
  string s;
  string t;
  cin >> s;
  sting l;
  l = 's.size() - 2';
  cout << 's[0]' + l + 's[s.size() - 1]' << endl;
}

Compiler output:
a.cc:9:7: warning: multi-character literal with 12 characters exceeds 'int' size of 4 bytes
    9 |   l = 's.size() - 2';
      |       ^~~~~~~~~~~~~~
a.cc:10:11: warning: multi-character character constant [-Wmultichar]
   10 |   cout << 's[0]' + l + 's[s.size() - 1]' << endl;
      |           ^~~~~~
a.cc:10:24: warning: multi-character literal with 15 characters exceeds 'int' size of 4 bytes
   10 |   cout << 's[0]' + l + 's[s.size() - 1]' << endl;
      |                        ^~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'sting' was not declared in this scope
    8 |   sting l;
      |   ^~~~~
a.cc:9:3: error: 'l' was not declared in this scope
    9 |   l = 's.size() - 2';
      |   ^
Language: C++

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

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

Compiler output:
a.cc:11:11: warning: multi-character character constant [-Wmultichar]
   11 |   cout << 's[0]' + 't' + 's[s.size() - 1]' << endl;
      |           ^~~~~~
a.cc:11:26: warning: multi-character literal with 15 characters exceeds 'int' size of 4 bytes
   11 |   cout << 's[0]' + 't' + 's[s.size() - 1]' << endl;
      |                          ^~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:10:8: error: expected ';' before 'cout'
   10 |   t = l
      |        ^
      |        ;
   11 |   cout << 's[0]' + 't' + 's[s.size() - 1]' << endl;
      |   ~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected ';' before 'cout'
   10 |   t = l
      |        ^
      |        ;
   11 |   cout << s[0] + t + s[s.size() - 1] << endl;
      |   ~~~~
Language: C

// luogu-judger-enable-o2
#include<bits/stdc++.h>
using namespace std;
char c[105];
int main()
{
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	gets(c);
	cout<<c[0]<<strlen(c)-2<<c[strlen(c)-1];
	return 0;
}


Compiler output:
main.c:2:9: fatal error: bits/stdc++.h: No such file or directory
    2 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

// luogu-judger-enable-o2
#include<bits/stdc++.h>
using namespace std;
char c[105];
int main()
{
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	gets(c);
	cout<<c[0]<<strlen(c)-2<<c[strlen(c)-1];
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    9 |         gets(c);
      |         ^~~~
      |         getw
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'cout'
   10 |   cout << S[0] << size-2 << S[size-1];
      |   ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: expected primary-expression before '.' token
    8 |   cout << S[0] << string.length(S)-2 << S[string.length(S)-1];
      |                         ^
a.cc:8:49: error: expected primary-expression before '.' token
    8 |   cout << S[0] << string.length(S)-2 << S[string.length(S)-1];
      |                                                 ^
Language: C++

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

int main(){
  string S ;
  cin >> S ;
  cout << S[0] << str.length(S)-2 << S[str.length(S)-1];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   cout << S[0] << str.length(S)-2 << S[str.length(S)-1];
      |                   ^~~
      |                   std
Language: C++

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

int main(){
  string S ;
  cin >> S ;
  cout << S[0] << length(S)-2 << S[length(S)-1];
}


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

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

int main(){
  string S ;
  cin >> S ;
  cout << S[0] << long(S)-2 << S[long(S)-1];


}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'long int'
    8 |   cout << S[0] << long(S)-2 << S[long(S)-1];
      |                   ^~~~~~~
a.cc:8:34: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'long int'
    8 |   cout << S[0] << long(S)-2 << S[long(S)-1];
      |                                  ^~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:47: error: invalid operands of types 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and '<unresolved overloaded function type>' to binary 'operator<<'
    5 |         cout<<s[0]<s.size()-2<<s[s.length()-1]<<endl;
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:49: error: invalid operands of types 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and '<unresolved overloaded function type>' to binary 'operator<<'
    5 |         cout<<s[0]<s.length()-2<<s[s.length()-1]<<endl;
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'int'
    7 |   int count = size - 2;
      |   ^~~
a.cc:8:22: error: 'count' was not declared in this scope
    8 |   cout << s.at(0) << count << s.at(size -1) << endl;
      |                      ^~~~~
Language: C++

#include"cstring"
#include"iostream"
using namespace std;
char s[100];
int main()
{
    gets(s);
    cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

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

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 's' was not declared in this scope
    6 |         cin>>s;
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
char x[101];
int l;
int main()
{
	cin>>x;
	l=x.size();
	cout<<x[0]<<l-2<<x[l-1]<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: request for member 'size' in 'x', which is of non-class type 'char [101]'
    8 |         l=x.size();
      |             ^~~~
Language: C++

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


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

#include<string>
#include<cstring>
#include<iostream>
using namespace std;
char s[10000];
int main()
{
    gets(s);
    cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(s);
      |     ^~~~
      |     getw
Language: C++

#include<bits/stdc++.h>
char s[102];
int main(){gets(s);std::cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: 'gets' was not declared in this scope; did you mean 'getw'?
    3 | int main(){gets(s);std::cout<<s[0]<<strlen(s)-2<<s[strlen(s)-1];}
      |            ^~~~
      |            getw
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<vector>
#include<queue>
#include<deque>
#include<algorithm>
#include<iomanip>
#include<cstdlib>
#include<cstdio>
#include<cmath>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   19 |     cout << s[0] << strlen(s) - 2 << s[strlen(s) - 1];
      |                            ^
      |                            |
      |                            std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:3:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:19:47: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   19 |     cout << s[0] << strlen(s) - 2 << s[strlen(s) - 1];
      |                                               ^
      |                                               |
      |                                               std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: conversion from 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   16 |   string a=s.size()-2;
      |            ~~~~~~~~^~
Language: C++

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

int main() {
    string S;
    cin >> S;
    int a = S.length();
    cout << S[0] + '' + (a - 2) + '' + S[a - 1] << endl;
}

Compiler output:
a.cc:9:20: error: empty character constant
    9 |     cout << S[0] + '' + (a - 2) + '' + S[a - 1] << endl;
      |                    ^~
a.cc:9:35: error: empty character constant
    9 |     cout << S[0] + '' + (a - 2) + '' + S[a - 1] << endl;
      |                                   ^~
Language: C++

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

int main(void){

  long string str;
  cin >> str ;

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

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

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected initializer before 'str'
    7 |   long string str;
      |               ^~~
a.cc:8:10: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   cin >> str ;
      |          ^~~
      |          std