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

include<stdio.h>


//公約数の関数
unsigned long long int kouyakusuu_f(unsigned long long int a,unsigned long long int b)
{
	//返す変数
	unsigned long long int kouyakusuu_ans = 0;

	//無限ループ
	for (unsigned long long int i = a;;i -= 2)
	{
		//両方割れるなら
		if (a %i == 0)
		{
			if (b % i == 0)
			{
				kouyakusuu_ans = i;
				break;
			}
		}
	}

	return kouyakusuu_ans;
}



//公倍数の関数
unsigned long long int koubaisuu_f(unsigned long long int a,unsigned long long int b)
{
	//保存用変数(aとbをもう入れちゃう)
	unsigned long long int hozon1 = a,hozon2 = b;
	//インクリメント変数
	int count1 = 0,count2 = 0;

	//合うまで続ける
	while (hozon1 != hozon2)
	{
		//aのほうが小さいとき(bが大きい)
		while (hozon1 < hozon2)
		{
			count1++;
			//小さいaを少しずつ増やす
			hozon1 = a * count1;
		}
		//bの方が小さいとき(aが大きい)
		while (hozon2 < hozon1)
		{
			count2++;
			//小さいbを少しずつ増やす
			hozon2 = b * count2;
		}
	}

	//どうせ同じだからどっちでも問題ない
	return hozon1;
}




int main(void)
{
	//公倍数と公約数
	unsigned long long int kouyakusuu = 0;
	unsigned long long int koubaisuu = 0;
	//入力
	unsigned long long int a = 0,b = 0;

	//回しまくる
	while (scanf("%d %d",&a,&b) != EOF)
	{
		//同じ値ならそのマンまでいいでしょう
		if (a != b)
		{
			//公約数を関数よりもとめる
			kouyakusuu = kouyakusuu_f(a,b);
			//公倍数を関数により求める
			koubaisuu = koubaisuu_f(a,b);
		}
		//同じ値ならそのまま
		else
		{
			koubaisuu = a;
			kouyakusuu = a;
		}
		//表示
		printf("%llu %llu\n",kouyakusuu,koubaisuu);
	}

	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<stdio.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:72:16: error: 'scanf' was not declared in this scope
   72 |         while (scanf("%d %d",&a,&b) != EOF)
      |                ^~~~~
a.cc:72:40: error: 'EOF' was not declared in this scope
   72 |         while (scanf("%d %d",&a,&b) != EOF)
      |                                        ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include<stdio.h>
a.cc:78:38: error: 'kouyakusuu_f' was not declared in this scope; did you mean 'kouyakusuu'?
   78 |                         kouyakusuu = kouyakusuu_f(a,b);
      |                                      ^~~~~~~~~~~~
      |                                      kouyakusuu
a.cc:89:17: error: 'printf' was not declared in this scope
   89 |                 printf("%llu %llu\n",kouyakusuu,koubaisuu);
      |                 ^~~~~~
a.cc:89:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <cstdio>
#include <cstdlib>
using namespace std;

int main() {
	for(long long a, b; scanf("%lld %lld", &a, &b) == 2;) {
		long long g = __gcd(a, b);
		printf("%lld %lld\n", g, a / g * b);
	}

	return EXIT_SUCCESS;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:31: error: '__gcd' was not declared in this scope; did you mean '__gid_t'?
    7 |                 long long g = __gcd(a, b);
      |                               ^~~~~
      |                               __gid_t
Language: C++

#include<iostream>
using namespace std;
int main(){
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 lcm( int m, int n )
{
	// 引数に０がある場合は０を返す
	if ( ( 0 == m ) || ( 0 == n ) )
		return 0;
	
	return ((m / gcd(m, n)) * n); // lcm = m * n / gcd(m,n)
}//lcm
 cout << lcm << ' ' << gcd << endl;
 retrun 0;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: a function-definition is not allowed here before '{' token
    5 | {
      | ^
a.cc:19:1: error: a function-definition is not allowed here before '{' token
   19 | {
      | ^
a.cc:26:10: error: 'lcm' was not declared in this scope
   26 |  cout << lcm << ' ' << gcd << endl;
      |          ^~~
a.cc:26:24: error: 'gcd' was not declared in this scope
   26 |  cout << lcm << ' ' << gcd << endl;
      |                        ^~~
a.cc:27:2: error: 'retrun' was not declared in this scope
   27 |  retrun 0;
      |  ^~~~~~
Language: C++

#include<iostream>
using namespace std;

long main(){
	long long int a,b;
	while(cin>>a>>b){
		long long int c=a,d=b;
		while(c!=d){
			if(c>d){
				d+=b;
			}else{
				c+=a;
			}
		}
		while(1){
			d=a%b;
			if(d==0)break;
			a=b;
			b=d;
		}
		cout<<c<<' '<<b<<endl;
	}
	return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

int gcd(int x,int y){
	if(y==0)return x;
	else return gcd(y,x%y);
}
int main(){
	for(int i=0;i<5;i++){
		int a,b;
		std::cin>>a>>b;
		std::cout<<gcd(a,b)<<" "<<a/gcd(a,b)*b<<std::endl;
		
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'cin' is not a member of 'std'
    8 |                 std::cin>>a>>b;
      |                      ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int gcd(int x,int y){
a.cc:9:22: error: 'cout' is not a member of 'std'
    9 |                 std::cout<<gcd(a,b)<<" "<<a/gcd(a,b)*b<<std::endl;
      |                      ^~~~
a.cc:9:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:62: error: 'endl' is not a member of 'std'
    9 |                 std::cout<<gcd(a,b)<<" "<<a/gcd(a,b)*b<<std::endl;
      |                                                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int gcd(int x,int y){
Language: C++

//----- ユークリッドの互除法を行う関数 -----//

int f_kouyakusuu(int , int , int*);

//----- 最小公倍数を求める関数 -----//

int f_koubaisuu(int , int , int*);


//*****----- main -----*****//

int main(void)
{
	//入力変数2つ
	int x = 0 , y = 0;
	//公約数と公倍数は保存しておかなければならない
	int kouyakusuu = 0 , koubaisuu = 0;

	while (scanf("%d %d" , &x , &y) != EOF)
	{
		koubaisuu = f_koubaisuu(x , y , &kouyakusuu);
		printf("%d %d\n" , kouyakusuu , koubaisuu);
	}

	return 0;
}




//*****----- ユークリッドの互除法を利用する関数 -----*****//

int f_kouyakusuu(int x , int y , int *kouyakusuu)	//最初ｘ＜ｙでもforによって入れ替えられる
{
	//保存変数
	int hozon = 0;

	//割って0になるまで
	while ((hozon = x % y) != 0)
	{
		x = y;
		y = hozon;
	}

	//公約数を保存する
	*kouyakusuu = y;
	//最後に割ったｘを返す
	return y;
}



//*****----- 最小公倍数を求めるプログラム *****-----//

int f_koubaisuu(int x , int y , int *kouyakusuu)
{
	//最初に計算して値を小さくする
	int modoriti = f_kouyakusuu(x , y , kouyakusuu);
	//値がでかいので工夫
	unsigned long long int hozon = x * y;
	hozon = x / modoriti;
	//計算して値を返す
	return hozon * y;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: 'scanf' was not declared in this scope
   19 |         while (scanf("%d %d" , &x , &y) != EOF)
      |                ^~~~~
a.cc:19:44: error: 'EOF' was not declared in this scope
   19 |         while (scanf("%d %d" , &x , &y) != EOF)
      |                                            ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | //----- ユークリッドの互除法を行う関数 -----//
a.cc:22:17: error: 'printf' was not declared in this scope
   22 |                 printf("%d %d\n" , kouyakusuu , koubaisuu);
      |                 ^~~~~~
a.cc:22:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
using namespace std;

typedef long long lli;

lli gcd(lli a, lli b) {
  return b == 0 ? a : gcd(b, a%b);
}

lli lcm(lli a, lli b) {
  return *b/gcd(a,b);
}

int main() {
  lli a, b;

  while(cin >> a >> b) {
    cout << gcd(a, b) << " " << lcm(a, b) << endl;
  }
}

Compiler output:
a.cc: In function 'lli lcm(lli, lli)':
a.cc:11:10: error: invalid type argument of unary '*' (have 'lli' {aka 'long long int'})
   11 |   return *b/gcd(a,b);
      |          ^~
Language: C++

#include <iostream>
using namespace std;

typedef long long lli;

lli gcd(lli a, lli b) {
  return b == 0 ? a : gcd(b, a%b);
}

lli lcm(lli a, lli b) {
  return *b/gcd(a,b);
}

int main() {
  lli a, b;

  while(cin >> a >> b) {
    cout << gcd(a, b) << " " << lcm(a, b) << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'lli lcm(lli, lli)':
a.cc:11:10: error: invalid type argument of unary '*' (have 'lli' {aka 'long long int'})
   11 |   return *b/gcd(a,b);
      |          ^~
Language: C++

#include <stdio.h>
int main(void){
    int a,b,d;
    while(~scanf("%d%d",&a,&b)){
        int&t=a<b?a:b,n=1;
        d=t;
        while(d>1){
            if(a%d||b%d)d--;
            else a/=d,b/=d,n*=d,d=t;
        }
        printf("%d %d\n",n,n*a*b);
    }
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: expected '}' at end of input
   13 |     return 0;
      |              ^
a.cc:2:15: note: to match this '{'
    2 | int main(void){
      |               ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
long koyaku(long a,long b);

int main(){
	long c,d,e;
	unsigned long f;
	while(cin>>c>>d){
		e=koyaku(c,d);
		f=c/e*d;
		cout<<e<<" "<<f<<endl;
	}
	return 0;
}

long koyaku(long a,long b){
	long n=max(a,b);
	long ans=1;
	for(long i=1;i<=n/2;i++){
		if(a%i==0&&b%i==0)ans=i;
	}
	if(a%n==0&&b%n==0)ans=n;
	return

Compiler output:
a.cc: In function 'long int koyaku(long int, long int)':
a.cc:24:15: error: expected primary-expression at end of input
   24 |         return
      |               ^
a.cc:24:15: error: expected ';' at end of input
   24 |         return
      |               ^
      |               ;
a.cc:24:15: error: expected '}' at end of input
a.cc:17:27: note: to match this '{'
   17 | long koyaku(long a,long b){
      |                           ^
Language: C++

#include <stdio.h>

int main(){
long int a,b,aa,bb;
long int x,y;

while(scanf("%d %d",&a,&b) != EOF){
aa=a;
bb=b;
while(a%b!=0){
x=a%b;
a=b;
b=x;
}
for(i=1;i<=aa*bb;i++){
if(i%aa==0 && i%bb==0){
y=i;
break;
}
}
printf("%d %d\n",b,y);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'i' was not declared in this scope
   15 | for(i=1;i<=aa*bb;i++){
      |     ^
Language: C++


#include<iostream>
#include <xiosbase>
using namespace std;
long long gcd(long long a,long long b)
{
    if(b==0) return a;
    else return gcd(b,a%b);
}
long long kmm(long long a,long long b)
{
    return a*b/gcd(a,b);
}
int main()
{
	system("CLS");
    long long a,b;
    cin>>a>>b;
	while(!cin.eof())
	{
	cout<<gcd(a,b);
	cout<<" ";
	cout<<kmm(a,b);
	cout<<endl;
	cin>>a>>b;

	}
    return 0;
}

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

/* -*- coding:utf-8 -*- */

#include <iostream>
#include <boost/math/common_factor_rt.hpp>

using namespace std;

int main(void)
{
  int a, b;
  while(cin >> a >> b, !cin.eof()) 
    cout << boost::math::gcd(a,b) << ' ' << boost::math::lcm(a,b) << endl;
  
  return 0;
}

Compiler output:
a.cc:4:10: fatal error: boost/math/common_factor_rt.hpp: No such file or directory
    4 | #include <boost/math/common_factor_rt.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

include <iostream>
using namespace std;
int main(){
int a,b;
while(cin>>a>>b){
int max=0,min;
for(int i=a;max=0;i--){
if(a%i==0 && b%i==0){
max=i;}}
min=(a/max)*b;
cout<<max<<" "<<min<<endl;
}
return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:7: error: 'cin' was not declared in this scope
    5 | while(cin>>a>>b){
      |       ^~~
a.cc:11:1: error: 'cout' was not declared in this scope
   11 | cout<<max<<" "<<min<<endl;
      | ^~~~
a.cc:11:22: error: 'endl' was not declared in this scope
   11 | cout<<max<<" "<<min<<endl;
      |                      ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int a,b,i;
while(cin>>a>>b){
int max=0,min;
i=1;
while(r!=0){
r=x%y;
x=y;
y=r;
}
max=x;
min=(a/max)*b;
cout<<max<<" "<<min<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'r' was not declared in this scope
    8 | while(r!=0){
      |       ^
a.cc:9:3: error: 'x' was not declared in this scope
    9 | r=x%y;
      |   ^
a.cc:9:5: error: 'y' was not declared in this scope
    9 | r=x%y;
      |     ^
a.cc:13:5: error: 'x' was not declared in this scope
   13 | max=x;
      |     ^
Language: C++

#include <iostream>
using namespace std;

int main() {
	int a,b,c,e,f;
	while(cin>>a>>b){
		int g=0,l=0;
		e=a;
		f=b;
		if(e>f){
			e=e-f;
		}
	    if(f>e){
	    	f=f-e;
	    }
	    if(f==e){
	    	l=e;
	    }
	    if(l!=0)break;
		cout<<l<<" "<<a*b/l<<endl;
	    }
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: expected '}' at end of input
   22 |         return 0;
      |                  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

long long main() {
	int a,b,e,f;
	while(cin>>a>>b){
		int l;
		e=a;
		f=b;
		while(1){
		if(e>f){
			e=e%f;
		}
	    if(f>e){
	    	f=f%e;
	    }
	    if(f==e){
	    	l=e;
	    	cout<<l<<" "<<(a*b)/l<<endl;
	    	break;
	    }
		}
	}
	return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<iostream>
#define nijuoku 2000000000

using namespace std;


int saidaikouyaku(__int64 a, __int64 b){
    int big    = max(a,b);
    int little = min(a,b);
    
    for(__int64 i = little; i > 1; --i){
        if(little % i == 0 && big % i == 0)return i;        
    }
    return -1;
}

int saisyoukoubai(__int64 a, __int64 b){
    
    int big    = max(a,b);
    int little = min(a,b);
    
    for(__int64 i = big; i < nijuoku; i += big){
        if(i % little == 0)return i;        
    }
    return -1;
};


            
int main(){

    __int64 a, b;
    
    while(cin >> a >> b){
        cout << saidaikouyaku(a,b) << ' ' << saisyoukoubai(a,b) << endl;
	}
	return 0;
}

Compiler output:
a.cc:7:19: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    7 | int saidaikouyaku(__int64 a, __int64 b){
      |                   ^~~~~~~
      |                   __int64_t
a.cc:7:30: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    7 | int saidaikouyaku(__int64 a, __int64 b){
      |                              ^~~~~~~
      |                              __int64_t
a.cc:7:39: error: expression list treated as compound expression in initializer [-fpermissive]
    7 | int saidaikouyaku(__int64 a, __int64 b){
      |                                       ^
a.cc:17:19: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   17 | int saisyoukoubai(__int64 a, __int64 b){
      |                   ^~~~~~~
      |                   __int64_t
a.cc:17:30: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   17 | int saisyoukoubai(__int64 a, __int64 b){
      |                              ^~~~~~~
      |                              __int64_t
a.cc:17:39: error: expression list treated as compound expression in initializer [-fpermissive]
   17 | int saisyoukoubai(__int64 a, __int64 b){
      |                                       ^
a.cc: In function 'int main()':
a.cc:32:5: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
   32 |     __int64 a, b;
      |     ^~~~~~~
      |     __int64_t
a.cc:34:18: error: 'a' was not declared in this scope
   34 |     while(cin >> a >> b){
      |                  ^
a.cc:34:23: error: 'b' was not declared in this scope
   34 |     while(cin >> a >> b){
      |                       ^
a.cc:35:30: error: 'saidaikouyaku' cannot be used as a function
   35 |         cout << saidaikouyaku(a,b) << ' ' << saisyoukoubai(a,b) << endl;
      |                 ~~~~~~~~~~~~~^~~~~
a.cc:35:59: error: 'saisyoukoubai' cannot be used as a function
   35 |         cout << saidaikouyaku(a,b) << ' ' << saisyoukoubai(a,b) << endl;
      |                                              ~~~~~~~~~~~~~^~~~~
Language: C++

#include <iostream>
#include <cmath>

using namespace std;

int rez(int64_t a, int64_t b)
{
   if(b == 0)return a;
   else
   return rez(b, a%b);
}

int main()
{
    while(x != -1)
{
   int a, b;
   cin >> a >> b;
   cout << rez(a, b) << (a*b)/rez(a, b) << endl;
}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: 'x' was not declared in this scope
   15 |     while(x != -1)
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
   int a, b, tmp, m=0, s=0, ai, bi;
   while(cin >> a >> b){
      ai=a; bi=b;
      while(1){
         if(a<b){
            tmp=a;
            a=b;
            b=tmp;
         }
         if(a%b==0){
            m=b;
            break;
         }else a=a%b;
         }
      }
      s=ai*bi/m;
      cout<< m << " " << s << endl;
   }
   return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  int a,b;
  while(cin.peek!=EOF)
  {
    cin>>a>>b;
    int w=a,f=b;
    int temp=a%b;
    while(temp!=0)
    {
      a=b;
      b=temp;
      temp=a%b;
    }
    cout<<b<<" "<<w/b*f<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: invalid use of member function 'std::basic_istream<_CharT, _Traits>::int_type std::basic_istream<_CharT, _Traits>::peek() [with _CharT = char; _Traits = std::char_traits<char>; int_type = int]' (did you forget the '()' ?)
    6 |   while(cin.peek!=EOF)
      |         ~~~~^~~~
      |                 ()
Language: C++

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

int main() {
	// your code goes here
	int a,b;
	int miner,maxer;
	while(cin >> a >> b){
		int a2=a,b2=b;
		while(max(a2,b2)%min(a2,b2)!=0){
			if(a2>b2)
			a2=a2-b2;
			else
			b2=b2-a2;
		}
		miner =min(a2,b2)
		cout << miner << endl;
		cout << a*b/miner << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:34: error: expected ';' before 'cout'
   17 |                 miner =min(a2,b2)
      |                                  ^
      |                                  ;
   18 |                 cout << miner << endl;
      |                 ~~~~
Language: C++

#include <stdio.h>

int main( void ){
    unsigned float a[20],b[20];
    int nCount;
    for( int i = 0;scanf( "%f %f",&a[i],&b[i] ) != EOF;i++ ) nCount = i;

    for( int k = 0;k < i;k++ ){
        unsigned float buf_a = a[k],buf_b = b[k];

        while( buf_a != buf_b ){
            if( buf_a < buf_b ) buf_a += a[k];
            else                      buf_b += b[k];
        }
        printf( "%d ",( int )buf_a );
        int m,n;
        if( a[k] < b[k] ) m = b[k],n = a[k];
        else if( a[k] > b[k] ) n = b[k],m = a[k];
        else {
            printf( "%d\n",a[k] );
            continue;
        }
        while( true ){
            int buf = n;
            n = m % n;
            m = buf;
            if( n == 0 ) {
                printf( "%d\n",m );
                break;
            }
        }
    }
    return 0;
}
               

    

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'unsigned' specified with 'float'
    4 |     unsigned float a[20],b[20];
      |     ^~~~~~~~
a.cc:4:5: error: 'unsigned' specified with 'float'
a.cc:8:24: error: 'i' was not declared in this scope
    8 |     for( int k = 0;k < i;k++ ){
      |                        ^
a.cc:9:9: error: 'unsigned' specified with 'float'
    9 |         unsigned float buf_a = a[k],buf_b = b[k];
      |         ^~~~~~~~
a.cc:9:9: error: 'unsigned' specified with 'float'
Language: C++

#include <stdio.h>

int main( void ){
    float a[20],b[20];
    int nCount;
    for( int i = 0;scanf( "%f %f",&a[i],&b[i] ) != EOF;i++ ) nCount = i;

    for( int k = 0;k < i;k++ ){
         float buf_a = a[k],buf_b = b[k];

        while( buf_a != buf_b ){
            if( buf_a < buf_b ) buf_a += a[k];
            else                      buf_b += b[k];
        }
        printf( "%d ",( int )buf_a );
        int m,n;
        if( a[k] < b[k] ) m = b[k],n = a[k];
        else if( a[k] > b[k] ) n = b[k],m = a[k];
        else {
            printf( "%d\n",a[k] );
            continue;
        }
        while( true ){
            int buf = n;
            n = m % n;
            m = buf;
            if( n == 0 ) {
                printf( "%d\n",m );
                break;
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'i' was not declared in this scope
    8 |     for( int k = 0;k < i;k++ ){
      |                        ^
Language: C++

#include <stdio.h>

int main( ){
    float a[20],b[20];
    int nCount;
    for( int i = 0;scanf( "%f %f",&a[i],&b[i] ) != EOF;i++ ) nCount = i;

    for( int k = 0;k < i;k++ ){
         float buf_a = a[k],buf_b = b[k];

        while( buf_a != buf_b ){
            if( buf_a < buf_b ) buf_a += a[k];
            else                      buf_b += b[k];
        }
        printf( "%d ",( int )buf_a );
        int m,n;
        if( a[k] < b[k] ) m = b[k],n = a[k];
        else if( a[k] > b[k] ) n = b[k],m = a[k];
        else {
            printf( "%d\n",a[k] );
            continue;
        }
        while( true ){
            int buf = n;
            n = m % n;
            m = buf;
            if( n == 0 ) {
                printf( "%d\n",m );
                break;
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'i' was not declared in this scope
    8 |     for( int k = 0;k < i;k++ ){
      |                        ^
Language: C++

#include <stdio.h>

int main( ){
    float a[20],b[20];
    int nCount = 0;
    while( scanf( "%f %f",&a[nCount],&b[nCount] ) != EOF ){
        nCount++;
    }

    for( int k = 0;k < i;k++ ){
         float buf_a = a[k],buf_b = b[k];

        while( buf_a != buf_b ){
            if( buf_a < buf_b ) buf_a += a[k];
            else                      buf_b += b[k];
        }
        printf( "%d ",( int )buf_a );
        int m,n;
        if( a[k] < b[k] ) m = b[k],n = a[k];
        else if( a[k] > b[k] ) n = b[k],m = a[k];
        else {
            printf( "%d\n",a[k] );
            continue;
        }
        while( true ){
            int buf = n;
            n = m % n;
            m = buf;
            if( n == 0 ) {
                printf( "%d\n",m );
                break;
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'i' was not declared in this scope
   10 |     for( int k = 0;k < i;k++ ){
      |                        ^
Language: C++

#include <stdio.h>

int main(){

    int buf1[50],buf[50];

    int k = 0;
    while( scanf( "%d %d",&buf1[k],&buf2[k] ) != EOF ) k++;

    for( int i = 0;i < k;i++ ){
        int b1 = buf1[i],b2 = buf2[i];
        int m,n;
        if( b 1< b2 ){
            m = b2,n = b1;
        } else if( b1 > b2 ){
            m =  b1,n = b2;
        } else printf( "%d ",b2 );

        while( true ){
            int buf = n;
            n = m % n;
            m = buf;
            if( n == 0 ){
                printf( "%d\n",m );
                break;
        }
        while( b1 != b2 ){
            if( b1 < b2 ) b1 += buf1[i];
            else             b2 += buf2[i];
        }
        printf( "%d\n",b1 );
    }
    reutrn 0;
} 
            

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: 'buf2' was not declared in this scope; did you mean 'buf'?
    8 |     while( scanf( "%d %d",&buf1[k],&buf2[k] ) != EOF ) k++;
      |                                     ^~~~
      |                                     buf
a.cc:11:31: error: 'buf2' was not declared in this scope; did you mean 'buf'?
   11 |         int b1 = buf1[i],b2 = buf2[i];
      |                               ^~~~
      |                               buf
a.cc:13:13: error: 'b' was not declared in this scope
   13 |         if( b 1< b2 ){
      |             ^
a.cc:13:14: error: expected ')' before numeric constant
   13 |         if( b 1< b2 ){
      |           ~  ^~
      |              )
a.cc:33:5: error: 'reutrn' was not declared in this scope
   33 |     reutrn 0;
      |     ^~~~~~
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <stdio.h>

int main(){
 
    int buf1[50],buf2[50];
 
    int k = 0;
    while( scanf( "%d %d",&buf1[k],&buf2[k] ) != EOF ) k++;
 
    for( int i = 0;i < k;i++ ){
        int b1 = buf1[i],b2 = buf2[i];
        int m,n;
        if( b 1< b2 ){
            m = b2,n = b1;
        } else if( b1 > b2 ){
            m =  b1,n = b2;
        } else printf( "%d ",b2 );
 
        while( true ){
            int buf = n;
            n = m % n;
            m = buf;
            if( n == 0 ){
                printf( "%d\n",m );
                break;
        }
        while( b1 != b2 ){
            if( b1 < b2 ) b1 += buf1[i];
            else             b2 += buf2[i];
        }
        printf( "%d\n",b1 );
    }
    reutrn 0;
} 
            

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'b' was not declared in this scope
   13 |         if( b 1< b2 ){
      |             ^
a.cc:13:14: error: expected ')' before numeric constant
   13 |         if( b 1< b2 ){
      |           ~  ^~
      |              )
a.cc:33:5: error: 'reutrn' was not declared in this scope
   33 |     reutrn 0;
      |     ^~~~~~
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <stdio.h>

int main(){
 
    int buf1[50],buf2[50];
 
    int k = 0;
    while( scanf( "%d %d",&buf1[k],&buf2[k] ) != EOF ) k++;
 
    for( int i = 0;i < k;i++ ){
        int b1 = buf1[i],b2 = buf2[i];
        int m,n;
        if( b 1< b2 ){
            m = b2,n = b1;
        } else if( b1 > b2 ){
            m =  b1,n = b2;
        } else printf( "%d ",b2 );
 
        while( true ){
            int buf = n;
            n = m % n;
            m = buf;
            if( n == 0 ){
                printf( "%d\n",m );
                break;
            }
        }
        while( b1 != b2 ){
            if( b1 < b2 ) b1 += buf1[i];
            else             b2 += buf2[i];
        }
        printf( "%d\n",b1 );
    }
    reutrn 0;
} 
            

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'b' was not declared in this scope
   13 |         if( b 1< b2 ){
      |             ^
a.cc:13:14: error: expected ')' before numeric constant
   13 |         if( b 1< b2 ){
      |           ~  ^~
      |              )
a.cc:34:5: error: 'reutrn' was not declared in this scope
   34 |     reutrn 0;
      |     ^~~~~~
Language: C++

#include <stdio.h>

int main(){
 
    int buf1[50],buf2[50];
 
    int k = 0;
    while( scanf( "%d %d",&buf1[k],&buf2[k] ) != EOF ) k++;
 
    for( int i = 0;i < k;i++ ){
        int b1 = buf1[i],b2 = buf2[i];
        int m,n;
        if( b1< b2 ){
            m = b2,n = b1;
        } else if( b1 > b2 ){
            m =  b1,n = b2;
        } else printf( "%d ",b2 );
 
        while( true ){
            int buf = n;
            n = m % n;
            m = buf;
            if( n == 0 ){
                printf( "%d\n",m );
                break;
        }
        while( b1 != b2 ){
            if( b1 < b2 ) b1 += buf1[i];
            else             b2 += buf2[i];
        }
        printf( "%d\n",b1 );
    }
    return 0;
} 
            

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


11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
#include <stdio.h>
   
int main(){
    
    int buf1[50],buf2[50];
    
    int k = 0;
    while( scanf( "%d %d",&buf1[k],&buf2[k] ) != EOF ) k++;
    
    for( int i = 0;i < k;i++ ){
        int b1 = buf1[i],b2 = buf2[i];
        int m,n;
        if( b1< b2 ){
            m = b2,n = b1;
        } else if( b1 > b2 ){
            m =  b1,n = b2;
        } else {
            n = 0;
            m = b1;
        }
         
        while( n != 0 ){
            int buf = n;
            n = m % n;
            m = buf;
        }
        printf( "%d ",m );
 
        while( b1 != b2 ){
            if( b1 < b2 ) b1 += buf1[i];
            else             b2 += buf2[i];
        }
        printf( "%d\n",b1 );
    }
    return 0;
}
 

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 11
      | ^~
a.cc: In function 'int main()':
a.cc:36:12: error: 'scanf' was not declared in this scope
   36 |     while( scanf( "%d %d",&buf1[k],&buf2[k] ) != EOF ) k++;
      |            ^~~~~
a.cc:55:9: error: 'printf' was not declared in this scope
   55 |         printf( "%d ",m );
      |         ^~~~~~
a.cc:30:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
   29 | #include <stdio.h>
  +++ |+#include <cstdio>
   30 |
Language: C++

#include <algorithm>
#include <iostream>
int main() {
	long long a, b;
	while (std::cin >> a >> b) {
		std::cout << __gcd(a,b) << " " << a / __gcd(a,b) * b << "\n";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:30: error: '__gcd' was not declared in this scope; did you mean 'std::__gcd'?
    6 |                 std::cout << __gcd(a,b) << " " << a / __gcd(a,b) * b << "\n";
      |                              ^~~~~
      |                              std::__gcd
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1137:5: note: 'std::__gcd' declared here
 1137 |     __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
      |     ^~~~~
Language: C++

#include <iostream>

inline u_long lcm(u_long a, u_long b) {
    return a * b / std::__gcd(a, b);
}

int main(void) {
    u_long a, b;

    while (std::cin >> a >> b) {
        std::cout << std::__gcd(a, b) << " " << lcm(a,b) << std::endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'u_long lcm(u_long, u_long)':
a.cc:4:25: error: '__gcd' is not a member of 'std'
    4 |     return a * b / std::__gcd(a, b);
      |                         ^~~~~
a.cc: In function 'int main()':
a.cc:11:27: error: '__gcd' is not a member of 'std'
   11 |         std::cout << std::__gcd(a, b) << " " << lcm(a,b) << std::endl;
      |                           ^~~~~
Language: C++

#include<iostream>
using namespace std;

//最大公約数
int gcd(int a, int b)
{
    int r;
    while((r = a % b) != 0) 
    {
        a = b;
        b = r;
    }
    return b;
}


//最小公倍数
nt lcm(int a, int b)
{
    return (a * b / gcd(a,b));
}



int main(){

int a,b;

while(cin >> a >> b){
    if(a == -1 or b == -1)  break;
   while(a <= 0 or b <= 0){
       cin >> a >> b;
   }
   if(a > 0 and b > 0){
        cout << gcd(a,b) << lcm(a,b);
    }
}

return 0;
}

Compiler output:
a.cc:18:1: error: 'nt' does not name a type; did you mean 'int'?
   18 | nt lcm(int a, int b)
      | ^~
      | int
a.cc: In function 'int main()':
a.cc:35:29: error: 'lcm' was not declared in this scope
   35 |         cout << gcd(a,b) << lcm(a,b);
      |                             ^~~
Language: C++

#include<iostream>

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

int lcm(int a, int b){
    return ((a / gcd(a, b)) * b);
}

int main(){
    int a,b;
    while(cin >> a >> b){
        if(a == -1 or b == -1)  break;
        std::cin >> a >> b;
        std::cout << gcd(a, b) << " " << lcm(a, b)<< std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   17 |     while(cin >> a >> b){
      |           ^~~
      |           std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>

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

int lcm(int a, int b){
    return ((a / gcd(a, b)) * b);
}

int main(){
    int a,b;
    while(std::cin >> a >> b){
        if(a == -1 or b == -1)  break;
        cin >> a >> b;
        std::cout << gcd(a, b) << " " << lcm(a, b)<< std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   19 |         cin >> a >> b;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: C++

#include<iostream>

int gcd(int a, int b){
    while((int remainder = a % b) != 0) {
        a = b;
        b = remainder;
    }
    return b;
}

int lcm(int a, int b){
    return ((a / gcd(a, b)) * b);
}

int main(){
    int a,b;
    while(std::cin >> a >> b){
        if(a == -1 or b == -1)  break;
        std::cout << gcd(a, b) << " " << lcm(a, b)<< std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:4:12: error: expected primary-expression before 'int'
    4 |     while((int remainder = a % b) != 0) {
      |            ^~~
a.cc:4:12: error: expected ')' before 'int'
    4 |     while((int remainder = a % b) != 0) {
      |           ~^~~
      |            )
a.cc:7:6: error: expected ')' before 'return'
    7 |     }
      |      ^
      |      )
    8 |     return b;
      |     ~~~~~~
a.cc:4:10: note: to match this '('
    4 |     while((int remainder = a % b) != 0) {
      |          ^
a.cc:9:1: warning: control reaches end of non-void function [-Wreturn-type]
    9 | }
      | ^
Language: C++

#include<iostream>

int gcd(int a, int b){
    while((int remainder = (a % b)) != 0) {
        a = b;
        b = remainder;
    }
    return b;
}

int lcm(int a, int b){
    return ((a / gcd(a, b)) * b);
}

int main(){
    int a,b;
    while(std::cin >> a >> b){
        if(a == -1 or b == -1)  break;
        std::cout << gcd(a, b) << " " << lcm(a, b)<< std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:4:12: error: expected primary-expression before 'int'
    4 |     while((int remainder = (a % b)) != 0) {
      |            ^~~
a.cc:4:12: error: expected ')' before 'int'
    4 |     while((int remainder = (a % b)) != 0) {
      |           ~^~~
      |            )
a.cc:7:6: error: expected ')' before 'return'
    7 |     }
      |      ^
      |      )
    8 |     return b;
      |     ~~~~~~
a.cc:4:10: note: to match this '('
    4 |     while((int remainder = (a % b)) != 0) {
      |          ^
a.cc:9:1: warning: control reaches end of non-void function [-Wreturn-type]
    9 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#define MAX 50000
using namespace std;

int p[MAX];

int main()
{
	//素数
	fill(p, p + MAX, 1);
	for (int i = 2; i < MAX; i++){
		int sqrti = (int)sqrt(i);
		for (int j = 2; j <= sqrti; j++){
			if (i % j == 0){
				p[i] = 0;
				break;
			}
		}
	}

	int a, b;
	while (cin >> a >> b){
		int gcm = 1;
		bool flag = true;
		while (flag){
			for (int i = 2;; i++){
				if (p[i] == 1 && a % i == 0 && b % i == 0){
					gcm = gcm * i;
					a = a / i;
					b = b / i;
					break;
				}
				if (i == min(a, b)){
					flag = false;
					break;
				}
			}
		}
		int lcm = gcm * a * b;
		cout << gcm << " " << lcm << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:34: error: 'sqrt' was not declared in this scope; did you mean 'sqrti'?
   13 |                 int sqrti = (int)sqrt(i);
      |                                  ^~~~
      |                                  sqrti
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class P0006_1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = "";

        while ((line = br.readLine()) != null && !line.isEmpty()) {
            char[] str = line.toCharArray();
            char c;
            int u;
            for (int i = 0; i < str.length / 2; i++) {
                c = str[i];
                u = str.length - 1 - i;
                str[i] = str[u];
                str[u] = c;
            }
            System.out.println(str);
        }
    }
}

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

import java.io.*;
import java.lang.*;


public class Test {
	public static void main(String[] args)  throws IOException
	{
	    BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
	    StringBuffer s = new StringBuffer(buf.readLine());
	    String sun = s.reverse().toString();
	    System.out.println(sun);
	}
		
}

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

import java.util.*;

class Main {
    final private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    final private static StringBuilder sb = new StringBuilder();
    public statics void main(final String[] args) {
        final String line = in.nextLine();
        
        for (int i = line.length() - 1;  0 <= i; --i) {
            sb.append(line.charAt(i));
        }
        System.out.println(sb);
    }
}

Compiler output:
Main.java:6: error: <identifier> expected
    public statics void main(final String[] args) {
                  ^
1 error
Language: Java

import java.util.*;

class Main {
    final private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    final private static StringBuilder sb = new StringBuilder();

    public static void main(final String[] args) {
        final String line = in.nextLine();
        
        for (int i = line.length() - 1;  0 <= i; --i) {
            sb.append(line.charAt(i));
        }
        System.out.println(sb);
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
    final private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                         ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
    final private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                                                 ^
  symbol:   class BufferedReader
  location: class Main
Main.java:4: error: cannot find symbol
    final private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                                                                    ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: Java

import java.util.*;
import java.io.*;

class Main {
    final private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    final private static StringBuilder sb = new StringBuilder();

    public static void main(final String[] args) {
        final String line = in.nextLine();
        
        for (int i = line.length() - 1;  0 <= i; --i) {
            sb.append(line.charAt(i));
        }
        System.out.println(sb);
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        final String line = in.nextLine();
                              ^
  symbol:   method nextLine()
  location: variable in of type BufferedReader
1 error
Language: Java

import java.util.*;
import java.io.*;

class Main {
    final private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    final private static StringBuilder sb = new StringBuilder();

    public static void main(final String[] args) {
        final String line = in.readLine();
        
        for (int i = line.length() - 1;  0 <= i; --i) {
            sb.append(line.charAt(i));
        }
        System.out.println(sb);
    }
}

Compiler output:
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown
        final String line = in.readLine();
                                       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main {
	public static void main(String[] arg) throws NumberFormatException,
			IOException {
		InputStreamReader file = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(new FileReader(file));
		String line = br.readLine();
		br.close();
		printReverseString(line);
	}

	private static void printReverseString(String line) {
		for(int i = line.length() - 1; i > -1; i--) {
			System.out.print(line.charAt(i));
		}
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
		BufferedReader br = new BufferedReader(new FileReader(file));
		                                           ^
  symbol:   class FileReader
  location: class Main
1 error
Language: Java

import java.io.*;

public class Str_Reverse{
	public static void main(String[] args){
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String line;
		while((line=br.readLine())!=null){
			StringBuffer reverse = new StringBuffer().append(line);
			System.out.print(reverse.reverse()+"\n");
		}
	}
}

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

import java.io.*;

public class Str_Reverse{
	public static void main(String[] args)throws IOException{
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		String line;
		while((line=br.readLine())!=null){
			StringBuffer reverse = new StringBuffer().append(line);
			System.out.print(reverse.reverse()+"\n");
		}
	}
}

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

import java.util.Scanner;

public class Solution {

    public static void main(String[] args)
    {
        Scanner ab = new Scanner(System.in);

        String arr = ab.next();
        
        for (int i = arr.length() - 1; i >= 0 ; i--)
        {
            char arr2 = arr.charAt(i);
            
            System.out.print(arr2);
        }
        
        System.out.println();
    }

}

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

import java.util.Scanner;

public class Solution {

    public static void main(String[] args) {
        
        Scanner input = new Scanner(System.in);
        
        String forward = input.nextLine();
        
        StringBuilder sb = new StringBuilder();
        
        sb.append(forward);
        
        String reverse = sb.reverse().toString();
        
        System.out.printf("%s\n",reverse);
    }
    
}

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

import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner;
String str=sc.next();
char[] c=new char[str.length()];
for(int i=0;i<str.length();i++){
c[i]=str.charAt(i);
}
for(int i=str.length()-1;i>=0;i--){
System.out.print(c[i]);
}

Compiler output:
Main.java:5: error: '(' or '[' expected
Scanner sc=new Scanner;
                      ^
Main.java:13: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc=new Scanner;
String str=sc.next();
char[] c=new char[str.length()];
for(int i=0;i<str.length();i++){
c[i]=str.charAt(i);
}
for(int i=str.length()-1;i>=0;i--){
System.out.print(c[i]);
}
}
}

Compiler output:
Main.java:5: error: '(' or '[' expected
Scanner sc=new Scanner;
                      ^
1 error
Language: Java

import java.util.Scanner;

public class Mmain {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int a = 100000;
		int n = stdIn.nextInt();
		for (int i = 0; i < n; i++) {
			a *= 1.05;
			if(a%1000!=0){a+=1000-a%1000;}
		}
		System.out.println(a);
	}
}

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

import java.io.*;
public class Main{
    static void scan()throws IOException{
	InputStreamReader isr = new InputStreamReader(System.in);
	BufferedReader br = new BufferedReader(isr);
	String str=br.readLine();
	turn(str);
    }

    static void turn(String str){
	int l = str.length();
	for(int i=l-1;i>0;i--)
	    System.out.print(str.charAt(i));
System.out.println(atr.length(0));
    }
    
    public static void main(String[] args)throws IOException{
	scan();
    }
}

Compiler output:
Main.java:14: error: cannot find symbol
System.out.println(atr.length(0));
                   ^
  symbol:   variable atr
  location: class Main
1 error
Language: Java

import java.io.*;
public class Main{
    static void scan()throws IOException{
	InputStreamReader isr = new InputStreamReader(System.in);
	BufferedReader br = new BufferedReader(isr);
	String str=br.readLine();
	turn(str);
    }

    static void turn(String str){
	int l = str.length();
	for(int i=l-1;i>0;i--)
	    System.out.print(str.charAt(i));
System.out.println(atr.charAt(0));
    }
    
    public static void main(String[] args)throws IOException{
	scan();
    }
}

Compiler output:
Main.java:14: error: cannot find symbol
System.out.println(atr.charAt(0));
                   ^
  symbol:   variable atr
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // ???????????????????¨??????§
        // Let's ?????£??¬????????????
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	String line = br.readLine();
    	StringBuilder sb = new StringBuilder();
    	for(int i=line.length-1;i>=0;i--){
    		sb.append(line.charAt(i));
    	}
    	System.out.println(sb.toString());
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
    	for(int i=line.length-1;i>=0;i--){
    	              ^
  symbol:   variable length
  location: variable line of type String
1 error
Language: Java

import java.util.Collections;

class myClass {
  public static void main(String[] args) {
    List<String> list = Arrays.adList(args);

    Collections.reverse(list);
    
    for(String c:list){
      System.out.print(c);
    }
    System.out.println();
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
    List<String> list = Arrays.adList(args);
    ^
  symbol:   class List
  location: class myClass
Main.java:5: error: cannot find symbol
    List<String> list = Arrays.adList(args);
                        ^
  symbol:   variable Arrays
  location: class myClass
2 errors
Language: Java

	import java.io.*;
    import java.util.Scanner;
     
    public class Main2 {
    	public static void main (String[] args) throws IOException
    {
 		BufferedReader br 
   		= new BufferedReader(new InputStreamReader(System.in));
			String str = br.readLine();
    	
    		for(int i=str.length()-1; i >= 0; i-- ){
    			System.out.print(str.charAt(i));
    		}
    	}
    }
     

Compiler output:
Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java
    public class Main2 {
           ^
1 error