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

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

int main(){
  int E,Y,M,T,S,H;

  cin>>E>>Y;

  if(E=0&&1911-Y>=0){
    cout<<M"1912-Y"<<endl
      } else if(E=0&&1925-Y>=0){
    cout<<T"1926-Y"<<endl
      } else if(E=0&&1988-Y>=0){
    cout<<S"1989-Y"<<endl
      } else if(E=0&&2016-Y>=0){
    cout<<H"2017-Y"<<endl
      }

  else if(E=1&&1868>=Y){
    cout<<"1867+Y"<<endl
      } else if(E=2&&1912>=Y){
    cout<<"1911+Y"<<endl
      } else if(E=3&&1926>=Y){
    cout<<"1925+Y"<<endl
      } else if(E=4&&1989>=Y){
    cout<<"1988+Y"<<endl
      }
  return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
   10 |     cout<<M"1912-Y"<<endl
      |            ^~~~~~~~
      |            ;
a.cc:12:12: error: expected ';' before string constant
   12 |     cout<<T"1926-Y"<<endl
      |            ^~~~~~~~
      |            ;
a.cc:14:12: error: expected ';' before string constant
   14 |     cout<<S"1989-Y"<<endl
      |            ^~~~~~~~
      |            ;
a.cc:16:12: error: expected ';' before string constant
   16 |     cout<<H"2017-Y"<<endl
      |            ^~~~~~~~
      |            ;
a.cc:20:25: error: expected ';' before '}' token
   20 |     cout<<"1867+Y"<<endl
      |                         ^
      |                         ;
   21 |       } else if(E=2&&1912>=Y){
      |       ~                  
a.cc:22:25: error: expected ';' before '}' token
   22 |     cout<<"1911+Y"<<endl
      |                         ^
      |                         ;
   23 |       } else if(E=3&&1926>=Y){
      |       ~                  
a.cc:24:25: error: expected ';' before '}' token
   24 |     cout<<"1925+Y"<<endl
      |                         ^
      |                         ;
   25 |       } else if(E=4&&1989>=Y){
      |       ~                  
a.cc:26:25: error: expected ';' before '}' token
   26 |     cout<<"1988+Y"<<endl
      |                         ^
      |                         ;
   27 |       }
      |       ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){

int E, Y;
cin>>E>>Y;

if(E = 0){
 if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
 else if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
 else if(1926 <= Y && Y <= 1989) cout<<S<<" "<<(Y + 1) - 1926<<endl;
 else if(1989 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1989<<endl;
 }
 
if(E = 1) cout<<Y + 1868<<endl;
else if(E = 2) cout<<Y + 1912<<endl;
else if(E = 3) cout<<Y + 1926<<endl;
else if(E = 4) cout<<Y + 1989<<endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:35: error: 'M' was not declared in this scope
   11 |  if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
      |                                   ^
a.cc:12:40: error: 'T' was not declared in this scope
   12 |  else if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
      |                                        ^
a.cc:13:40: error: 'S' was not declared in this scope
   13 |  else if(1926 <= Y && Y <= 1989) cout<<S<<" "<<(Y + 1) - 1926<<endl;
      |                                        ^
a.cc:14:40: error: 'H' was not declared in this scope
   14 |  else if(1989 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1989<<endl;
      |                                        ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){

int E, Y;
cin>>E>>Y;

if(E = 0){
 if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
 else if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
 else if(1926 <= Y && Y <= 1989) cout<<S<<" "<<(Y + 1) - 1926<<endl;
 else if(1989 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1989<<endl;
 }
 
if(E = 1) cout<<Y + 1867<<endl;
else if(E = 2) cout<<Y + 1911<<endl;
else if(E = 3) cout<<Y + 1925<<endl;
else if(E = 4) cout<<Y + 1988<<endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:35: error: 'M' was not declared in this scope
   11 |  if(1868 <= Y && Y <= 1912) cout<<M<<" "<<(Y + 1) - 1868<<endl;
      |                                   ^
a.cc:12:40: error: 'T' was not declared in this scope
   12 |  else if(1912 <= Y && Y <= 1926) cout<<T<<" "<<(Y + 1) - 1912<<endl;
      |                                        ^
a.cc:13:40: error: 'S' was not declared in this scope
   13 |  else if(1926 <= Y && Y <= 1989) cout<<S<<" "<<(Y + 1) - 1926<<endl;
      |                                        ^
a.cc:14:40: error: 'H' was not declared in this scope
   14 |  else if(1989 <= Y && Y <= 2016) cout<<H<<" "<<(Y + 1) - 1989<<endl;
      |                                        ^
Language: C++

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

int main(){
  int E,Y,M,T,S,H;

  cin>>E>>Y;

  if(E=0&&1911-Y>=0){
    cout<<M1912-Y<<endl;
      } else if(E=0&&1925-Y>=0){
    cout<<T1926-Y<<endl;
      } else if(E=0&&1988-Y>=0){
    cout<<S1989-Y<<endl;
      } else if(E=0&&2016-Y>=0){
    cout<<H2017-Y<<endl;
      }

  else if(E=1&&1868>=Y){
    cout<<"1867+Y"<<endl;
      } else if(E=2&&1912>=Y){
    cout<<"1911+Y"<<endl;
      } else if(E=3&&1926>=Y){
    cout<<"1925+Y"<<endl;
      } else if(E=4&&1989>=Y){
    cout<<"1988+Y"<<endl;
      }
  return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'M1912' was not declared in this scope
   10 |     cout<<M1912-Y<<endl;
      |           ^~~~~
a.cc:12:11: error: 'T1926' was not declared in this scope
   12 |     cout<<T1926-Y<<endl;
      |           ^~~~~
a.cc:14:11: error: 'S1989' was not declared in this scope
   14 |     cout<<S1989-Y<<endl;
      |           ^~~~~
a.cc:16:11: error: 'H2017' was not declared in this scope
   16 |     cout<<H2017-Y<<endl;
      |           ^~~~~
Language: C++

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

int main(){
  int E,Y,M,T,S,H;

  cin>>E>>Y;

  if(E=0&&1911-Y>=0){
    cout<<M"1912"-Y<<endl;
      } else if(E=0&&1925-Y>=0){
    cout<<T"1926"-Y<<endl;
      } else if(E=0&&1988-Y>=0){
    cout<<S"1989"-Y<<endl;
      } else if(E=0&&2016-Y>=0){
    cout<<H"2017"-Y<<endl;
      }

  else if(E=1&&1868>=Y){
    cout<<"1867+Y"<<endl;
      } else if(E=2&&1912>=Y){
    cout<<"1911+Y"<<endl;
      } else if(E=3&&1926>=Y){
    cout<<"1925+Y"<<endl;
      } else if(E=4&&1989>=Y){
    cout<<"1988+Y"<<endl;
      }
  return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
   10 |     cout<<M"1912"-Y<<endl;
      |            ^~~~~~
      |            ;
a.cc:12:12: error: expected ';' before string constant
   12 |     cout<<T"1926"-Y<<endl;
      |            ^~~~~~
      |            ;
a.cc:14:12: error: expected ';' before string constant
   14 |     cout<<S"1989"-Y<<endl;
      |            ^~~~~~
      |            ;
a.cc:16:12: error: expected ';' before string constant
   16 |     cout<<H"2017"-Y<<endl;
      |            ^~~~~~
      |            ;
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){

int E, Y;
cin>>E>>Y;

if(E = 0){
 if(1868 <= Y && Y <= 1912) cout<<"M<<" "<<(Y + 1) - 1868<<endl;
 else if(1912 <= Y && Y <= 1926) cout<<"T"<<" "<<(Y + 1) - 1912<<endl;
 else if(1926 <= Y && Y <= 1989) cout<<"S"<<" "<<(Y + 1) - 1926<<endl;
 else if(1989 <= Y && Y <= 2016) cout<<"H"<<" "<<(Y + 1) - 1989<<endl;
 }
 
if(E = 1) cout<<Y + 1867<<endl;
else if(E = 2) cout<<Y + 1911<<endl;
else if(E = 3) cout<<Y + 1925<<endl;
else if(E = 4) cout<<Y + 1988<<endl;

return 0;
}


Compiler output:
a.cc:11:41: warning: missing terminating " character
   11 |  if(1868 <= Y && Y <= 1912) cout<<"M<<" "<<(Y + 1) - 1868<<endl;
      |                                         ^
a.cc:11:41: error: missing terminating " character
   11 |  if(1868 <= Y && Y <= 1912) cout<<"M<<" "<<(Y + 1) - 1868<<endl;
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:40: error: expected ';' before 'else'
   11 |  if(1868 <= Y && Y <= 1912) cout<<"M<<" "<<(Y + 1) - 1868<<endl;
      |                                        ^
      |                                        ;
   12 |  else if(1912 <= Y && Y <= 1926) cout<<"T"<<" "<<(Y + 1) - 1912<<endl;
      |  ~~~~
Language: C++

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

int main(){
  int Y,E;
  
  cin>> Y,E;
  
  if ( E = 0 && 1868 <= Y <= 1911 ) 
    cout << M << Y - 1868 + 1 << endl;

  else if ( E = 0 && 1912 <= Y <= 1925 )
    cout << T << Y - 1912 + 1 << endl;

  else if ( E = 0 && 1926 <= Y <= 1988 )
    cout << S << Y - 1926 + 1 << endl;

  else if ( E = 0 && 1989 <= Y <= 2016 )
    cout << H << Y - 1989 + 1 << endl;

  else if ( E = 1 )
    cout << 1868 + Y - 1 <<endl;

  else if ( E = 2 )
    cout << 1912 + Y - 1 <<endl;

  else if ( E = 3 )
    cout << 1926 + Y - 1 <<endl;

  else cout << 1989 + Y - 1 << endl;

  return 0;
}



  



Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'M' was not declared in this scope
   10 |     cout << M << Y - 1868 + 1 << endl;
      |             ^
a.cc:13:13: error: 'T' was not declared in this scope
   13 |     cout << T << Y - 1912 + 1 << endl;
      |             ^
a.cc:16:13: error: 'S' was not declared in this scope
   16 |     cout << S << Y - 1926 + 1 << endl;
      |             ^
a.cc:19:13: error: 'H' was not declared in this scope
   19 |     cout << H << Y - 1989 + 1 << endl;
      |             ^
Language: C++

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

int main(){
  int E,Y,M,T,S,H;

  cin>>E>>Y;

  if(E=0&&1912-Y>=0){
    cout<<M"1912"-Y<<endl;
      } else if(E=0&&1926-Y>=0){
    cout<<T"1926"-Y<<endl;
      } else if(E=0&&1989-Y>=0){
    cout<<S"1989"-Y<<endl;
      } else if(E=0&&2017-Y>=0){
    cout<<H"2017"-Y<<endl;
      }

  else if(E=1&&1867>=Y){
    cout<<"1867+Y"<<endl;
      } else if(E=2&&1911>=Y){
    cout<<"1911+Y"<<endl;
      } else if(E=3&&1925>=Y){
    cout<<"1925+Y"<<endl;
      } else if(E=4&&1988>=Y){
    cout<<"1988+Y"<<endl;
      }
  return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
   10 |     cout<<M"1912"-Y<<endl;
      |            ^~~~~~
      |            ;
a.cc:12:12: error: expected ';' before string constant
   12 |     cout<<T"1926"-Y<<endl;
      |            ^~~~~~
      |            ;
a.cc:14:12: error: expected ';' before string constant
   14 |     cout<<S"1989"-Y<<endl;
      |            ^~~~~~
      |            ;
a.cc:16:12: error: expected ';' before string constant
   16 |     cout<<H"2017"-Y<<endl;
      |            ^~~~~~
      |            ;
Language: C++

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

int main(){
  int E,Y,M,T,S,H;

  cin>>E>>Y;

  if(E=0&&1912-Y>=0){
    cout<<M"1912-Y"<<endl;
      } else if(E=0&&1926-Y>=0){
    cout<<T"1926-Y"<<endl;
      } else if(E=0&&1989-Y>=0){
    cout<<S"1989-Y"<<endl;
      } else if(E=0&&2017-Y>=0){
    cout<<H"2017-Y"<<endl;
      }

  else if(E=1&&1867>=Y){
    cout<<"1867+Y"<<endl;
      } else if(E=2&&1911>=Y){
    cout<<"1911+Y"<<endl;
      } else if(E=3&&1925>=Y){
    cout<<"1925+Y"<<endl;
      } else if(E=4&&1988>=Y){
    cout<<"1988+Y"<<endl;
      }
  return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before string constant
   10 |     cout<<M"1912-Y"<<endl;
      |            ^~~~~~~~
      |            ;
a.cc:12:12: error: expected ';' before string constant
   12 |     cout<<T"1926-Y"<<endl;
      |            ^~~~~~~~
      |            ;
a.cc:14:12: error: expected ';' before string constant
   14 |     cout<<S"1989-Y"<<endl;
      |            ^~~~~~~~
      |            ;
a.cc:16:12: error: expected ';' before string constant
   16 |     cout<<H"2017-Y"<<endl;
      |            ^~~~~~~~
      |            ;
Language: C++

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

int main(){
  int E,Y,M,T,S,H;

  cin>>E>>Y;

  if(E=0&&Y<=1911){
    cout<<M<<Y-1867<<endl;
      } else if(E==0&&Y<=1925){
    cout<<T<<Y-1911<<endl;
      } else if(E==0&&Y>=1988){
    cout<<S<<Y-1925<<endl;
      } else (E==0&&Y<=2016){
    cout<<H<<Y-1988<<endl;
      }

  else if(E==1){
    cout<<1867+Y<<endl;
      } else if(E==2){
    cout<<1911+Y<<endl;
      } else if(E==3){
    cout<<1925+Y<<endl;
      } else (E==4){
    cout<<1988+Y<<endl;
      }
  return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: expected ';' before '{' token
   15 |       } else (E==0&&Y<=2016){
      |                             ^
      |                             ;
a.cc:19:3: error: 'else' without a previous 'if'
   19 |   else if(E==1){
      |   ^~~~
a.cc:25:20: error: expected ';' before '{' token
   25 |       } else (E==4){
      |                    ^
      |                    ;
Language: C++

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

int main(){
  int E,Y;

  cin>>E>>Y;

  if(E==0){
    1868<=Y&&Y<=1911){
    cout<<"M"<<Y-1867<<endl;
      } else if(1912<=Y&&Y<=1925){
    cout<<"T"<<Y-1911<<endl;
      } else if(1926<=Y&&Y>=1988){
    cout<<"S"<<Y-1925<<endl;
      } else if(1989<=Y&&Y<=2016){
    cout<<"H"<<Y-1988<<endl;
      }

  else if(E==1){
    cout<<1867+Y<<endl;
      } else if(E==2){
    cout<<1911+Y<<endl;
      } else if(E==3){
    cout<<1925+Y<<endl;
      } else if(E==4){
    cout<<1988+Y<<endl;
      }
  return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before ')' token
   10 |     1868<=Y&&Y<=1911){
      |                     ^
      |                     ;
a.cc:12:9: error: expected '}' before 'else'
   12 |       } else if(1912<=Y&&Y<=1925){
      |         ^~~~
a.cc:9:11: note: to match this '{'
    9 |   if(E==0){
      |           ^
Language: C++

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

int main(){
  int E,Y;

  cin>>E>>Y;

  if(E==0){
    1868<=Y && Y<=1911){
    cout<<"M"<<Y-1867<<endl;
      } else if(1912<=Y && Y<=1925){
    cout<<"T"<<Y-1911<<endl;
      } else if(1926<=Y && Y>=1988){
    cout<<"S"<<Y-1925<<endl;
      } else if(1989<=Y && Y<=2016){
    cout<<"H"<<Y-1988<<endl;
      }

  else if(E==1){
    cout<<1867+Y<<endl;
      } else if(E==2){
    cout<<1911+Y<<endl;
      } else if(E==3){
    cout<<1925+Y<<endl;
      } else if(E==4){
    cout<<1988+Y<<endl;
      }
  return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before ')' token
   10 |     1868<=Y && Y<=1911){
      |                       ^
      |                       ;
a.cc:12:9: error: expected '}' before 'else'
   12 |       } else if(1912<=Y && Y<=1925){
      |         ^~~~
a.cc:9:11: note: to match this '{'
    9 |   if(E==0){
      |           ^
Language: C++

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

int main(){
  int E,Y;
  
  cin>>E>>Y;
  
  if(E==0){
    1868<=Y && Y<=1911){
    cout<<"M"<<Y-1867<<endl;
  } else if(1912<=Y && Y<=1925){
    cout<<"T"<<Y-1911<<endl;
  } else if(1926<=Y && Y>=1988){
    cout<<"S"<<Y-1925<<endl;
  } else if(1989<=Y && Y<=2016){
    cout<<"H"<<Y-1988<<endl;
  }
  
  else if(E==1){
    cout<<1867+Y<<endl;
  } else if(E==2){
    cout<<1911+Y<<endl;
  } else if(E==3){
    cout<<1925+Y<<endl;
  } else if(E==4){
    cout<<1988+Y<<endl;
  }
  return 0;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before ')' token
   10 |     1868<=Y && Y<=1911){
      |                       ^
      |                       ;
a.cc:12:5: error: expected '}' before 'else'
   12 |   } else if(1912<=Y && Y<=1925){
      |     ^~~~
a.cc:9:11: note: to match this '{'
    9 |   if(E==0){
      |           ^
Language: C++

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

int main(){
  int E,Y;
  
  cin>>E>>Y;
  
  if(E==0){
   if (1868<=Y && Y<=1911){
    cout<<"M"<<Y-1867<<endl;
  } else if(1912<=Y && Y<=1925){
    cout<<"T"<<Y-1911<<endl;
  } else if(1926<=Y && Y>=1988){
    cout<<"S"<<Y-1925<<endl;
  } else if(1989<=Y && Y<=2016){
    cout<<"H"<<Y-1988<<endl;
  }
  
  else if(E==1){
    cout<<1867+Y<<endl;
  } else if(E==2){
    cout<<1911+Y<<endl;
  } else if(E==3){
    cout<<1925+Y<<endl;
  } else if(E==4){
    cout<<1988+Y<<endl;
  }
  return 0;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int E,Y;
  
  cin>>E>>Y;
  
  if(E==0){
   if (1868<=Y && Y<=1911){
    cout<<"M"<<Y-1867<<endl;
  } else if(1912<=Y && Y<=1925){
    cout<<"T"<<Y-1911<<endl;
  } else if(1926<=Y && Y>=1988){
    cout<<"S"<<Y-1925<<endl;
  } else (1989<=Y && Y<=2016){
    cout<<"H"<<Y-1988<<endl;
  }
  
  else if(E==1){
    cout<<1867+Y<<endl;
  } else if(E==2){
    cout<<1911+Y<<endl;
  } else if(E==3){
    cout<<1925+Y<<endl;
  } else if(E==4){
    cout<<1988+Y<<endl;
  }
  return 0;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:30: error: expected ';' before '{' token
   16 |   } else (1989<=Y && Y<=2016){
      |                              ^
      |                              ;
a.cc:20:3: error: expected '}' before 'else'
   20 |   else if(E==1){
      |   ^~~~
a.cc:9:11: note: to match this '{'
    9 |   if(E==0){
      |           ^
Language: C++

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

int main(){
  int E,Y;
  
  cin>>E>>Y;
  
  if(E==0){
   if (1868<=Y && Y<=1911){
    cout<<"M"<<Y-1867<<endl;
  } else if(1912<=Y && Y<=1925){
    cout<<"T"<<Y-1911<<endl;
  } else if(1926<=Y && Y<=1988){
    cout<<"S"<<Y-1925<<endl;
  } else if(1989<=Y && Y<=2016){
    cout<<"H"<<Y-1988<<endl;
  }
  
  else if(E==1){
    cout<<1867+Y<<endl;
  } else if(E==2){
    cout<<1911+Y<<endl;
  } else if(E==3){
    cout<<1925+Y<<endl;
  } else if(E==4){
    cout<<1988+Y<<endl;
  }
  return 0;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int E,Y;
  
  cin>>E>>Y;
  
  if(E==0){
   if (1868<=Y && Y<=1911){
    cout<<"M"<<Y-1867<<endl;
  } else if(1912<=Y && Y<=1925){
    cout<<"T"<<Y-1911<<endl;
  } else if(1926<=Y && Y<=1988){
    cout<<"S"<<Y-1925<<endl;
  } else {
    cout<<"H"<<Y-1988<<endl;
  }
  
  else if(E==1){
    cout<<1867+Y<<endl;
  } else if(E==2){
    cout<<1911+Y<<endl;
  } else if(E==3){
    cout<<1925+Y<<endl;
  } else if(E==4){
    cout<<1988+Y<<endl;
  }
  return 0;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:3: error: expected '}' before 'else'
   20 |   else if(E==1){
      |   ^~~~
a.cc:9:11: note: to match this '{'
    9 |   if(E==0){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int e,r;
  cin>>e>>r;
  if(!e){
    if(y<1912)cout<<'M'<<y-1867<<endl;
    else if(y<1926)cout<<'T'<<y-1911<<endl;
    else if(y<1989)cout<<'S'<<y-1925<<endl;
    else cout<<'H'<<y-1988<<endl;
  }
  if(e==1)cout<<y+1867<<endl;
  if(e==2)cout<<y+1911<<endl;
  if(e==3)cout<<y+1925<<endl;
  if(e==4)cout<<y+1988<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: 'y' was not declared in this scope
    7 |     if(y<1912)cout<<'M'<<y-1867<<endl;
      |        ^
a.cc:12:17: error: 'y' was not declared in this scope
   12 |   if(e==1)cout<<y+1867<<endl;
      |                 ^
a.cc:13:17: error: 'y' was not declared in this scope
   13 |   if(e==2)cout<<y+1911<<endl;
      |                 ^
a.cc:14:17: error: 'y' was not declared in this scope
   14 |   if(e==3)cout<<y+1925<<endl;
      |                 ^
a.cc:15:17: error: 'y' was not declared in this scope
   15 |   if(e==4)cout<<y+1988<<endl;
      |                 ^
Language: C++

#include<iostream>
using namespace std;

int main(){
 int E, Y;
 cin >> E >> Y;

 switch(E){
  case 0:
   if(1868<=Y&&Y<=1911) cout << 'M' << Y-1867 << endl;
   if(1912<=Y&&Y<=1925) cout << 'T' << Y-1911 << endl;
   if(1926<=Y&&Y<=1988) cout << 'S' << Y-1925 << endl;
   if(1989<=Y&&Y<=2016) cout << 'H' << Y-1988 << endl;
   break;
  case 1:
   cout << 1867 + Y << endl;
   break;
  case 2:
   cout << 1911 + Y << endl;
   break;
  case 3:
   cout << 1925 + Y << endl;
   break;
  case 4:
   cout << 1988 + Y << endl;
   break;
 }

 return 0;
}
~                                    

Compiler output:
a.cc:31:2: error: expected class-name at end of input
   31 | ~
      |  ^
Language: C++

#include<iosteram>
using namespace std;

int main(){
	int E,Y;
	cin>>E>>Y;
	switch(E){
		case 0:
				int X=Y-1867;
				if(X<=44){
					cout<<"M"<<X<<endl;
				}else if(x>131){
					cout<<"H"<<X-131<<endl;
				}else{
					if(X<59){
						cout<<"T"<<X-44<<endl;
					}else{
						cout<<"S"<<X-59<<endl;
					}
				}
				break;
		case 1:
				cout<<1867+Y<<endl;
				break:
		case 2:
				cout<<1911+Y<<endl;
				break;
		case 3:
				cout<<1925+Y<<endl;
				break;
		case 4:
				cout<<1988+Y<<endl;
				break;
	}
}

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

#include<iostream>
using namespace std;

int main(){
	int E,Y;
	cin>>E>>Y;
	switch(E){
		case 0:
				int X=Y-1867;
				if(X<=44){
					cout<<"M"<<X<<endl;
				}else if(x>131){
					cout<<"H"<<X-131<<endl;
				}else{
					if(X<59){
						cout<<"T"<<X-44<<endl;
					}else{
						cout<<"S"<<X-59<<endl;
					}
				}
				break;
		case 1:
				cout<<1867+Y<<endl;
				break:
		case 2:
				cout<<1911+Y<<endl;
				break;
		case 3:
				cout<<1925+Y<<endl;
				break;
		case 4:
				cout<<1988+Y<<endl;
				break;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:42: error: 'x' was not declared in this scope
   12 |                                 }else if(x>131){
      |                                          ^
a.cc:22:22: error: jump to case label
   22 |                 case 1:
      |                      ^
a.cc:9:37: note:   crosses initialization of 'int X'
    9 |                                 int X=Y-1867;
      |                                     ^
a.cc:24:38: error: expected ';' before ':' token
   24 |                                 break:
      |                                      ^
      |                                      ;
a.cc:24:38: error: expected primary-expression before ':' token
a.cc:28:22: error: jump to case label
   28 |                 case 3:
      |                      ^
a.cc:9:37: note:   crosses initialization of 'int X'
    9 |                                 int X=Y-1867;
      |                                     ^
a.cc:31:22: error: jump to case label
   31 |                 case 4:
      |                      ^
a.cc:9:37: note:   crosses initialization of 'int X'
    9 |                                 int X=Y-1867;
      |                                     ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int E,Y;
	cin>>E>>Y;
	if(E==0){
		if(Y<=1868&&Y>=1911){
			y=Y-1867;
			cout<<'M'<<y<<endl;
		}else if(Y<=1912&&Y>=1925){
			y=Y-1911;
			cout<<'T'<<y<<endl;
		}else if(Y<=1926&&Y>=1988){
			y=Y-1925;
			cout<<'S'<<y<<endl;
		}else if(Y<=1989&&Y>=2016){
			y=Y-1988;
			cout<<'H'<<y<<endl;
		}
	}else if(E==1){
		cout<<1867+Y<<endl;
	}else if(E==2){
		cout<<1911+Y<<endl;
	}else if(E==3){
		cout<<1925+Y<<endl;
	}else if(E==4){
		cout<<1988+Y<<endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: 'y' was not declared in this scope
    9 |                         y=Y-1867;
      |                         ^
a.cc:12:25: error: 'y' was not declared in this scope
   12 |                         y=Y-1911;
      |                         ^
a.cc:15:25: error: 'y' was not declared in this scope
   15 |                         y=Y-1925;
      |                         ^
a.cc:18:25: error: 'y' was not declared in this scope
   18 |                         y=Y-1988;
      |                         ^
Language: C++

#include<stdio.h>
int main(void)
{
	int e,y;
	char a[4]="MTSH";
	scanf("%d %d",&e,&y);
		if(e==0){
			y=y-1867;
			if(y<45) e=0;
			else if(y<59){
				e=1; y=y-44;
			}
			else if(y<122){
				e=2; y=y-58;
			}
			else{
				e=3; y=y-121;
			}
			printf("%c%d\n",a[e],y);
		}
		else{
			if(e==1) y=1867+y;
			else if(e==2) y=1911+y;
			else if(e==3) y=1925+y;
			else y=1988+y;
			printf("%d\n",y);
		}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: initializer-string for 'char [4]' is too long [-fpermissive]
    5 |         char a[4]="MTSH";
      |                   ^~~~~~
Language: C++

#include<stdio.h>
int main(void)
{
	int e,y;
	char a[4]="MTSH";
	scanf("%d %d",&e,&y);
	if(e==0){
		y=y-1867;
		if(y<45) e=0;
		else if(y<59){
			e=1; y=y-44;
		}
		else if(y<122){
			e=2; y=y-58;
		}
		else{
			e=3; y=y-121;
		}
		printf("%c%d\n",a[e],y);
	}
	else{
		if(e==1) y=1867+y;
		else if(e==2) y=1911+y;
		else if(e==3) y=1925+y;
		else y=1988+y;
		printf("%d\n",y);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: initializer-string for 'char [4]' is too long [-fpermissive]
    5 |         char a[4]="MTSH";
      |                   ^~~~~~
Language: C++

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

typedef long long ll;
typedef pair<int, int> P;

#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod 1e9+7

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

int gcd(int a, int b ) {
  if(a == 0) return b;
  return gcd(b % a, a);
}

bool isPrime(int a) {
  if(a == 2) return true;
  if(a < 2 || !(a % 2)) return false;

  double sq = sqrt(a);
  for(int i = 3; i <= sq; i += 2) {
    if(a % i == 0) return false;
  }
  return true;
}


int main() {
  int e, y;
  cin >> e >> y;
  if(!e) {
    y -= 1867;
    if(y <= 44) cout << "M" << y << endl;
    else if(y <= 58) cout << "T" << y - 44 << endl;;
    else if(y <= 121) cout << "S" << y - 58 << endl;;
    else cout << "H" << y - 121;
  }
  else if(e == 1) cout << 1867 + y << endl;
  else if(e == 2) cout << 1911 + y << endl;
  else if(e == 3) cout << 1925 + y << endl;
  else cout << 1988 + y << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:5: error: expected '}' before 'else'
   42 |     else if(y <= 121) cout << "S" << y - 58 << endl;;
      |     ^~~~
a.cc:38:10: note: to match this '{'
   38 |   if(!e) {
      |          ^
a.cc:43:5: error: 'else' without a previous 'if'
   43 |     else cout << "H" << y - 121;
      |     ^~~~
a.cc: At global scope:
a.cc:45:3: error: expected unqualified-id before 'else'
   45 |   else if(e == 1) cout << 1867 + y << endl;
      |   ^~~~
a.cc:46:3: error: expected unqualified-id before 'else'
   46 |   else if(e == 2) cout << 1911 + y << endl;
      |   ^~~~
a.cc:47:3: error: expected unqualified-id before 'else'
   47 |   else if(e == 3) cout << 1925 + y << endl;
      |   ^~~~
a.cc:48:3: error: expected unqualified-id before 'else'
   48 |   else cout << 1988 + y << endl;
      |   ^~~~
a.cc:49:1: error: expected declaration before '}' token
   49 | }
      | ^
Language: C++

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

class data {
  int p[5]={1868,1912,1926,1989,2017};
  char c[4]={'M','T','S','H'};
};
int main() {
  int E, Y;
  cin >> E >> Y;
  data d;
  if (E==0) {
    int idx;
    for (int i=0; i<4; i++) {
      if (d.p[i]<=Y && Y<d.p[i+1]) {
        idx = i;
        break;
      }
    }
    printf("%c%d\n", d.c[idx], Y-d.p[idx]+1);
  } else {
    printf("%d\n", Y+d.p[E-1]-1);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: reference to 'data' is ambiguous
   11 |   data d;
      |   ^~~~
In file included from /usr/include/c++/14/string:53,
                 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/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:4:7: note:                 'class data'
    4 | class data {
      |       ^~~~
a.cc:15:11: error: 'd' was not declared in this scope
   15 |       if (d.p[i]<=Y && Y<d.p[i+1]) {
      |           ^
a.cc:20:22: error: 'd' was not declared in this scope
   20 |     printf("%c%d\n", d.c[idx], Y-d.p[idx]+1);
      |                      ^
a.cc:22:22: error: 'd' was not declared in this scope
   22 |     printf("%d\n", Y+d.p[E-1]-1);
      |                      ^
Language: C++

#include<bits/stdc++.h>

using namespace std;


int main(){

int E,Y;

cin>>E>>Y;

if(E==0){

if(Y>=1989&&Y<=2016)cout<<"H"<<Y-1988<<endl;
if(Y>=1926&&Y<=1988)cout<<"S"<<Y-1925<<endl;
if(Y>=1912&&Y<=1925)cout<<"T"<<Y-1911<<endl;
if(Y>=1868&&Y<=1911)cout<<"M"<<Y-1867<<endl;

}
else{
if(E=1)cout<<Y+1867<<endl;}
else{
if(E=2)cout<<Y+1911<<endl;}
else{
if(E=3)cout<<Y+1925<<endl;}
else{
if(E=4)cout<<Y+1988<<endl;}


return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:1: error: 'else' without a previous 'if'
   22 | else{
      | ^~~~
a.cc:24:1: error: 'else' without a previous 'if'
   24 | else{
      | ^~~~
a.cc:26:1: error: 'else' without a previous 'if'
   26 | else{
      | ^~~~
Language: Java

import math

W,H,C = map(int,input().split(' '))

x = ma.gcd(thW,H)

print((W//x)*(H//x)*C)

Compiler output:
Main.java:1: error: '.' expected
import math
           ^
Main.java:3: error: ';' expected
W,H,C = map(int,input().split(' '))
 ^
2 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int W = s.nextInt();
		int H = s.nextInt();
		int C = s.nextInt();
		
		int a = 0;
		int b = 0;
		int c = 0;
		int x = 0;
		
		if(W>H){
			a = W;
			b = H;
		}else{
			a = H;
			b = W;
		}                   
		
		
		while(C>0){
			if(a%b != 0){
				c = a;
				a = b;
				b = c%b;
				
			}else{
				x = b;
				break;
			}
		}
		
		System.out.printl(W/x * H/x * C);         
	}
}

Compiler output:
Main.java:36: error: cannot find symbol
		System.out.printl(W/x * H/x * C);         
		          ^
  symbol:   method printl(int)
  location: variable out of type PrintStream
1 error
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int W = s.nextInt();
		int H = s.nextInt();
		int C = s.nextInt();
		
		int a = 0;
		int b = 0;
		int c = 0;
		int x  = 0;
		
		if(W>H){
			a = W;
			b = H;
		}else{
			a = H;
			b = W;
		}           
		
		while(C>0){
			if(a%b != 0){
				c = a;
				a = b;
				b = c%b;
			
			}else{
				x = b;
				break;
			}
		}
		
		
		System.out.println(W/x * H/x * C);;

		s.close();

	}
}

}

Compiler output:
Main.java:43: error: class, interface, enum, or record expected
}
^
1 error
Language: C

#include<stdio.h>

int func(int,int);

int main()
{
    int w,h,c;
    int s;
    
    scanf("%d %d %d",&w,&h,&c);
    s = func( w,h );
    
    h /= s;
    w /= s;
    
    printf("%d\n",h*w*c);
    
    return 0;
}
int func(int a,int b)
{
    int r;
    r = a % b;
　　while (r > 0)
　　{
       a = b;
       b = r;
       r = a % b;
　　}
    return b;
}


Compiler output:
main.c: In function 'func':
main.c:24:1: error: stray '\343' in program
   24 | <U+3000><U+3000>while (r > 0)
      | ^~~~~~~~
main.c:24:3: error: stray '\343' in program
   24 | <U+3000><U+3000>while (r > 0)
      |         ^~~~~~~~
main.c:25:1: error: stray '\343' in program
   25 | <U+3000><U+3000>{
      | ^~~~~~~~
main.c:25:3: error: stray '\343' in program
   25 | <U+3000><U+3000>{
      |         ^~~~~~~~
main.c:29:1: error: stray '\343' in program
   29 | <U+3000><U+3000>}
      | ^~~~~~~~
main.c:29:3: error: stray '\343' in program
   29 | <U+3000><U+3000>}
      |         ^~~~~~~~
Language: C

#include<stdio.h>

int func(int,int);

int main()
{
    int w,h,c;
    int s;
    
    scanf("%d %d %d",&w,&h,&c);
    s = func( w,h );
    
    h /= s;
    w /= s;
    
    printf("%d\n",h*w*c);
    
    return 0;
}
int func(int a,int b)
{
    int r;
    r = a % b;
　　while(r>0)
　　{
　　    a = b;
　　    b = r;
　　    r = a % b;
　　}
　　return b;
}


Compiler output:
main.c: In function 'func':
main.c:24:1: error: stray '\343' in program
   24 | <U+3000><U+3000>while(r>0)
      | ^~~~~~~~
main.c:24:3: error: stray '\343' in program
   24 | <U+3000><U+3000>while(r>0)
      |         ^~~~~~~~
main.c:25:1: error: stray '\343' in program
   25 | <U+3000><U+3000>{
      | ^~~~~~~~
main.c:25:3: error: stray '\343' in program
   25 | <U+3000><U+3000>{
      |         ^~~~~~~~
main.c:26:1: error: stray '\343' in program
   26 | <U+3000><U+3000>    a = b;
      | ^~~~~~~~
main.c:26:3: error: stray '\343' in program
   26 | <U+3000><U+3000>    a = b;
      |         ^~~~~~~~
main.c:27:1: error: stray '\343' in program
   27 | <U+3000><U+3000>    b = r;
      | ^~~~~~~~
main.c:27:3: error: stray '\343' in program
   27 | <U+3000><U+3000>    b = r;
      |         ^~~~~~~~
main.c:28:1: error: stray '\343' in program
   28 | <U+3000><U+3000>    r = a % b;
      | ^~~~~~~~
main.c:28:3: error: stray '\343' in program
   28 | <U+3000><U+3000>    r = a % b;
      |         ^~~~~~~~
main.c:29:1: error: stray '\343' in program
   29 | <U+3000><U+3000>}
      | ^~~~~~~~
main.c:29:3: error: stray '\343' in program
   29 | <U+3000><U+3000>}
      |         ^~~~~~~~
main.c:30:1: error: stray '\343' in program
   30 | <U+3000><U+3000>return b;
      | ^~~~~~~~
main.c:30:3: error: stray '\343' in program
   30 | <U+3000><U+3000>return b;
      |         ^~~~~~~~
Language: C

#include<stdio.h>
int lcm(int,int);
int main(){
 int w,h,c,a,b;
 scanf("%d%d%d",&w,&h,&c);
 if(w>h){
  a=lcm(w,h);
 }
 else if(w=h){
  a=w;
 }
 else[
  a=lcm(h,w);
 }
 b=(w/a)*(h/a)*c;
 printf("%d",b);
 return 0;
}

int lcm(int x,int y){
 int z;
 while(x%y!=0){
  z=x%y;
  x=y;
  y=z;
 }
 return y;
}

Compiler output:
main.c: In function 'main':
main.c:12:6: error: expected expression before '[' token
   12 |  else[
      |      ^
main.c:13:14: error: expected ';' before '}' token
   13 |   a=lcm(h,w);
      |              ^
      |              ;
   14 |  }
      |  ~            
main.c: At top level:
main.c:15:2: warning: data definition has no type or storage class
   15 |  b=(w/a)*(h/a)*c;
      |  ^
main.c:15:2: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:15:5: error: 'w' undeclared here (not in a function)
   15 |  b=(w/a)*(h/a)*c;
      |     ^
main.c:15:7: error: 'a' undeclared here (not in a function)
   15 |  b=(w/a)*(h/a)*c;
      |       ^
main.c:15:11: error: 'h' undeclared here (not in a function)
   15 |  b=(w/a)*(h/a)*c;
      |           ^
main.c:15:16: error: 'c' undeclared here (not in a function)
   15 |  b=(w/a)*(h/a)*c;
      |                ^
main.c:16:9: error: expected declaration specifiers or '...' before string constant
   16 |  printf("%d",b);
      |         ^~~~
main.c:16:14: error: expected declaration specifiers or '...' before 'b'
   16 |  printf("%d",b);
      |              ^
main.c:17:2: error: expected identifier or '(' before 'return'
   17 |  return 0;
      |  ^~~~~~
main.c:18:1: error: expected identifier or '(' before '}' token
   18 | }
      | ^
Language: C

#include<stdio.h>
int lcm(int,int);
int main(){
 int w,h,c,a,e,f;
 scanf("%d%d%d",&w,&h,&c);
 if(w>h){
  a=lcm(w,h);
 }
 else if(w=h){
  a=w;
 }
 else{
  a=lcm(h,w);
 }
 e=w/a;
 f=h/a;
 b=c*e*f;
 printf("%d",b);
 return 0;
}

int lcm(int x,int y){
 int z;
 while(x%y!=0){
  z=x%y;
  x=y;
  y=z;
 }
 return y;
}

Compiler output:
main.c: In function 'main':
main.c:17:2: error: 'b' undeclared (first use in this function)
   17 |  b=c*e*f;
      |  ^
main.c:17:2: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int gcd(int,int);
int main(){
 int w,h,a,b,c,d;
 scanf("%d%d%d",&w,&h,&c);
 if(w>h){
  a=gcd(w,h);
 else if(w==h){
  a=w;
 }
 else{
  a=gcm(h,w);
 }
 b=w*h*c;
 d=b/a;
 printf("%d",d/a);
 return(0);
}

int gcd(int p,int q){
 int r;
 r=p%q;
 while(r!=0){
  p=q;
  q=r;
  r=p%q;
 }
 return q;
}


 

Compiler output:
main.c: In function 'main':
main.c:8:2: error: expected '}' before 'else'
    8 |  else if(w==h){
      |  ^~~~
main.c:12:5: error: implicit declaration of function 'gcm'; did you mean 'gcd'? [-Wimplicit-function-declaration]
   12 |   a=gcm(h,w);
      |     ^~~
      |     gcd
Language: C

#include<stdio.h>
int gcd(int,int);
int main(void)
{
 int a,b,c,d,h,w;
 scanf("%d%d%d",&w,%h,&c);
 if(w>h){
  a=gcm(w,h);
 }
 else if(w==h){
  a=w;
 }
 else{
  a=gcm(h,w);
 }
 b=w/a;
 d=h/a;
 printf("%d",b*c*d);
 return(0);
}

int gcd(int p,int q)
{
 int r;
 r=p%q;
 while(r!=0){
  p=q;
  q=r;
  r=p%q;
 }
 return q;
}

Compiler output:
main.c: In function 'main':
main.c:6:20: error: expected expression before '%' token
    6 |  scanf("%d%d%d",&w,%h,&c);
      |                    ^
main.c:8:5: error: implicit declaration of function 'gcm'; did you mean 'gcd'? [-Wimplicit-function-declaration]
    8 |   a=gcm(w,h);
      |     ^~~
      |     gcd
Language: C

#include<stdio.h>
int gcd(int,int);
int main(void)
{
 int a,b,c,d,h,w;
 scanf("%d%d%d",&w,&h,&c);
 if(w>h){
  a=gcm(w,h);
 }
 else if(w==h){
  a=w;
 }
 else{
  a=gcm(h,w);
 }
 b=w/a;
 d=h/a;
 printf("%d",b*c*d);
 return(0);
}

int gcd(int p,int q)
{
 int r;
 r=p%q;
 while(r!=0){
  p=q;
  q=r;
  r=p%q;
 }
 return q;
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'gcm'; did you mean 'gcd'? [-Wimplicit-function-declaration]
    8 |   a=gcm(w,h);
      |     ^~~
      |     gcd
Language: C

#include<stdio.h>
int gcd(int p,int q)
{
 int r;
 r=p%q;
 while(r!=0){
  p=q;
  q=r;
  r=p%q;
 }
 return q;
}


int main(void)
{
 int a,b,c,d,h,w;
 scanf("%d%d%d",&w,&h,&c);
 if(w>h){
  a=gcm(w,h);
 }
 else if(w==h){
  a=w;
 }
 else{
  a=gcm(h,w);
 }
 b=w/a;
 d=h/a;
 printf("%d",b*c*d);
 return(0);
}

Compiler output:
main.c: In function 'main':
main.c:20:5: error: implicit declaration of function 'gcm'; did you mean 'gcd'? [-Wimplicit-function-declaration]
   20 |   a=gcm(w,h);
      |     ^~~
      |     gcd
Language: C++

#include<iostream>
using namespace std;

int gcd(){
  if(n==0)
    return m;
  return gcd(n, m%n);
}

int main(){
  int W,H,C;
  cin >> W >> H >> C;

  int g = gcd(W, H);

  cout << W/g*H/g*C << endl;
  return 0;
}



Compiler output:
a.cc: In function 'int gcd()':
a.cc:5:6: error: 'n' was not declared in this scope
    5 |   if(n==0)
      |      ^
a.cc:6:12: error: 'm' was not declared in this scope; did you mean 'tm'?
    6 |     return m;
      |            ^
      |            tm
a.cc:7:14: error: 'n' was not declared in this scope
    7 |   return gcd(n, m%n);
      |              ^
a.cc:7:17: error: 'm' was not declared in this scope; did you mean 'tm'?
    7 |   return gcd(n, m%n);
      |                 ^
      |                 tm
a.cc: In function 'int main()':
a.cc:14:14: error: too many arguments to function 'int gcd()'
   14 |   int g = gcd(W, H);
      |           ~~~^~~~~~
a.cc:4:5: note: declared here
    4 | int gcd(){
      |     ^~~
Language: C++

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

using namespace std;

int maxi(int x,int y){
  if(y==0 || x==y) return x;
  else if(x==1 || y==1) return 1;
  else if(x>y) return maxi(y,x%y);
  else return maxi(x,y%x);
}

int pow(int x) return x*x;

int main(){
  int w,h,c;
  cin >> w >> h >> c;

  cout << (w*h/pow(maxi(w,h)))*c << endl
    
  return 0;
}



Compiler output:
a.cc: In function 'int pow(int)':
a.cc:14:16: error: named return values are no longer supported
   14 | int pow(int x) return x*x;
      |                ^~~~~~
a.cc:20:41: error: expected ';' before 'return'
   20 |   cout << (w*h/pow(maxi(w,h)))*c << endl
      |                                         ^
      |                                         ;
   21 | 
   22 |   return 0;
      |   ~~~~~~                                 
a.cc:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
   23 | }
      | ^
Language: C++

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

using namespace std;

int maxi(int x,int y){
  if(y==0 || x==y) return x;
  else if(x==1 || y==1) return 1;
  else if(x>y) return maxi(y,x%y);
  else return maxi(x,y%x);
}

int powx(int x) return x*x;

int main(){
  int w,h,c;
  cin >> w >> h >> c;

  cout << (w*h/powx(maxi(w,h)))*c << endl;
    
  return 0;
}



Compiler output:
a.cc: In function 'int powx(int)':
a.cc:14:17: error: named return values are no longer supported
   14 | int powx(int x) return x*x;
      |                 ^~~~~~
Language: C++

#include<bits/std++.h>
using namespace std;
int main(){
  int w,h,c;
  int sum = 0;
  cin >> w >> h >> c;
  while(w==0 || h==0){
    if(w>h){
      w = w-h;
      sum = sum+c;
    }
    if(h>w){
      h = h-w;
      sum = sum+c;
    }
    if(h==w){
      h=h-w;
      sum = sum+c;
    }
  }
  cout << sum <<endl;

}



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

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

int main(){
  int W,H,C,X;

  cin>>W>>H>>C;

  if((W*H)%(X*X)==0){
    cout<<C*X*X<<endl;
    return 0;

  }



Compiler output:
a.cc: In function 'int main()':
a.cc:13:4: error: expected '}' at end of input
   13 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int w,h,c,i,num;
  int sum = 0;
  cin >> w >> h >> c;
  if(h == w) cout << c << endl;
    while(1){
      if(w>h){
	if(w%h == 0){
	  num = h;
	  break;
	}
	w = w%h;
      }
      if(h>w){
	if(h%w == 0){
	  num =w;
	  break;
	}
	h = h%w;
      }

  cout << ((h*w)/(num*num))*c << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,b,c,d,e;
  cin>>a>>b>>c;
  d=__gcd(a,b);
  cout<<(a/d)*(b/d)*c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: '__gcd' was not declared in this scope
    6 |   d=__gcd(a,b);
      |     ^~~~~
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(){
  int W,H,C;
  cin>>W>>H>>C;
  int squares=gcd(W,H);
  cout<<square*C<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'gcd' was not declared in this scope
    9 |   int squares=gcd(W,H);
      |               ^~~
a.cc:10:9: error: 'square' was not declared in this scope; did you mean 'squares'?
   10 |   cout<<square*C<<endl;
      |         ^~~~~~
      |         squares
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main(){
  int W,H,C;
  cin>>W>>H>>C;
  int squares=gcd(W,H);
  cout<<square*C<<endl;
  #include <iostream>
#include <algorithm>

using namespace std;
int gcd( int m, int n )
{
	// ?????°?????????????????´??????????????????
	if ( ( 0 == m ) || ( 0 == n ) )
		return 0;

	// ???????????????????????????
	while( m != n )
	{
		if ( m > n ) m = m - n;
		else         n = n - m;
	}
	return m;
}//gcd
int main(){
  int W,H,C;
  cin>>W>>H>>C;
  int squares=gcd(W,H);
  cout<<W/squares*H/squares*C<<endl;

  return 0;
}

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'gcd' was not declared in this scope
    9 |   int squares=gcd(W,H);
      |               ^~~
a.cc:10:9: error: 'square' was not declared in this scope; did you mean 'squares'?
   10 |   cout<<square*C<<endl;
      |         ^~~~~~
      |         squares
a.cc:16:1: error: a function-definition is not allowed here before '{' token
   16 | {
      | ^
a.cc:29:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   29 | int main(){
      |         ^~
a.cc:29:9: note: remove parentheses to default-initialize a variable
   29 | int main(){
      |         ^~
      |         --
a.cc:29:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:29:11: error: a function-definition is not allowed here before '{' token
   29 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int gcd(int m,int n)
{
  if(n==0){
    return m;
  }
  return gcd(n,m%n)
}
int main()
{
  int W,H,C;
  cin>>W>>H>>C;

  int g=gcd(W,H);
  cout<<W/g*H/g*C<<endl;

  return 0;
}

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:9:20: error: expected ';' before '}' token
    9 |   return gcd(n,m%n)
      |                    ^
      |                    ;
   10 | }
      | ~
Language: C++

#include<iostream>
using namespace std;

int gcd(int m,int n)
{
  if(n==0){
    return m;
  }
  return gcd(n,m%n)
}

int main()
{
  int W,H,C;
  cin>>W>>H>>C;

  int g=gcd(W,H);
  cout<<W/g*H/g*C<<endl;

  return 0;
}

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:9:20: error: expected ';' before '}' token
    9 |   return gcd(n,m%n)
      |                    ^
      |                    ;
   10 | }
      | ~
Language: C++

#include<iostream>
using namespace std;
int main(void){
 int w,h,c;
 cin>>w;
 cin>>h;
 int a=w;
 int b=h;
 while(a%b!=0){
   int d=a%b
   a=b;
   b=d;
 }
 int e=w/b;
 int f=h/b;
 int g=e*f*c;
 cout<<c<<endl;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:4: error: expected ',' or ';' before 'a'
   11 |    a=b;
      |    ^
Language: C++

#include <bits/stdc++.h>  

using namespace std;

//#define int long long
#define FOR(i, j, k) for(int i = j; i < (int)k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define INF (1 << 30)

typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> Pi;

const int MOD = 1e9 + 7;
const int dy[] = {0, 0, 1, -1};
const int dx[] = {1, -1, 0, 0};

template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }
template<typename T> T gcd(T a, T b) { return (b == 0 ? a : gcd(b, a % b)); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int w, h, c;
    cin >> w >> h >> c;
    int tmp = gcd(w, h);
    cout << ((w * h) / (tmp * tmp)) * c2 << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:39: error: 'c2' was not declared in this scope; did you mean 'c'?
   30 |     cout << ((w * h) / (tmp * tmp)) * c2 << endl;
      |                                       ^~
      |                                       c
Language: C++

#include <iostream>
using namespace std;

int main ()
{
	int a[2],z,p = 0,pp = 0,q = 0;

	cin >> a[0] >> a[1] >> z;

	sort (a,a + 2);
	for (int i = a[1]; i > 0; i--)
	{
		for (int j = 1; j < 100; j++)
		{
			for (int k = 1; k < 100; k++)
			{
				if (i * j == a[0] && i * k == a[1])
				{
					p = j;
					pp = k;
					q += 1;
					break;
				}
			}
			if (q != 0)
			{
				break;
			}
		}
		if (q != 0)
		{
			break;
		}
	}

	cout << (p * pp) * z << endl;
}


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

#include<bits/stdc++.h>

using namespace std;


int main(){

int W,H,C,cost;
cin>>W>>H>>C;

if(W==H)cost=C;

if(W>H){
for(int i=W;i>0;i--){

if(W%i==0){
if(H%i==0){
cost=((W/i)*(H/i))*C;
break;
}}}

cout<<C<<endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^