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

#include <bits/stdc++.h>

typedef long long ll;

using namespace std;

int main() {
	int x, y, z; cin >> x >> y >> z;
	cout << z ' ' << x << ' ' << y;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before '\x20'
    9 |         cout << z ' ' << x << ' ' << y;
      |                  ^~~~
      |                  ;
Language: Java

import java.util.*;
public class Main {// Main
    public static void main(String[] args){
     
      Scanner input=new Scanner(System.in);
      int a=input.nextInt();
      int b=input.nextInt();
      int c=input.nextInt();
      
      int temp=a;
      a=b;
      b=temp;
      c=temp;
      a=c
      
    }
}

Compiler output:
Main.java:14: error: ';' expected
      a=c
         ^
1 error
Language: Java

import java.util.*;
public class Main {// Main
    public static void main(String[] args){
     
      Scanner input=new Scanner(System.in);
      int a=input.nextInt();
      int b=input.nextInt();
      int c=input.nextInt();
      
      temp=a;
      a=b;
      b=temp;
      c=temp;
      a=c;
      
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
      temp=a;
      ^
  symbol:   variable temp
  location: class Main
Main.java:12: error: cannot find symbol
      b=temp;
        ^
  symbol:   variable temp
  location: class Main
Main.java:13: error: cannot find symbol
      c=temp;
        ^
  symbol:   variable temp
  location: class Main
3 errors
Language: Java

import java.util.*;
public class Main {// Main
    public static void main(String[] args){
     
      Scanner input=new Scanner(System.in);
      int a=input.nextInt();
      int b=input.nextInt();
      int c=input.nextInt();
      
      temp=a;
      a=b;
      b=temp;
      c=temp;
      a=c
      
    }
}

Compiler output:
Main.java:14: error: ';' expected
      a=c
         ^
1 error
Language: Java

public static void main(String[] args){
int a,b,c;
  
  Scanner input=new Scanner(System.in);
 a=input.nextInt(); b=input.nextInt(); c=input.nextInt();
  int tempa=a;
  int tempb=b;
  int tempc=c;
  
  a=tempc;
  b=tempa;
c=tempa;
  System.out.printf("%d %d %d", a,b,c);
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

public static void main(String[] args){
int a,b,c;
  
  Scanner input=new Scanner(System.in);
  a=input new Scanner();  b=input new Scanner();  c=input new Scanner();
  int tempa=a;
  int tempb=b;
  int tempc=c;
  
  a=tempc;
  b=tempa;
c=tempa;
  System.out.printf("%d %d %d", a,b,c);
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: ';' expected
  a=input new Scanner();  b=input new Scanner();  c=input new Scanner();
         ^
Main.java:5: error: ';' expected
  a=input new Scanner();  b=input new Scanner();  c=input new Scanner();
                                 ^
Main.java:5: error: ';' expected
  a=input new Scanner();  b=input new Scanner();  c=input new Scanner();
                                                         ^
4 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int X,Y,Z;
  cin>>X>>Y>>Z;
cout<< Z X Y <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ';' before 'X'
    6 | cout<< Z X Y <<endl;
      |         ^~
      |         ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int X,Y,Z;
  cin>>X>>Y>>Z;
  cout<<Z X Y<<endl;
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: expected ';' before 'X'
    6 |   cout<<Z X Y<<endl;
      |          ^~
      |          ;
Language: C++

import numpy as np
import math as mt
X,Y,Z=map(int, input().split())
print(Z,end=" ")
print(X,end=" ")
print(Y)

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

#include <stdio.h>
#include <stdlib.h>

void swap(int* a, int* b){

    int tmp;
    tmp = *a;
    *b = *a;
    *b = tmp;
}

int main(){

    int x, y, z;

    scanf("%d %d %d", &x, &y, &z);

    swao(&x,&y);
    swap(&x,&z);

    printf("%d %d %d", x, y, z);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:5: error: implicit declaration of function 'swao'; did you mean 'swap'? [-Wimplicit-function-declaration]
   18 |     swao(&x,&y);
      |     ^~~~
      |     swap
Language: C++

#incude<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cout << c <<" " << a <<" " << b <<" ";
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:1: error: 'cout' was not declared in this scope
    5 | cout << c <<" " << a <<" " << b <<" ";
      | ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incude<bits/stdc++.h>
Language: Java

import java.util.Scanner;
public class Main {

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

       int a = sc.nextInt();
       int b = sc.nextInt();
       int c = sc.nextInt();

        System.out.println(c + " " + a + " " + b);
    }

Compiler output:
Main.java:12: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

a,b,c=input().split()
d=a
a=b
b=d

d=a
a=c
c=d
print(str(a)+" " +str(b)+" " +str(c))


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c=input().split()
      | ^
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define F(i,j,k,in) for(int i=j;i<k;i+=in)
#define DF(i,j,k,in) for(int i=j;i>=k;i-=in)
#define foreach(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define PB push_back
#define ub upper_bound
#define lb lower_bound
#define ins insert
#define PI 3.1415926535897932384626433832795
#define MOD 1000000007
using namespace std;
int main()
{
    ll a,b;
    cin>>a>>b;
    swap(a,b);
    swap(a,c);
    cout<<a<<" "<<b" "<<c;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: 'c' was not declared in this scope
   18 |     swap(a,c);
      |            ^
a.cc:19:20: error: expected ';' before string constant
   19 |     cout<<a<<" "<<b" "<<c;
      |                    ^~~
      |                    ;
Language: C++

#include <iostream>

int main (){
    int A, B, C;
    int box;

    cin << A << B << C;
    box = A;
    A = B;
    B = box;

    box = A;
    A = C;
    C = box;

    cout >> A >> B >> C >> endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     cin << A << B << C;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout >> A >> B >> C >> 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:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |     cout >> A >> B >> C >> endl;
      |                            ^~~~
      |                            std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>

int main (){
    int A, B, C;
    int box;

    cin >> A >> B >> C;
    box = A;
    A = B;
    B = box;

    box = A;
    A = C;
    C = box;

    cout << A << B << C <<endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |     cin >> A >> B >> C;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout << A << B << C <<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:27: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |     cout << A << B << C <<endl;
      |                           ^~~~
      |                           std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

//package cf;

import java.util.*;
import java.io.*;
public class Cf {
    public static void main(String[] args) throws IOException {
        FastReader io = new FastReader();
        int x = io.nextInt(), y = io.nextInt(), z = io.nextInt();
        System.out.println(z + " " + x + " " + y);
    }
    
    static class FastReader { 
        BufferedReader br; 
        StringTokenizer st; 

        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 

        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 

        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 

        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 

        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 

        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
    
}




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

def exchange(l, a, b):
    # change the order of 2 elements of l whose index are a and b
    w = l[a]
    l[a] = l[b]
    l[b] = w

l = list(map(int, input().split()))
exchange(l, 0, 1)
exchange(l, 0, 2)

print(l[0], l[1], l[2])
    

Compiler output:
a.cc:2:7: error: invalid preprocessing directive #change
    2 |     # change the order of 2 elements of l whose index are a and b
      |       ^~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def exchange(l, a, b):
      | ^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b,c
  cin >> a >> b >> c;
  
  swap(a,b);
  swap(a,c);
  
  cout << a << b << c ;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> a >> b >> c;
      |   ^~~
a.cc:9:10: error: 'c' was not declared in this scope
    9 |   swap(a,c);
      |          ^
Language: C++

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

int main(){
  int a,b,c
  cin >> a >> b >> c;
  
  swap(a,b);
  swap(a,c);
  
  cout << a << b << c ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> a >> b >> c;
      |   ^~~
a.cc:9:10: error: 'c' was not declared in this scope
    9 |   swap(a,c);
      |          ^
Language: C++

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

int main(){
 
  cin >> a >> b >> c;
  
  swap(a,b);
  swap(a,c);
  
  cout << a << b << c ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 'a' was not declared in this scope
    6 |   cin >> a >> b >> c;
      |          ^
a.cc:6:15: error: 'b' was not declared in this scope
    6 |   cin >> a >> b >> c;
      |               ^
a.cc:6:20: error: 'c' was not declared in this scope
    6 |   cin >> a >> b >> c;
      |                    ^
Language: C

#include <iostream>
using namespace std;
int main() {
    int x,y,z;
    cin >> x >> y >> z;

    cout << z << " " << x << " " << y;
    return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.next();
      	int b = sc.next();
      	int c = sc.next();
      System.out.println(c +" "+ a + " "+ b);


Compiler output:
Main.java:7: error: reached end of file while parsing
      System.out.println(c +" "+ a + " "+ b);
                                             ^
1 error
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.next();
      	int b = sc.next();
      	int c = sc.next();
      System.out.println(a +" "+ b + " "+ c);

Compiler output:
Main.java:7: error: reached end of file while parsing
      System.out.println(a +" "+ b + " "+ c);
                                             ^
1 error
Language: C++

def main():
    N = int(input())
    res = 0
    for i in range(1, N+1):
        if i % 3 != 0 and i % 5 != 0:
            res += i
    print(res)


if __name__ == "__main__":
    main()

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: C++

#include <stdio.h>

void main() {
	int a, b, c;
	int temp = 0;
	scanf("%d %d %d", &a, &b, &c);

	temp = b;
	b = a;
	a = temp;

	temp = c;
	c = a;
	a = temp;

	printf("%d %d %d", a, b, c);
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main() {
      | ^~~~
Language: C++

#include <stdio.h>

void main() {
	int a, b, c;
	int temp;
	scanf("%d %d %d", a, b, c);

	temp = b;
	b = a;
	a = temp;

	temp = c;
	c = a;
	a = temp;

	printf("%d %d %d", a, b, c);
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main() {
      | ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int32_t main()
{
	int a,b,c;
	cin >> a >> b >> c;

	cout << c " " << a << " " << b << endl;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:10:18: error: expected ';' before string constant
   10 |         cout << c " " << a << " " << b << endl;
      |                  ^~~~
      |                  ;
Language: C++

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

int main() {
  
  int a;b;c;
  cin >> a; b; c;
  
  cout << c << " "<< a << " "<< b << endl;
 
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'b' was not declared in this scope
    6 |   int a;b;c;
      |         ^
a.cc:6:11: error: 'c' was not declared in this scope
    6 |   int a;b;c;
      |           ^
Language: C++

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

int main() {
  
  int a;b;c;
  cin >> a; b; c;
  
  cout << c << a << b << endl;
 
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'b' was not declared in this scope
    6 |   int a;b;c;
      |         ^
a.cc:6:11: error: 'c' was not declared in this scope
    6 |   int a;b;c;
      |           ^
Language: C++

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

int main() {
  
  int a;b;c;
  cin >> a; b; c;
  
  cout << a << b << c << endl;
 
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'b' was not declared in this scope
    6 |   int a;b;c;
      |         ^
a.cc:6:11: error: 'c' was not declared in this scope
    6 |   int a;b;c;
      |           ^
Language: C++

#include<stdio.h>

int main(void)
{
    int a, b, c;
    int tmp;
    scanf_s("%d %d %d", &a, &b, &c);

    tmp = a;
    a = b;
    b = tmp;

    tmp = a;
    a = c;
    c = tmp;

    printf("%d %d %d\n", a, b, c);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    7 |     scanf_s("%d %d %d", &a, &b, &c);
      |     ^~~~~~~
      |     scanf
Language: C

#include<stdio.h>

int main(void)
{
    int a,b,c;
    int tmp;
    scanf_s("%d %d %d",&a,&b,&c);

    tmp=a;
    a=b;
    b=tmp;

    tmp=a;
    a=c;
    c=tmp;

    printf("%d %d %d\n",a,b,c);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |     scanf_s("%d %d %d",&a,&b,&c);
      |     ^~~~~~~
      |     scanf
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int A = stdIn.nextInt();
		int B = stdIn.nextInt();
		int C = stdIn.nextInt();
		
		System.out.println(C + " " + A + " " + B);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

int main(void)
{
  int a,b,c;
  scanf("%d %d %d",&a,&b,&c);
  printf("%d %d %d",c,a,b);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'scanf' was not declared in this scope
    4 |   scanf("%d %d %d",&a,&b,&c);
      |   ^~~~~
a.cc:5:3: error: 'printf' was not declared in this scope
    5 |   printf("%d %d %d",c,a,b);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void)
Language: C++

#include<bits/stdc++.h>
using namespace std;
int swap(int*, int*);
int main()
{
  int a,b,c;
  cin>>a,b,c;
  swap(&a,&b);
  swap(&a,&c);
  cout<<a<<b<<c;
  return 0;
}
int swap(int *a,int *b)
{
  int x = *a;
  *a=*b;
  *b=x;
  return(a,b);
}
  

Compiler output:
a.cc: In function 'int swap(int*, int*)':
a.cc:18:11: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   18 |   return(a,b);
      |         ~~^~~
      |           |
      |           int*
Language: C++

#include<iostream>

int main(void){
	int a,b,c;
	std::cin>>a>>b>>c;
	int temp;

	temp=a;
	a=b;
	b=temp;

	temp=a;
	a=c;
	c=temp;

	std::cout<<a　<<b　<<c;
	return 0;
}

Compiler output:
a.cc:16:20: error: extended character 　 is not valid in an identifier
   16 |         std::cout<<a　<<b　<<c;
      |                    ^
a.cc:16:25: error: extended character 　 is not valid in an identifier
   16 |         std::cout<<a　<<b　<<c;
      |                         ^
a.cc: In function 'int main()':
a.cc:16:20: error: 'a\U00003000' was not declared in this scope
   16 |         std::cout<<a　<<b　<<c;
      |                    ^~~
a.cc:16:25: error: 'b\U00003000' was not declared in this scope
   16 |         std::cout<<a　<<b　<<c;
      |                         ^~~
Language: C++

import java.io.*;

public class Main
{
	public static void main(String[] args)throws IOException
	{
		BufferedReader br=
		new BufferedReader(new InputStreamReader(System.in));
		
		String str1=br.readLine();
		String[] strs=str1.split(" ",3);
		int[] nums=new int[3];
		int num=0;
		for (int i=0;i<3;i++){
			nums[i]=Integer.parseInt(strs[i]);
		}
		num=nums[0];
		nums[0]=nums[1];
		nums[1]=num;
		num=nums[0];
		nums[0]=nums[2];
		nums[2]=num;
		System.out.print(nums[0]+" "+nums[1]+" " +nums[2]);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main
      | ^~~~~~
Language: C++

A = int(input("Input A= "))
B = int(input("Input B= "))
C = int(input("Input C= "))
if 1 <= A <= 100 and 1 <= B <= 100 and 1 <= C <= 100:
    temp = A
    A = B
    B = temp
    temp = C
    C = A
    A = temp
    print(A, B, C)


Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A = int(input("Input A= "))
      | ^
Language: C++

nclude<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define rep(i,a,b) for (int i = a; i <= b; i++)
#define lin puts("");
ll n,x,y,a[300000],b[300000],c=0,t=0,sum=0,z=0,i,j,f=0;
char ch[101],cr,ss[101];
string s;
int main()
{
    rep(i,0,2)
    cin>>a[i];
    swap(a[0],a[1]);
    swap(a[0],a[2]);
    rep(i,0,2)
    cout<<a[i]<<" ";
    return 0;
}

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude<bits/stdc++.h>
      | ^~~~~~
a.cc:4:9: error: 'vector' does not name a type
    4 | typedef vector<int> vi;
      |         ^~~~~~
a.cc:5:9: error: 'pair' does not name a type
    5 | typedef pair<int,int> pi;
      |         ^~~~
a.cc:14:1: error: 'string' does not name a type
   14 | string s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:18:5: error: 'cin' was not declared in this scope; did you mean 'lin'?
   18 |     cin>>a[i];
      |     ^~~
      |     lin
a.cc:19:5: error: 'swap' was not declared in this scope
   19 |     swap(a[0],a[1]);
      |     ^~~~
a.cc:22:5: error: 'cout' was not declared in this scope
   22 |     cout<<a[i]<<" ";
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define inf ll(10e15)
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    ll t;
    t=1;
    while(t--)
    {
        ll x,y,z;
        cin>>x>>y>>z;
        cout<<z<<" "x<<" "y;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: unable to find string literal operator 'operator""x' with 'const char [2]', 'long unsigned int' arguments
   17 |         cout<<z<<" "x<<" "y;
      |                  ^~~~
a.cc:17:24: error: unable to find string literal operator 'operator""y' with 'const char [2]', 'long unsigned int' arguments
   17 |         cout<<z<<" "x<<" "y;
      |                        ^~~~
Language: Java

package com.example.demo;

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

public class ForLearning {

  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String[] split = reader.readLine().split(" ");
    int a = Integer.parseInt(split[0]);
    int b = Integer.parseInt(split[1]);
    int c = Integer.parseInt(split[2]);
    System.out.println(c + " " + a + " " + b);
  }
}


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

public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String[] split = reader.readLine().split(" ");
    int a = Integer.parseInt(split[0]);
    int b = Integer.parseInt(split[1]);
    int c = Integer.parseInt(split[2]);
    System.out.println(c + " " + a + " " + b);
  }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws IOException {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

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

public class ForLearning {

  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String[] split = reader.readLine().split(" ");
    int a = Integer.parseInt(split[0]);
    int b = Integer.parseInt(split[1]);
    int c = Integer.parseInt(split[2]);
    System.out.println(c + " " + a + " " + b);
  }
}

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

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

int main(){
int X, Y, Z;
cin >> X >> Y >> Z;
cout << Z << X << Y << endl;
}

Compiler output:
a.cc:2:16: error: expected identifier before ';' token
    2 | using namespace;
      |                ^
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 | cin >> X >> Y >> Z;
      | ^~~
      | 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:7:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 | cout << Z << 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:7:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 | cout << Z << 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)
      |     ^~~~
Language: C++

#include<cstdio>

int main(){
    int a,b,c;
    scanf("%d %d %d", &a, &b, &c);
    printf("%d %d %d", c,a,b)l
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:30: error: expected ';' before 'l'
    6 |     printf("%d %d %d", c,a,b)l
      |                              ^
      |                              ;
Language: C++

#include<bits/stdc++.h>

using namespace std;
#define   all(a)    a.beign(),a.end()


int main()
{
  	int a,b,c;
  	cin>>a>>b>>c;
  	cout<<c<<a<<b;
  	return ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |         return ;
      |         ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {

	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);

	int a, b, c, t;
	cin >> a >> b >> c;
	t = a;
	a = b;
	b = t;
	t = a;
	a = c;
	c = t;
	cout << a << ' ' << b << ' ' c << '\n';

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:37: error: expected ';' before 'c'
   18 |         cout << a << ' ' << b << ' ' c << '\n';
      |                                     ^~
      |                                     ;
Language: C++

#include<bits/stdc++.h>
using namesapce std ;
int main()
{
  int x , y , z ;
  cin >> x >> y >> z ;
  cout << z << " " << x << " " << y << endl ;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std ;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> x >> y >> z ;
      |   ^~~
      |   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:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout << z << " " << 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:7:40: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   cout << z << " " << 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)
      |     ^~~~
Language: Java


    public static void main(String[] args) {
        // write your code here

        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);


        int x = in.nextInt();
        int y = in.nextInt();
        int z = in.nextInt();

        int temp1 = x;
        x = y; y =temp1;

        int temp2 = x;
        x = z; z = temp2;
        out.println(x + " " + y + " " + z);
        out.close();

    }



Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String[] args) {
                  ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.io.PrintWriter;
import java.util.Scanner;

public class ABCSwap {

    public static void main(String[] args) {
        // write your code here

        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);


        int x = in.nextInt();
        int y = in.nextInt();
        int z = in.nextInt();

        int temp1 = x;
        x = y; y =temp1;

        int temp2 = x;
        x = z; z = temp2;
        out.println(x + " " + y + " " + z);
        out.close();

    }


}

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

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

int main() {
  int N,K,a;
  cin >> N >> K;
  if ( N >= K)
  a = N % K;
  else
    a = N
  if( a >= K/2){
  a = K - a;
  }
 cout << a <<endl;
  
}
  




Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected ';' before 'if'
   10 |     a = N
      |          ^
      |          ;
   11 |   if( a >= K/2){
      |   ~~
Language: C++

#include <iostream>

using namespace std;

int main(){
	int a, b, c;
  cin >> a >> b >> c;
  swap(a,b)
  swap(a,c)
  cout << a << ' ' << b << ' ' << c << endl;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'swap'
    8 |   swap(a,b)
      |            ^
      |            ;
    9 |   swap(a,c)
      |   ~~~~
Language: C++

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

int main() {
  int N,M;
  cin >> N >> M;

  // N要素の配列
  vector<int> A(N);

  // 入力処理
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }

  int d ;
  for (int i =0; i <N; i++){
    d += A.at(i) }
  int sum = 0;

  // 合計点を計算
  for (int i = 0; i < N; i++) {
  if (A.at(i)*4*M > d) {
    // ①ここにプログラムを追記
    sum ++;
  }
  }
    if (sum >= M) {
      cout << "Yes" << endl;
    }
    else {
      cout << "No" << endl;
    }
}
  




Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: expected ';' before '}' token
   18 |     d += A.at(i) }
      |                 ^~
      |                 ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int X,Y,Z;
    cout << Y << Z << X
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: expected ';' before '}' token
    6 |     cout << Y << Z << X
      |                        ^
      |                        ;
    7 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int X,Y,Z;
    cout << Y << Z<<X;

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: expected '}' at end of input
    6 |     cout << Y << Z<<X;
      |                       ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
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 c = sc.nextInt();
    System.out.println(c + " " + a + " " + b)
  }
}

Compiler output:
Main.java:9: error: ';' expected
    System.out.println(c + " " + a + " " + b)
                                             ^
1 error
Language: Java

import java.utils.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    System.out.println(c + " " + a + " " + b);
  }
}

Compiler output:
Main.java:1: error: package java.utils does not exist
import java.utils.*;
^
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: Java

import java.utils.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    System.out.println(c + " " + a + " " + b)
  }
}

Compiler output:
Main.java:9: error: ';' expected
    System.out.println(c + " " + a + " " + b)
                                             ^
1 error
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int n,m;
  cin>>n>>m;
  int arr[1000];
  for(int i=;i<n;i++)
    cin>>arr[i];
  
  for(int i=0;i<n;i++)
    sum+=arr[i];
  int k=0;
  for(int i=0;i<n;i++)
  {
    if(arr[i]>= ((.25*s)/m))k++;

  }
  if(k>=m)cout<<"Yes\n";
  else cout<<"No\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected primary-expression before ';' token
    9 |   for(int i=;i<n;i++)
      |             ^
a.cc:13:5: error: 'sum' was not declared in this scope
   13 |     sum+=arr[i];
      |     ^~~
a.cc:17:23: error: 's' was not declared in this scope
   17 |     if(arr[i]>= ((.25*s)/m))k++;
      |                       ^
Language: C++

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

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int x,y,z;
  cin>>x>>y>>z;
  swap(x,y);
  swap(x,z);
  cout<<x<<" "<<y<<z" "<<"\n";
  return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before string constant
   12 |   cout<<x<<" "<<y<<z" "<<"\n";
      |                     ^~~
      |                     ;
Language: Java

import java.util.Scanner;
class Main
{
  public static void main(string args[])
  {
    Scanner sc=new Scanner(System.in);
    int a,b,c;
    a=sc.nextInt();
    b=sc.nextInt();
    c=sc.nextInt();
    System.out.println(c+" "+a+" "+b);
  }
};

Compiler output:
Main.java:4: error: cannot find symbol
  public static void main(string args[])
                          ^
  symbol:   class string
  location: class Main
1 error
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
  ios::sync_with_stdio(0);
  cin.tie(0);
  int a,b,c;
  scanf("%d%d%d",&a,&b,&c);
  printf"%d%d%d",&c,&a,&b);
}
  	

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected ';' before string constant
   10 |   printf"%d%d%d",&c,&a,&b);
      |         ^~~~~~~~
      |         ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,c;
  sf("%d %d %d",&a,&b,&c);
  swap(a,b);
  swap(a,c);
  pf("%d %d %d\n",a,b,c);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'sf' was not declared in this scope
    6 |   sf("%d %d %d",&a,&b,&c);
      |   ^~
a.cc:9:3: error: 'pf' was not declared in this scope
    9 |   pf("%d %d %d\n",a,b,c);
      |   ^~
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int a, b, c;
  cin >> a >> b >> c;
  cout << c ' '; cout << a ' '; cout << b;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before '\x20'
    8 |   cout << c ' '; cout << a ' '; cout << b;
      |            ^~~~
      |            ;
a.cc:8:27: error: expected ';' before '\x20'
    8 |   cout << c ' '; cout << a ' '; cout << b;
      |                           ^~~~
      |                           ;
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int a, b, c;
  cin >> a >> b >> c;
  cout << c; ' ' cout << a;' ' cout << b;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'cout'
    8 |   cout << c; ' ' cout << a;' ' cout << b;
      |                 ^~~~~
      |                 ;
a.cc:8:31: error: expected ';' before 'cout'
    8 |   cout << c; ' ' cout << a;' ' cout << b;
      |                               ^~~~~
      |                               ;
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int a, b, c;
  cin >> a >> b >> c;
  cout << c ' ' << a ' ' << b;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before '\x20'
    8 |   cout << c ' ' << a ' ' << b;
      |            ^~~~
      |            ;
Language: Java

import java.util.Scanner;

	public static void main(String[]args){

       	Scanner sc = new Scanner(System.in);
	   int A = sc.nextInt();
	    int B = sc.nextInt();
	    int C = sc.nextInt();
        int tmp = A;
        A = B;
        B = tmp;
        tmp = A;
        A = C;
        C = tmp;
        System.out.println(A +" "+ B +" "+ C);
       
}


Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[]args){
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;
public class test {

	public static void main(String[]args){

       	Scanner sc = new Scanner(System.in);
	   int A = sc.nextInt();
	    int B = sc.nextInt();
	    int C = sc.nextInt();
        int tmp = A;
        A = B;
        B = tmp;
        tmp = A;
        A = C;
        C = tmp;
        System.out.println(A +" "+ B +" "+ C);
        

	}


}


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

#include<iostream>
unsing namespace std;
void Main(){
  	int a,b,c;
	cin>>a,b,c;
  	cout<<c<<" "<<b<<" "<<a
}

Compiler output:
a.cc:2:1: error: 'unsing' does not name a type; did you mean 'unsigned'?
    2 | unsing namespace std;
      | ^~~~~~
      | unsigned
a.cc: In function 'void Main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin>>a,b,c;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout<<c<<" "<<b<<" "<<a
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream.h>
using namespace std;

int main()
{
int a,b,c;
  cin>>a>>b>>c;
  
  cout<<c<<a<<b<<"\n";

  return 0;
}

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

   #include <bits/stdc++.h>
    using namespace std;
     
    int main() {
            int N, M;
            double sum = 0;
            cin >> N >> M;
     
            vector<int> a(N);
            for(int i =0;i<N;++i){
                    cin >> a[i];
                    sum += a[i];
            }
            double b = sum /(4*M);
            int c = 0;
            for(int i =0;i<N;++i){
                    if(a[i] >= b){
                            c += 1;
                    }
            }
            if(c >= M){  
                  cout << "Yes" << endl;
            }else{
                  cout << "No" << endl;
            }
     
    
        return 0;
    }
~                             

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

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

int main() {
        int N;
        double M;
        int sum = 0;
        cin >> N >> M;

        vector<int> a(N);
        for(int i =0;i<N;++i){
                cin >> a[i];
                sum += a[i];
        }
        double b = sum /(4*M);
        sort(a.begin(), a.end(), grather<int>());
        int c = 0;
        while(a[c]>=b){
                ++c;
        }
        if(c >= M){
                cout << "Yes" << endl;
        }else{
                cout << "No" << endl;
        }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:34: error: 'grather' was not declared in this scope
   16 |         sort(a.begin(), a.end(), grather<int>());
      |                                  ^~~~~~~
a.cc:16:42: error: expected primary-expression before 'int'
   16 |         sort(a.begin(), a.end(), grather<int>());
      |                                          ^~~
Language: C++

int main(){
  int x,y,z;
 scanf(%d,x);
  scanf(%d,y);
  scanf(%d,z);
  printf("%d %d %d",z,x,y);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:8: error: expected primary-expression before '%' token
    3 |  scanf(%d,x);
      |        ^
a.cc:3:9: error: 'd' was not declared in this scope
    3 |  scanf(%d,x);
      |         ^
a.cc:3:2: error: 'scanf' was not declared in this scope
    3 |  scanf(%d,x);
      |  ^~~~~
a.cc:4:9: error: expected primary-expression before '%' token
    4 |   scanf(%d,y);
      |         ^
a.cc:5:9: error: expected primary-expression before '%' token
    5 |   scanf(%d,z);
      |         ^
a.cc:6:3: error: 'printf' was not declared in this scope
    6 |   printf("%d %d %d",z,x,y);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
Language: C++

int main(){
  int A,B,C;
 scanf(%d,x);
  scanf(%d,y);
  scanf(%d,z);
  printf("%d %d %d",z,x,y);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:8: error: expected primary-expression before '%' token
    3 |  scanf(%d,x);
      |        ^
a.cc:3:9: error: 'd' was not declared in this scope
    3 |  scanf(%d,x);
      |         ^
a.cc:3:11: error: 'x' was not declared in this scope
    3 |  scanf(%d,x);
      |           ^
a.cc:3:2: error: 'scanf' was not declared in this scope
    3 |  scanf(%d,x);
      |  ^~~~~
a.cc:4:9: error: expected primary-expression before '%' token
    4 |   scanf(%d,y);
      |         ^
a.cc:4:12: error: 'y' was not declared in this scope
    4 |   scanf(%d,y);
      |            ^
a.cc:5:9: error: expected primary-expression before '%' token
    5 |   scanf(%d,z);
      |         ^
a.cc:5:12: error: 'z' was not declared in this scope
    5 |   scanf(%d,z);
      |            ^
a.cc:6:3: error: 'printf' was not declared in this scope
    6 |   printf("%d %d %d",z,x,y);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
Language: C++

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

int main() {
  int X, Y, Z; cin >> X >> Y >> Z;
  cout << Z << B << A;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'B' was not declared in this scope
    6 |   cout << Z << B << A;
      |                ^
a.cc:6:21: error: 'A' was not declared in this scope
    6 |   cout << Z << B << A;
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long int
int main(){
  int n,k;
  cin>>n>>k;
  int ans=n%k;
  ans=min(ans,abs(ans-k));
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc:3:23: error: '::main' must return 'int'
    3 | #define int long long int
      |                       ^~~
a.cc:4:1: note: in expansion of macro 'int'
    4 | int main(){
      | ^~~
Language: Java

import java.util.Scanner;
public class MyClass {
    public static void main(String args[]) {
     Scanner sc = new Scanner(System.in);
     int i,j,k,l,m,n,x,y,z;
     x=sc.nextInt();
     y=sc.nextInt();
     z=sc.nextInt();
     System.out.println(z+" "+x+" "+y);
     
    }
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int X,Y,Z;
  cin >> X >> Y >> Z;
  cout << Z <<" " << y << " " << X <<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: 'y' was not declared in this scope
    6 |   cout << Z <<" " << y << " " << X <<"\n";
      |                      ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int x,y,x;
  cin>>x>>y>>z;
  cout<<z<<" "<<x<<" "<<y<<endl;
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: redeclaration of 'int x'
    4 |   int x,y,x;
      |           ^
a.cc:4:7: note: 'int x' previously declared here
    4 |   int x,y,x;
      |       ^
a.cc:5:14: error: 'z' was not declared in this scope
    5 |   cin>>x>>y>>z;
      |              ^
Language: C++

#include <isotream>
using namespace std;

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

    int temp = a;
    a=b;
    b=temp;
    int temp1=a;
    a =c;
    c= temp1;

    cout <<a <<" "<< b<< " "<<c;
    return 0; 
}

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

#include <bits/stdc++.h>

using namespace std;

int main() {
    itn a, b, c;
    cin >> a >> b >> c;
    cout << c << a << b << "\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'itn' was not declared in this scope; did you mean 'int'?
    6 |     itn a, b, c;
      |     ^~~
      |     int
a.cc:7:12: error: 'a' was not declared in this scope
    7 |     cin >> a >> b >> c;
      |            ^
a.cc:7:17: error: 'b' was not declared in this scope
    7 |     cin >> a >> b >> c;
      |                 ^
a.cc:7:22: error: 'c' was not declared in this scope
    7 |     cin >> a >> b >> c;
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c;
  cin>>a>>b>>c;
  cout<<c<<" "<<a" "<<b<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: expected ';' before string constant
    6 |   cout<<c<<" "<<a" "<<b<<endl;
      |                  ^~~
      |                  ;
Language: C++

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

int main(){
  int X,Y,Z;
  cin>>X>>Y>>Z;
  cout<<Z" "<<X" "<<Y" "<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before string constant
    7 |   cout<<Z" "<<X" "<<Y" "<<endl;
      |          ^~~
      |          ;
Language: C++

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

int static main(void){
  int X,Y,Z;
  cin>>X>>Y>>Z;
  cout<<Z<<X<<Y<<endl;
  return 0;
}

Compiler output:
a.cc:4:12: error: cannot declare '::main' to be static
    4 | int static main(void){
      |            ^~~~