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

using System;
using System.Collections.Generic;
using System.Linq;
class Ho{
  static void Main(){
    var aho = Console.ReadLine().Split();
    long a = long.Parse(aho[0]);
    long b = long.Parse(aho[1]);
    for(long i = 1;;i++){
      var c = a*i;
      if(c%b == 0){
        Console.WriteLine(c);
        return;
      }
    }
  }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:17:2: error: expected ';' after class definition
   17 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Ho::Main()':
a.cc:6:5: error: 'var' was not declared in this scope
    6 |     var aho = Console.ReadLine().Split();
      |     ^~~
a.cc:7:14: error: expected primary-expression before 'long'
    7 |     long a = long.Parse(aho[0]);
      |              ^~~~
a.cc:8:14: error: expected primary-expression before 'long'
    8 |     long b = long.Parse(aho[1]);
      |              ^~~~
a.cc:10:11: error: expected ';' before 'c'
   10 |       var c = a*i;
      |           ^
a.cc:11:10: error: 'c' was not declared in this scope
   11 |       if(c%b == 0){
      |          ^
a.cc:12:9: error: 'Console' was not declared in this scope
   12 |         Console.WriteLine(c);
      |         ^~~~~~~
Language: C

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

using u128 = __uint128_t;

#define int long long
#define idxSet tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_node_update>
#define atIdx find_by_order
#define idxOf order_of_key
#define MOD 1000000007
#define MAX 200005
#define endl '\n'

#define v(type) vector<type>
#define p(type1 , type2) pair<type1 , type2>
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

int dp[MAX];

void solve() {
    int a , b;
    cin>>a>>b;
    cout<<a * b / __gcd(a , b)<<endl;
}

int32_t main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t = 1;
    //cin>>t;
    while (t--)
        solve();
    return 0;
}

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

include <bits/stdc++.h>
using namespace std;
int main(){
    int A,B;
    cin>>A>>B;
    int r=0;
    bool u=false;
    int a=A;
    int b=B;
    while(u==false){
     r=a%b;
     if(r==0){
    cout<<A*B/b<<endl;
    u=true;
     }
     b=b%r; 
     if(r==0&&u==false){
    cout<<b*A*B<<endl;
    u=true;
     }
    }
    

    }

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>A>>B;
      |     ^~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout<<A*B/b<<endl;
      |     ^~~~
a.cc:13:18: error: 'endl' was not declared in this scope
   13 |     cout<<A*B/b<<endl;
      |                  ^~~~
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout<<b*A*B<<endl;
      |     ^~~~
a.cc:18:18: error: 'endl' was not declared in this scope
   18 |     cout<<b*A*B<<endl;
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int A,B;
    cin>>A>>B;
    int r=0;
    bool u=false;
    int a=A;
    int b=B:
    while(u==false){
     r=a%b;
     if(r==0){
    cout<<b*A*B<<endl;
    break;
     }
     b=b%r; 
     if(r==0){
    cout<<b*A*B<<endl;
    break;
     }
    }
    }

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

#include <bits/stdc++.h>
using namespace std;
int main(){
    int A,B;
    cin>>A>>B;
    int r=0;
    bool a=false;
    int a=A;
    int b=B:
    while(a==false){
     r=a%b;
     if(r==0){
    cout<<b*A*B<<endl;
    break;
     }
     b=b%r; 
     if(r==0){
    cout<<b*A*B<<endl;
    break;
     }
    }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: conflicting declaration 'int a'
    8 |     int a=A;
      |         ^
a.cc:7:10: note: previous declaration as 'bool a'
    7 |     bool a=false;
      |          ^
a.cc:9:12: error: expected ',' or ';' before ':' token
    9 |     int b=B:
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int A,B;
    cin>>A>>B;
    int a=gcd(int A,B);
    cout<<A*B/a<<endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected primary-expression before 'int'
    6 |     int a=gcd(int A,B);
      |               ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int A,B;
    cin>>A>>B;
    int a=gcd(int A,int B);
    cout<<A*B/a<<endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected primary-expression before 'int'
    6 |     int a=gcd(int A,int B);
      |               ^~~
a.cc:6:21: error: expected primary-expression before 'int'
    6 |     int a=gcd(int A,int B);
      |                     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int A,B;
    cin>>A>>B;
    int a=gcd(A,B)
    cout<<A*B/a<<endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected ',' or ';' before 'cout'
    7 |     cout<<A*B/a<<endl;
      |     ^~~~
Language: C

#include <stdio.h>


long gcd(long a,long b)
{
        if(a%b==0)
                return b;
        else
                return gcd(n,m%n);
}
int main(void)
{
        long a,b;

        scanf("%ld%ld",&a,&b);

        printf("%ld",a*b/gcd(a,b));
        return 0;
}


Compiler output:
main.c: In function 'gcd':
main.c:9:28: error: 'n' undeclared (first use in this function)
    9 |                 return gcd(n,m%n);
      |                            ^
main.c:9:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:30: error: 'm' undeclared (first use in this function)
    9 |                 return gcd(n,m%n);
      |                              ^
Language: C

#include<stdio.h>
int main()
{
long int a,b,c,i,d,min;
  scanf("%ld %ld",&a,&b);
  d=0;
  i=1;
  if(a<b) min=a;
  else min=b;
    
  while(d==0 && i<=min)
  {
  if(a%i==0 && b%i==0) {c=i;
                        d++;}
  else i++;                    
  }
 
  if(i<min) printf("%ld",a*b/c);
  else printf("%ld",a*b);

return o
}

Compiler output:
main.c: In function 'main':
main.c:21:8: error: 'o' undeclared (first use in this function)
   21 | return o
      |        ^
main.c:21:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:9: error: expected ';' before '}' token
   21 | return o
      |         ^
      |         ;
   22 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){int A,B;cin>>A>>B;cout<<A/gcd__(A,B)*B<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:38: error: 'gcd__' was not declared in this scope
    3 | int main(){int A,B;cin>>A>>B;cout<<A/gcd__(A,B)*B<<endl;}
      |                                      ^~~~~
Language: C++

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

int main(){
    int A,B;
    cin >> A >> B;
    cout << A/_gcd(A,B)*B << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: '_gcd' was not declared in this scope
    7 |     cout << A/_gcd(A,B)*B << endl;
      |               ^~~~
Language: C

int main()
{
  int a, b;
  scanf("%d %d", &a, &b);
  int min, max;
  if (a >= b)
  {
    min = b;
    max = a;
  }
  else
  {
    min = a;
    max = b;
  }
  long ans;
  int i;
  for (i = 0; min * i %= max; i++)
    ans = min * i;
  printf("%ld", ans);
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d %d", &a, &b);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d %d", &a, &b);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:23: error: lvalue required as left operand of assignment
   18 |   for (i = 0; min * i %= max; i++)
      |                       ^~
main.c:20:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |   printf("%ld", ans);
      |   ^~~~~~
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

// スマホであっとこーだー

#include <bits/stdc++.h>

using namespace std;

int main() {

  long long A, B;

  cin >> A >> B;

  long long ans = A / __gcd(A, B) * B

  cout << ans;

  return 0;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: expected ',' or ';' before 'cout'
   15 |   cout << ans;
      |   ^~~~
Language: C++

int main(){
  int A;
  int B;
  cin >> A >> B;
  int i = 1;
  while (true) {
    if ((i % A == 0) && (i % B == 0)) {
      break;
    }
  i ++;
  }
  cout << i << endl;
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> A >> B;
      |   ^~~
a.cc:12:3: error: 'cout' was not declared in this scope
   12 |   cout << i << endl;
      |   ^~~~
a.cc:12:16: error: 'endl' was not declared in this scope
   12 |   cout << i << endl;
      |                ^~~~
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	long A = sc.nextLong();
	long B = sc.nextLong();
	ilong min = A;
	if(min > B) min = B;
	for(long i=min;i<=A*B;i++){
	    if(i%A==0 && i%B==0){
		System.out.print(i);
		break;
	    }
	} 
    }
}


Compiler output:
Main.java:8: error: cannot find symbol
	ilong min = A;
	^
  symbol:   class ilong
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
long long s,t;
cin>>s>>t;
   long long counter;
  counter=GCD(s,t);
  cout<<counter/s*t<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'GCD' was not declared in this scope
    7 |   counter=GCD(s,t);
      |           ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
long long s,t;
cin>>s>>t;
   long long counter;
  counter=GCD(s,t);
  cout<<counter/s*t<<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'GCD' was not declared in this scope
    7 |   counter=GCD(s,t);
      |           ^~~
a.cc:8:27: error: expected '}' at end of input
    8 |   cout<<counter/s*t<<endl;
      |                           ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
long long s,t;
cin>>s>>t;
   long long counter;
  counter=gcd(s,t);
  cout<<counter*s/t<<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: expected '}' at end of input
    8 |   cout<<counter*s/t<<endl;
      |                           ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
long long s,t;
cin>>s>>t;
   long long counter;
  counter=gcd(a,b);
  cout<<counter*a/b<<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'a' was not declared in this scope
    7 |   counter=gcd(a,b);
      |               ^
a.cc:7:17: error: 'b' was not declared in this scope
    7 |   counter=gcd(a,b);
      |                 ^
a.cc:8:27: error: expected '}' at end of input
    8 |   cout<<counter*a/b<<endl;
      |                           ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: Java

import java.util.Scanner;
public class MainC{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    long A = Integer.parseInt(sc.next());
    long B = Integer.parseInt(sc.next());
    System.out.print(A*B/gcd(A,B));
    return;
  }

  static long gcd(long a, long b){
    long max= Math.max(a,b);
    long min= Math.min(a,b);
    if(max%min==0){
      return min;
    }else{
      return gcd(max%min, min);
    }
  }  
  
}




Compiler output:
Main.java:2: error: class MainC is public, should be declared in a file named MainC.java
public class MainC{
       ^
1 error
Language: C++

#include<iostream>
#include<algorithm>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

using namespace std;

int main(){
    int a,b;
    cin>>a>>b;
    int c = gcd(a,b);
    cout<<a*b/c<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'gcd' was not declared in this scope
   10 |     int c = gcd(a,b);
      |             ^~~
Language: C++

#include<iostream>
using namespace std;
int main() {
  int a,b;
  cin>>a>>b;
  int gcd(a,b);
  
  cout<<a/gcd(a,b)*b<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: expression list treated as compound expression in initializer [-fpermissive]
    6 |   int gcd(a,b);
      |              ^
a.cc:8:14: error: 'gcd' cannot be used as a function
    8 |   cout<<a/gcd(a,b)*b<<endl;
      |           ~~~^~~~~
Language: C++

#!/usr/bin/env python3

def prime_factorize(n):
    a = []
    while n%2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return(a)

A, B = map(int, input().split())

A_lis = prime_factorize(A)
B_lis = prime_factorize(B)
AB_lis = A_lis + B_lis

ans = 1

for i in set(AB_lis):
    ans *= i

print(ans)

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python3
      |  ^
a.cc:3:1: error: 'def' does not name a type
    3 | def prime_factorize(n):
      | ^~~
Language: C++

#include <bits/stdc++.h>
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 chmax(long long a,long long b){
  a = max(a,b);
}
long long chmin(long long a, long long b){
  a = min(a,b);
}

int main() {
  long long n,k,X,sum=0,a=0,b=0,c=0,d=0,ans=0;
  long long MOD = 1000000007;
  long long INF = 1LL << 60;
  string S="";
  cin >> n >> X;
  ans =　gcd(n,X);
  cout << ans << endl;
}

Compiler output:
a.cc:21:8: error: extended character 　 is not valid in an identifier
   21 |   ans =　gcd(n,X);
      |        ^
a.cc: In function 'long long int chmax(long long int, long long int)':
a.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type]
   10 | }
      | ^
a.cc: In function 'long long int chmin(long long int, long long int)':
a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
   13 | }
      | ^
a.cc: In function 'int main()':
a.cc:21:8: error: '\U00003000gcd' was not declared in this scope
   21 |   ans =　gcd(n,X);
      |        ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int64_t A,B;
  cin>>A>>B;
  int 64_t x=gcd(A,B);
  cout<<(A*B)/x<<endl;
  
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected unqualified-id before numeric constant
    6 |   int 64_t x=gcd(A,B);
      |       ^~~~
a.cc:7:15: error: 'x' was not declared in this scope
    7 |   cout<<(A*B)/x<<endl;
      |               ^
Language: C++

#include <iostream>
#include <set>
#include <map>
#include <string>
#include <math.h>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <bitset>
#include <string.h>

using namespace std;

// #define for(i,a,b) for (int i=(a);i<(b);++i)
typedef long long ll;
typedef pair<ll,ll> P;
#define REP(i,n) for(long long i = 0; i < (long long)(n); i++)
#define pb push_back // vectorに要素追加
#define INF (ll)1e18

ll mod = 1e9+7;
ll GCD(ll a, ll b) { return b ? GCD(b, a%b) : a; }

// 検索タグ
int main() {
	// 入力
	l A,B;cin>>A>>B;
    
	// 解法
	ll ans = A*B/GCD(A,B);

	//出力
	printf("%lld\n", ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: error: 'l' was not declared in this scope; did you mean 'll'?
   28 |         l A,B;cin>>A>>B;
      |         ^
      |         ll
a.cc:28:20: error: 'A' was not declared in this scope
   28 |         l A,B;cin>>A>>B;
      |                    ^
a.cc:28:23: error: 'B' was not declared in this scope
   28 |         l A,B;cin>>A>>B;
      |                       ^
Language: C++

#include <bits/stdc++.h>
#define MOD 1000000007
typedef long long int ll;
using namespace std;

int main()
{
    ll gcd(ll x, ll y);
    ll lcm(ll x, ll y);
    int a, b; cin >> a >> b;
    cout << lcm(a,b) << endl;
    return 0;
}

ll gcd(ll a, ll b){
    if(a<b){
        a ^= b;
        b ^= a;
        a ^= b;
    }

    return b ? gcd(b, a%b) : a;
}

ll lcm(ll a, ll b){
    return a*b/gcd(a,b);
}#include <bits/stdc++.h>
#define MOD 1000000007
typedef long long int ll;
using namespace std;

int main()
{
    ll gcd(ll x, ll y);
    ll lcm(ll x, ll y);
    int a, b; cin >> a >> b;
    cout << lcm(a,b) << endl;
    return 0;
}

ll gcd(ll a, ll b){
    if(a<b){
        a ^= b;
        b ^= a;
        a ^= b;
    }

    return b ? gcd(b, a%b) : a;
}

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

Compiler output:
a.cc:27:2: error: stray '#' in program
   27 | }#include <bits/stdc++.h>
      |  ^
a.cc:27:3: error: 'include' does not name a type
   27 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:32:5: error: redefinition of 'int main()'
   32 | int main()
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main()
      |     ^~~~
a.cc:41:4: error: redefinition of 'll gcd(ll, ll)'
   41 | ll gcd(ll a, ll b){
      |    ^~~
a.cc:15:4: note: 'll gcd(ll, ll)' previously defined here
   15 | ll gcd(ll a, ll b){
      |    ^~~
a.cc:51:4: error: redefinition of 'll lcm(ll, ll)'
   51 | ll lcm(ll a, ll b){
      |    ^~~
a.cc:25:4: note: 'll lcm(ll, ll)' previously defined here
   25 | ll lcm(ll a, ll b){
      |    ^~~
Language: C++

#include <iostream>
#include <string>
#include <math.h> 
#include <algorithm>
using namespace std;
// 最小公倍数
int lcm(int a, int b)
{
   return a * b / gcd(a, b);
}

int main() {
  int A, B;
  cin >> A >> B;
  
  
  cout << lcm(A, B)<< endl;
  return 0;
}


Compiler output:
a.cc: In function 'int lcm(int, int)':
a.cc:9:19: error: 'gcd' was not declared in this scope
    9 |    return a * b / gcd(a, b);
      |                   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int A,B;
  cin>>A>>B;
  cout<<lcm(A,B)<<endl
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: expected ';' before 'return'
    6 |   cout<<lcm(A,B)<<endl
      |                       ^
      |                       ;
    7 |    return 0;
      |    ~~~~~~
Language: C++

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

int main() {
  int A,B,C;
  cin >> A >> B;  //A2 B3
  
  for(int i=1; i<=B; i++){　
    C=A*i;　　//C2 C4 C6
    if(C%B==0){  //2 1 0
      cout << C; 
      break;
    }
  }
}
    


Compiler output:
a.cc:8:27: error: extended character 　 is not valid in an identifier
    8 |   for(int i=1; i<=B; i++){　
      |                           ^
a.cc:9:11: error: extended character 　 is not valid in an identifier
    9 |     C=A*i;　　//C2 C4 C6
      |           ^
a.cc:9:11: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:27: error: '\U00003000' was not declared in this scope
    8 |   for(int i=1; i<=B; i++){　
      |                           ^~
a.cc:9:11: error: '\U00003000\U00003000' was not declared in this scope
    9 |     C=A*i;　　//C2 C4 C6
      |           ^~~~
Language: C++

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

int main() {
  int A,B,C;
  cin >> A >> B;  //A2 B3
  
  for(int i=1; i<=B; i++){　
    C=A*i;　　//C2 C4 C6
    if(C%B==0){  //2 1 0
      cout << C; 
      break;
    }
  }
}
    

Compiler output:
a.cc:8:27: error: extended character 　 is not valid in an identifier
    8 |   for(int i=1; i<=B; i++){　
      |                           ^
a.cc:9:11: error: extended character 　 is not valid in an identifier
    9 |     C=A*i;　　//C2 C4 C6
      |           ^
a.cc:9:11: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:27: error: '\U00003000' was not declared in this scope
    8 |   for(int i=1; i<=B; i++){　
      |                           ^~
a.cc:9:11: error: '\U00003000\U00003000' was not declared in this scope
    9 |     C=A*i;　　//C2 C4 C6
      |           ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
  int gcd(int a int b){
    if (a%b==0) return b;
    else return gcd(b,a%b);
  }
int lcm(int a int b){
  return a*b/gcd(a,b);
}
int main(){
  int A,B;
  cin>>A>>B;
cout<<lcm(A,B)<<endl;
}
  
    
    


Compiler output:
a.cc:4:17: error: expected ',' or '...' before 'int'
    4 |   int gcd(int a int b){
      |                 ^~~
a.cc: In function 'int gcd(int)':
a.cc:5:11: error: 'b' was not declared in this scope
    5 |     if (a%b==0) return b;
      |           ^
a.cc: At global scope:
a.cc:8:15: error: expected ',' or '...' before 'int'
    8 | int lcm(int a int b){
      |               ^~~
a.cc: In function 'int lcm(int)':
a.cc:9:12: error: 'b' was not declared in this scope
    9 |   return a*b/gcd(a,b);
      |            ^
a.cc: In function 'int main()':
a.cc:14:10: error: too many arguments to function 'int lcm(int)'
   14 | cout<<lcm(A,B)<<endl;
      |       ~~~^~~~~
a.cc:8:5: note: declared here
    8 | int lcm(int a int b){
      |     ^~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
  int gcd(int a,b){
    if (a%b==0) return b;
    else return gcd(b,a%b);
  }
int lcm(int a,b){
  return a*b/gcd(a,b);
}
int main(){
  int A,B;
  cin>>A>>B;
cout<<lcm(A,B)<<endl;
}
  
    
    


Compiler output:
a.cc:4:17: error: 'b' has not been declared
    4 |   int gcd(int a,b){
      |                 ^
a.cc: In function 'int gcd(int, int)':
a.cc:5:11: error: 'b' was not declared in this scope
    5 |     if (a%b==0) return b;
      |           ^
a.cc: At global scope:
a.cc:8:15: error: 'b' has not been declared
    8 | int lcm(int a,b){
      |               ^
a.cc: In function 'int lcm(int, int)':
a.cc:9:12: error: 'b' was not declared in this scope
    9 |   return a*b/gcd(a,b);
      |            ^
Language: C++

import fractions
a,b=map(int, input().split())
f=fractions.gcd(a,b)
f1=a*b//f
print(f1)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import fractions
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for (int i = 0; i < n; i++)
#define vl vector<ll>
ll GCD(ll a, ll b){
    if(b==0) return a;
    else return GCD(b,a%b);
}

int main(){
ll a,b;cin>>a>>b;
ll GCD(int a,int b);

cout<<a*b/GCD(a,b)<<endl;
}

Compiler output:
/usr/bin/ld: /tmp/ccpH0HXI.o: in function `main':
a.cc:(.text+0x88): undefined reference to `GCD(int, int)'
collect2: error: ld returned 1 exit status
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    int a = A;
    
    for (int i = 1; i < Bl i++) {
      if (a == B) {
        System.out.print(a);
        break;
      }
      a = a *i;
    }
  }
}

Compiler output:
Main.java:10: error: ';' expected
    for (int i = 1; i < Bl i++) {
                          ^
1 error
Language: C

#include<stdio.h>
int main()
{
int a,b,c;
  c=0;
scanf("%d %d",&a,&b);
while(c%a!==0  && c%b!==0)
  {
  c++;
  }
printf("%d",c);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:12: error: expected expression before '=' token
    7 | while(c%a!==0  && c%b!==0)
      |            ^
Language: C

#include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d",&a,&b);
while(c%a!==0  && c%b!==0)
  {
  c++;
  }
printf("%d",c);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:12: error: expected expression before '=' token
    6 | while(c%a!==0  && c%b!==0)
      |            ^
Language: C

#include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d",&a,&b);
while(c%a!=0 c%b!=0)
  {
  c++;
  }
printf("%d",c);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: expected ')' before 'c'
    6 | while(c%a!=0 c%b!=0)
      |      ~      ^~
      |             )
Language: C

#include<stdio.h>
int main()
{
int a,b,c;
scanf("%d %d",&a &b);
while(c%a!=0 c%b!=0)
  {
  c++;
  }
printf("%d",c);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:18: error: invalid operands to binary & (have 'int *' and 'int')
    5 | scanf("%d %d",&a &b);
      |               ~~ ^
      |               |
      |               int *
main.c:6:13: error: expected ')' before 'c'
    6 | while(c%a!=0 c%b!=0)
      |      ~      ^~
      |             )
Language: C++

// #include<bits/stdc++.h>
#include <cmath>
#include <algorithm>
#include <vector>

using namespace std;

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

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

int main() {
	long long A, B;
	cin >> A >> B;

	cout << lcm(A, B) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'cin' was not declared in this scope
   27 |         cin >> A >> B;
      |         ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <vector>
  +++ |+#include <iostream>
    5 | 
a.cc:29:9: error: 'cout' was not declared in this scope
   29 |         cout << lcm(A, B) << endl;
      |         ^~~~
a.cc:29:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:29:30: error: 'endl' was not declared in this scope
   29 |         cout << lcm(A, B) << endl;
      |                              ^~~~
a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    4 | #include <vector>
  +++ |+#include <ostream>
    5 |
Language: C++

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

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

int main(){
  int a,b;
  cin >> a >> b;
  long long int n;
  n = gcd(a, b);
  long long int s,t;
  s = a*b;
  s = s / n;
  cout << s << '\n';
  return 0;
}


Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:9:5: error: 'reurn' was not declared in this scope
    9 |     reurn(gcd(b, a%b));
      |     ^~~~~
a.cc:11:1: warning: control reaches end of non-void function [-Wreturn-type]
   11 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int rest(int a,int b){
  if(b==0)return a;
  return rest(b,a%b)
}
int main(){
  int a,b;
  cin>>a>>b;
  int gcd=rest(a,b);
  long long ans=(long long)(a)*b/gcd;
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int rest(int, int)':
a.cc:5:21: error: expected ';' before '}' token
    5 |   return rest(b,a%b)
      |                     ^
      |                     ;
    6 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int a,b;
  cin>>a>>b;
  int gcd;
  
    for(int i=1;i<=a;i++){
      if(a%i==0 &&b%i==0){
        gcd=i;
      }
    }
  
  long long ans=long long(a)*b/gcd;
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected primary-expression before 'long'
   15 |   long long ans=long long(a)*b/gcd;
      |                 ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int a,b;
  cin>>a>>b;
  long long gcd;
  if(a>b){
    for(int i=1;i<=b;i++){
      if(a%i==0 &&b%i==0){
        gcd=i;
      }
    }
  }
  if(b>a){
    for(int i=1;i<=a;i++){
      if(a%i==0 &&b%i==0){
        gcd=i;
      }
    }
  }
  long long ans=long long(a)*b/gcd;
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: expected primary-expression before 'long'
   22 |   long long ans=long long(a)*b/gcd;
      |                 ^~~~
Language: C++

#include<iostream>
#include<string>
#include <vector>
#include<stack>
#include<queue>
#include<map>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<bitset>
using namespace std;
using vi = vector<int>;
using vii = vector<vi>;
using vs = vector<string>;
using pii = pair<int, int>;
#define rep(i,n) for(int i=0;i<n;i++)
#define rep2(i,m,n) for(int i=m;i<n;i++)
#define vsort(v) sort(v.begin(), v.end())
#define rv(v) reverse(v.begin(), v.end())
#define ll long long
#define PI 3.141592653589793
using vll = vector<ll>;
using Graph = vii;
const ll MOD = 1e9 + 7;

int main() {
	int a, b;
	cin >> a >> b;
	int i = 1;
	ll ans = a;
	while () {
		if (a * i % b == 0) {
			ans = a * i;
			break;
		}
	}
	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:16: error: expected primary-expression before ')' token
   31 |         while () {
      |                ^
Language: C++

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

int main(){
  int a,b;
  cin>>a>>b;
  set<int>st;
  int gcd=1;
  for(int i=2;i<a;i++){
    if(st[i]){
      gcd*=i;
    }
  }
  for(int i=2;i<b;i++){
    if(st[i]){
      gcd*=i;
    }
  }
  int ans=a*b/gcd;
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
   10 |     if(st[i]){
      |          ^
a.cc:15:10: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
   15 |     if(st[i]){
      |          ^
Language: C++

#include <iostream>
#include<string.h>
#include<algorithm>
#include<math.h>
#include<stdio.h>
#include<string>
#include <map>
using namespace std;

long long YKRD(long a, long b) {
	int r = 0;
	r = b % a;
	if (r == 0) {
		return a;
	}

	YKRD(r, a);

}

int main() {
	long long A, B;
	cin >> A >> B;
	long long X = A;

	if (A > B) {
		A = B;
		B = X;
	}
	long long SK=0;
	SK = YKRD(A, B);
	cout <<  long long(A * B / SK) << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:32:18: error: expected primary-expression before 'long'
   32 |         cout <<  long long(A * B / SK) << endl;
      |                  ^~~~
a.cc: In function 'long long int YKRD(long int, long int)':
a.cc:17:13: warning: control reaches end of non-void function [-Wreturn-type]
   17 |         YKRD(r, a);
      |         ~~~~^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
using namespace std;
//関数

bool prime(const int& x) {
    if (x <= 1) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}

int GCD(int m, int n) {
    return n == 0 ? m : GCD(n, m % n);
}

long long int LCM(long long int a, long long int b) {
    return (a * b / GCD((int)a, (int)b));
}

int d(const long long& a) {
    return (int)(log10(a) + 1.0);
}

double distance(int i, int j) {
    double dx = x[i] - x[j];
    double dy = y[i] - y[j];
    return pow(dx * dx + dy * dy, 0.5);
}

void func148c(){
    long long int A, B;
    cout << LCM(A, B) << "\n" ;

}

int main()
{
  func148c();
  return 0;
}

Compiler output:
a.cc: In function 'int d(const long long int&)':
a.cc:24:18: error: 'log10' was not declared in this scope
   24 |     return (int)(log10(a) + 1.0);
      |                  ^~~~~
a.cc: In function 'double distance(int, int)':
a.cc:28:17: error: 'x' was not declared in this scope; did you mean 'dx'?
   28 |     double dx = x[i] - x[j];
      |                 ^
      |                 dx
a.cc:29:17: error: 'y' was not declared in this scope; did you mean 'dy'?
   29 |     double dy = y[i] - y[j];
      |                 ^
      |                 dy
a.cc:30:12: error: 'pow' was not declared in this scope
   30 |     return pow(dx * dx + dy * dy, 0.5);
      |            ^~~
Language: C++

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

using namespace std;

bool prime(const int& x) {
    if (x <= 1) return false;
    for (int i = 2; i * i <= x; ++i) {
        if (x % i == 0) return false;
    }
    return true;
}

int GCD(int m, int n) {
    return n == 0 ? m : GCD(n, m % n);
}

long long int LCM(long long int a, long long int b) {
    return (a * b / GCD((int)a, (int)b));
}

int d(const long long& a) {
    return (int)(log10(a) + 1.0);
}

double distance(int i, int j) {
    double dx = x[i] - x[j];
    double dy = y[i] - y[j];
    return pow(dx * dx + dy * dy, 0.5);
}

void func148c(){
    long long int A, B;
    cout << LCM(A, B) << "\n" ;

}

int main()
{
  func148c();
  return 0;
}

Compiler output:
a.cc: In function 'int d(const long long int&)':
a.cc:24:18: error: 'log10' was not declared in this scope
   24 |     return (int)(log10(a) + 1.0);
      |                  ^~~~~
a.cc: In function 'double distance(int, int)':
a.cc:28:17: error: 'x' was not declared in this scope; did you mean 'dx'?
   28 |     double dx = x[i] - x[j];
      |                 ^
      |                 dx
a.cc:29:17: error: 'y' was not declared in this scope; did you mean 'dy'?
   29 |     double dy = y[i] - y[j];
      |                 ^
      |                 dy
a.cc:30:12: error: 'pow' was not declared in this scope
   30 |     return pow(dx * dx + dy * dy, 0.5);
      |            ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  long int a,b;
  scanf("%ld%ld",&a,&b);
  
  long long int ans=(a*b)/(__gcd(a,b));
  
  printf("%lld",lcm);
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: overloaded function with no contextual type information
   12 |   printf("%lld",lcm);
      |   ~~~~~~^~~~~~~~~~~~
Language: C++

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

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

int main( void )
{
    ll a,b;
    cin >> a >> b;
    
    if ( a > b )
        ll ans = a * b / GCD(a,b);
    else
        ll ans = a * b / GCD(b,a);
    
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

#include <bits/c++.h>
using namespace std;
#define ll long long

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

int main( void )
{
    ll a,b;
    cin >> a >> b;
    
    if ( a > b )
        ll ans = a * b / GCD(a,b);
    else
        ll ans = a * b / GCD(b,a);
    
    cout << ans << endl;
}

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

# C++
#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
 int main(){
   int a,b;
   cin>>a>>b;
     int g=lcm(a,b);
     cout<<g<<endl;
}

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #C
    1 | # C++
      |   ^
Language: C++

#include <iostream>
using namespace std;
 
long long GCD(long long a, long long b){
  if(a == b) return a;
  else return GCD(b, a%b);
}
 
int main(){
  long long A, B; cin >> A >> B;


  cout <<  A/GCD(A, B);*B; << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: invalid type argument of unary '*' (have 'long long int')
   13 |   cout <<  A/GCD(A, B);*B; << endl;
      |                        ^~
a.cc:13:28: error: expected primary-expression before '<<' token
   13 |   cout <<  A/GCD(A, B);*B; << endl;
      |                            ^~
Language: C++

#include <iostream>
using namespace std;

long long GCD(long long a, long long b){
  if(a == b) return a;
  else return GCD(b, a%b);
}

int main(){
  long long A, B; cin >> A >> B;
  long long L = GCD(A, B);
  long long a = A*B/l;
  cout << a << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'l' was not declared in this scope
   12 |   long long a = A*B/l;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){TypeInt G_C_D(TypeInt a, TypeInt b)
{
  cin >> a >> b;
    if (a < 0) a = -a;
    if (b < 0) b = -b;
    while (b != 0) {
        a %= b;
        if (a == 0) return b;
        b %= a;
    }
    return a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: 'TypeInt' was not declared in this scope
    3 | int main(){TypeInt G_C_D(TypeInt a, TypeInt b)
      |            ^~~~~~~
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){TypeInt G_C_D(TypeInt a, TypeInt b)
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long 
 
int main() {
int A,B;
  cin >>A>>B;
  for(int i = 1; i <= B; i++){
    if((A * i) % B == 0){
      cout << A * i << endl;
      break;
    }
  }
 
return 0; 
}

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

#include <bits/stdc++.h>
using namespace std;
#define int long long;
int main() {
int A,B;
  cin >>A>>B;
  for(int i = 1; i <= B; i++){
    if((A * i) % B == 0){
      cout << A * i << endl;
      break;
    }
  }
 
 
}

Compiler output:
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:4:1: note: in expansion of macro 'int'
    4 | int main() {
      | ^~~
a.cc:4:5: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | int main() {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:5:1: note: in expansion of macro 'int'
    5 | int A,B;
      | ^~~
a.cc:5:5: error: 'A' was not declared in this scope
    5 | int A,B;
      |     ^
a.cc:5:7: error: 'B' was not declared in this scope
    5 | int A,B;
      |       ^
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long;
      |                  ^~~~
a.cc:7:7: note: in expansion of macro 'int'
    7 |   for(int i = 1; i <= B; i++){
      |       ^~~
a.cc:7:11: error: 'i' was not declared in this scope
    7 |   for(int i = 1; i <= B; i++){
      |           ^
a.cc:7:24: error: expected ')' before ';' token
    7 |   for(int i = 1; i <= B; i++){
      |      ~                 ^
      |                        )
a.cc:7:26: error: 'i' was not declared in this scope
    7 |   for(int i = 1; i <= B; i++){
      |                          ^
Language: C++

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

int main() {
int A,B;
  cin >>A>>B;
  for(int i = 1; i <= B; i++){
    if((A * i) % B == 0){
      cout << A * i << endl;
      break;
    }
  }


}

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

#include <iostream>

using namespace std;

int main(void)
{
  int a, b;
  
  cin >> a >> b;

  cout << a * b / lcm(a, b) << endl;

  return 0;
}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: 'lcm' was not declared in this scope
   11 |   cout << a * b / lcm(a, b) << endl;
      |                   ^~~
Language: C++

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

int main() {
   int a,b;
   cin>>a>>b ;
  for(i=0 ;i<=b ;i++){
    if( (i*a%b)==0 ){
  cout << i*a<< endl;
    break;
}
}
}

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


#include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;


int main() {
ll a,b;
cin >> a >> b;
for(int ans=1;ans<=a*b;ans++) {
  ans++;
  if(ans%a==0&&ans%b==0) break;
}
cout << ans << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 | cout << ans << endl;
      |         ^~~
      |         abs
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <ctime>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cassert>
#include <bitset>
#include <list>
#include <cstdio>
#include <stdio.h>
#include <string.h>

typedef long long ll;

using namespace std;

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

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b;
    cin >> a >> b;
    cout << a*b/gcd(a,b);
}


Compiler output:
a.cc: In function 'int gcd(int, int)':
a.cc:25:28: error: expected ';' before '}' token
   25 |     else return gcd(b, a%b)
      |                            ^
      |                            ;
   26 | }
      | ~
Language: C++

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

int main() {
  long A, B;
  cin >> A >> B;
  cout << __lcm(A, B) << "\n";
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: '__lcm' was not declared in this scope
    7 |   cout << __lcm(A, B) << "\n";
      |           ^~~~~
Language: Java

import java.util.Scanner;

public class C148 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		long a = kb.nextInt();
		long b = kb.nextInt();
		long gcd = 1;

		for (int i = 1; i <= a && i <= b; ++i) {
			// Checks if i is factor of both integers
			if (a % i == 0 && b % i == 0)
				gcd = i;
		}

		System.out.println(a * b / gcd);
		kb.close();
	}

}


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

import java.util.HashMap;
import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int lcm = a * b * gcd (a, b);
    System.out.prinltn(lcm);
  }
  public static int gcd(int a, int b){
    int c = 0;
    while(!(a % b == 0)){
      c = a % b;
      a = b;
      b = c;
      gcd(a,b);
    }
    return b;
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    System.out.prinltn(lcm);
              ^
  symbol:   method prinltn(int)
  location: variable out of type PrintStream
1 error
Language: C++

import math
def lcm(x,y):
	return (x*y)//math.gcd(x,y)

a,b = map(int,input().split())
print(lcm(a,b))

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

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

int main(){
  int a, b; cin >> a >> b;
  int i = 1;
  while(a*i%b != 0) i++;
  cout << a*i << endl;
}

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

#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits.h>
#include <map>
#include <numeric>
#include <string>
#include <vector>

using namespace std;

struct Memo {
	long long fact = 0;
	long long fact_inv = 0;
	long long inv = 0;
};
class Combination {
private:
	int m_module = 1000000007;
	vector<struct Memo> memo;
public:
	int calculate(int, int);
	Combination(int, int);
};
int Combination::calculate(int n, int k) {
	return ((memo[n].fact * memo[k].fact_inv) % m_module * memo[n - k].fact_inv) % m_module;
}
Combination::Combination(int memo_max, int module = 1000000007) {
	m_module = module;
	memo.push_back({ 1,1,0 });
	memo.push_back({ 1,1,1 });
	for (int loop = 2; loop <= memo_max; loop++) {
		struct Memo temp;
		temp.fact = (memo[loop - 1].fact * loop) % m_module;
		temp.inv = m_module - (memo[m_module % loop].inv * int(m_module / loop)) % m_module;
		temp.fact_inv = (memo[loop - 1].fact_inv * temp.inv) % m_module;
		memo.push_back(temp);
	}
}

void A_Round_One(void) {

	int A, B;
	cin >> A >> B;

	if		(A != 1 && B != 1)	cout << 1 << flush;
	else if (A != 2 && B != 2)	cout << 2 << flush;
	else						cout << 3 << flush;
}

void B_Strings_with_the_Same_Length(void) {

	int N;
	cin >> N;
	string S, T;
	cin >> S >> T;

	for (int loop = 0; loop < N; loop++) cout << S[loop] << T[loop] << flush;
	return;
}

void C_Snack(void) {

	int A, B;
	cin >> A >> B;

	map<int, int> Afact;
	for (int loop = 2; loop * loop < A; loop++) {
		if (A % loop == 0) {
			A /= loop;
			Afact[loop]++;
			if (A == loop) break;
		}
	}
	if (A > 1) Afact[A]++;
	map<int, int> Bfact;
	for (int loop = 2; loop * loop < B; loop++) {
		if (B % loop == 0) {
			B /= loop;
			Bfact[loop]++;
			if (B == loop) break;
		}
	}
	if (B > 1) Bfact[B]++;
	map<int, int> LCMfact;
	for (auto it = Afact.begin(); it != Afact.end(); it++) {
		LCMfact[it->first] = max(LCMfact[it->first], it->second);
	}
	for (auto it = Bfact.begin(); it != Bfact.end(); it++) {
		LCMfact[it->first] = max(LCMfact[it->first], it->second);
	}
	long long LCM = 1;
	for (auto it = LCMfact.begin(); it != LCMfact.end(); it++) {
		LCM *= long long(it->first) * long long(it->second);
	}
	cout << LCM;
	return;
}

int main(void) {

	//A_Round_One();
	//B_Strings_with_the_Same_Length();
	C_Snack();
	return 0;
}


Compiler output:
a.cc: In function 'void C_Snack()':
a.cc:94:24: error: expected primary-expression before 'long'
   94 |                 LCM *= long long(it->first) * long long(it->second);
      |                        ^~~~
Language: C++

#include <bits/stdc++.h>
usign namespace std;
int gcd(int x, int y){//再起を使ってgcdを作れる。
    
    if(x%y==0){
        return y;
    }
    
    return gcd(y,x%y);
}

int main(){ //gcdを使えばlcmを作れる。
    
    int x,y;
    cin >> x >> y;
    cout << x*y/gcd(x,y) << endl;
}

Compiler output:
a.cc:2:1: error: 'usign' does not name a type
    2 | usign namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:15:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   15 |     cin >> x >> y;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout << x*y/gcd(x,y) << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |     cout << x*y/gcd(x,y) << endl;
      |                             ^~~~
      |                             std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~