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

int main(){
	int x, a, b;

	scanf("%d%d%d", &x, &a, &b);

	x = x - a;
	while (x > b) {
		x = x - b;
	}

	printf("%d\n", x);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf' was not declared in this scope
    4 |         scanf("%d%d%d", &x, &a, &b);
      |         ^~~~~
a.cc:11:9: error: 'printf' was not declared in this scope
   11 |         printf("%d\n", x);
      |         ^~~~~~
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 <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <array>
#include <vector>
#include <functional>
#include <unordered_map>
#include <map>
#include <numeric>
#include <limits>
#include <utility>
#include <queue>
#include <random>
using namespace std;

int main(){
	int x, a, b;

	scanf_s("%d%d%d", &x, &a, &b);

	x = x - a;
	while (x > b) {
		x = x - b;
	}

	printf("%d\n", x);

	return 0;
}

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

int main(){
	int x, a, b;

	scanf_s("%d%d%d", &x, &a, &b);

	x = x - a;
	while (x > b) {
		x = x - b;
	}

	printf("%d\n", x);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf_s' was not declared in this scope
    4 |         scanf_s("%d%d%d", &x, &a, &b);
      |         ^~~~~~~
a.cc:11:9: error: 'printf' was not declared in this scope
   11 |         printf("%d\n", x);
      |         ^~~~~~
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<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<array>
#include<vector>
#include<functional>
#include<unordered_map>
#include<map>
#include<numeric>
#include<limits>
#include<utility>
#include<queue>
#include<random>
 
using namespace std;
 
int main(){
int X,A,B;
 
  cin >> X;
  cin >> A;
  cin >> B;
  
  X = X - A;
  
  while(X > B){
    X = X - B;
  
  
  }
 
  cout << X;
  
  return 0;
  

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

#include<iostream>
using namespace std;

int main(){

	int A, B, C, X;
	int count=0;
	cin >> A;
	cin >> B;
	cin >> C;
	Cin >> X;

	for(int i = 0; i <= A; i++){
		for(int j = 0; j <= B; j++){
			for(int k = 0; k <= C; k++){
				if( X == 500*A + 100*B + 50*C){
					count++;
				}
			}
		}
	}

	cout << count << '\n';
	return 0;

}

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

#incklude<iostream>

using namespace std;

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

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incklude; did you mean #include?
    1 | #incklude<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
    7 | cin >>A>>B>>X;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incklude<iostream>
a.cc:8:1: error: 'cout' was not declared in this scope
    8 | cout<<(X-A)%B<<endl;
      | ^~~~
a.cc:8:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:16: error: 'endl' was not declared in this scope
    8 | cout<<(X-A)%B<<endl;
      |                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incklude<iostream>
Language: C++

#incklude<iostream>

using namespace std;

int main ()[
int A,B,X;
cin >>A>>B>>X;
cout<<(X-A)%B<<endl;
return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incklude; did you mean #include?
    1 | #incklude<iostream>
      |  ^~~~~~~~
      |  include
a.cc:6:1: error: expected primary-expression before 'int'
    6 | int A,B,X;
      | ^~~
a.cc:5:13: error: expected ']' before 'int'
    5 | int main ()[
      |             ^
      |             ]
    6 | int A,B,X;
      | ~~~          
a.cc:7:1: error: 'cin' does not name a type
    7 | cin >>A>>B>>X;
      | ^~~
a.cc:8:1: error: 'cout' does not name a type
    8 | cout<<(X-A)%B<<endl;
      | ^~~~
a.cc:9:1: error: expected unqualified-id before 'return'
    9 | return 0;
      | ^~~~~~
a.cc:10:1: error: expected declaration before '}' token
   10 | }
      | ^
Language: C++

#include<iostream>
using namespace std; 
 
 
int main()
{
int X;
int A;
int B;
cin >> X;
cin >> A;
cin >> B;
 
int printf ("%d",(X-A)%B);
 
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: expression list treated as compound expression in initializer [-fpermissive]
   14 | int printf ("%d",(X-A)%B);
      |                         ^
Language: C++

int printf (#include<iostream>
using namespace std; 


int main()
{
int X;
int A;
int B;
cin >> X;
cin >> A;
cin >> B;

int printf ("%d",(X-A)%B);

return 0;
}

Compiler output:
a.cc:1:13: error: stray '#' in program
    1 | int printf (#include<iostream>
      |             ^
a.cc:1:5: warning: built-in function 'printf' declared as non-function [-Wbuiltin-declaration-mismatch]
    1 | int printf (#include<iostream>
      |     ^~~~~~
a.cc:1:14: error: 'include' was not declared in this scope
    1 | int printf (#include<iostream>
      |              ^~~~~~~
a.cc:1:22: error: 'iostream' was not declared in this scope
    1 | int printf (#include<iostream>
      |                      ^~~~~~~~
a.cc:2:1: error: expected primary-expression before 'using'
    2 | using namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:10:1: error: 'cin' was not declared in this scope
   10 | cin >> X;
      | ^~~
a.cc:14:25: error: expression list treated as compound expression in initializer [-fpermissive]
   14 | int printf ("%d",(X-A)%B);
      |                         ^
Language: C++

#include<iostream>
using namespace std; 
 
 
int main()
{
int X;
int A;
int B;
cin >> X;
cin >> A;
cin >> B;
 
int printf (#include<iostream>
using namespace std; 
 
 
int main()
{
int X;
int A;
int B;
cin >> X;
cin >> A;
cin >> B;
 
int printf (%d,(X-A)%B);
 
return 0;
 
}

Compiler output:
a.cc:14:13: error: stray '#' in program
   14 | int printf (#include<iostream>
      |             ^
a.cc: In function 'int main()':
a.cc:14:14: error: 'include' was not declared in this scope
   14 | int printf (#include<iostream>
      |              ^~~~~~~
a.cc:14:30: error: expected primary-expression before '>' token
   14 | int printf (#include<iostream>
      |                              ^
a.cc:15:1: error: expected primary-expression before 'using'
   15 | using namespace std;
      | ^~~~~
a.cc:18:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   18 | int main()
      |         ^~
a.cc:18:9: note: remove parentheses to default-initialize a variable
   18 | int main()
      |         ^~
      |         --
a.cc:18:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:19:1: error: a function-definition is not allowed here before '{' token
   19 | {
      | ^
a.cc:31:2: error: expected '}' at end of input
   31 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include<iostream>
using namespace std; 
 
 
int main()
{
int X;
int A;
int B;
cin >> X;
cin >> A;
cin >> B;
 
X = (X-A)%B;

printf(X);
return 0;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   16 | printf(X);
      |        ^
      |        |
      |        int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <stdio.h>

int main(void){
    int A,B,C,X,way;
    way=0;
    scanf("%d%d%d%d",&A,&B,&C,&X);
    for(i=0;i<=A;i++){
        for(j=0;j<=B;j++){
            for(k=0;k<=C;k++){
                if(500*A+100*B+50*C==X)way++;               
            }  
        }
    }
    return 0;    
}

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

#include<stdio.h>

void main(){
  int x,a,b;
  scanf("%d",&x);
  scanf("%d",&a);
  scanf("%d",&b);
  x -= a;
  x -= b*(x/b);
  printf("%d",x);
}

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

#include <iostream>

void main(){
int X,A,B;
std::cin >> X;
std::cin >> A;
std::cin >> B;

std::cout << (X-A)%B << std::endl;


}


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

#incldue <iostream>
using namespace std;
int main(){
  int x,a,b;
  cin >> x >> a >> b;
  cout << (x-a)%b << endl;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> x >> a >> b;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incldue <iostream>
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << (x-a)%b << endl;
      |   ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:22: error: 'endl' was not declared in this scope
    6 |   cout << (x-a)%b << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incldue <iostream>
Language: C++

#include <iostream>

int main() {
	int a, b, x;
	int r;
	cin >> x >> a >> b;

	r = (x - a) % b;

	cout << r << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> x >> a >> b;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout << r << 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:10:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout << r << 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, x:
	int r;
	cin >> x >> a >> b;

	r = (x - a) % b;

	cout << r << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:20: error: expected initializer before ':' token
    4 |         int a, b, x:
      |                    ^
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> x >> a >> b;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:16: error: 'x' was not declared in this scope
    6 |         cin >> x >> a >> b;
      |                ^
a.cc:8:9: error: 'r' was not declared in this scope
    8 |         r = (x - a) % b;
      |         ^
a.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout << r << 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:10:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout << r << 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

import java.util.*;
public class Sweet {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int x = sc.nextInt();
    int a = sc.nextInt();
    int b = sc.nextInt();

    x = x - a;
    while(x >= b){
      x = x - b;
    }
    System.out.println(x);
  }
}


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

import java.util.*;
class Main
{
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int x = s.nextInt();int a = s.nextInt();int b = s.nextInt();
		int ans = (x-a);
		if(ans > b)
			ans = ans%b;
		System.out.println(ans);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String[] args) {
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         public static void main(String[] args) {
      |                                 ^~~~~~
a.cc:4:42: error: expected ',' or '...' before 'args'
    4 |         public static void main(String[] args) {
      |                                          ^~~~
a.cc:12:2: error: expected ';' after class definition
   12 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:17: error: 'Scanner' was not declared in this scope
    5 |                 Scanner s = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:6:25: error: 's' was not declared in this scope
    6 |                 int x = s.nextInt();int a = s.nextInt();int b = s.nextInt();
      |                         ^
a.cc:10:17: error: 'System' was not declared in this scope
   10 |                 System.out.println(ans);
      |                 ^~~~~~
Language: C++

#include<stdio.h>

int main(void){
   
int num;
scanf("%d,&num);

int nm;
scanf("%d,&nm);

int m;
scanf("%d,&m);

num=num-nm;

while(num>=m){
num=num-m;
}

printf("%d \n,num");

return 0;
}

Compiler output:
a.cc:6:7: warning: missing terminating " character
    6 | scanf("%d,&num);
      |       ^
a.cc:6:7: error: missing terminating " character
    6 | scanf("%d,&num);
      |       ^~~~~~~~~~
a.cc:9:7: warning: missing terminating " character
    9 | scanf("%d,&nm);
      |       ^
a.cc:9:7: error: missing terminating " character
    9 | scanf("%d,&nm);
      |       ^~~~~~~~~
a.cc:12:7: warning: missing terminating " character
   12 | scanf("%d,&m);
      |       ^
a.cc:12:7: error: missing terminating " character
   12 | scanf("%d,&m);
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before 'int'
    8 | int nm;
      | ^~~
a.cc:11:1: error: expected primary-expression before 'int'
   11 | int m;
      | ^~~
a.cc:14:9: error: 'nm' was not declared in this scope; did you mean 'num'?
   14 | num=num-nm;
      |         ^~
      |         num
a.cc:16:12: error: 'm' was not declared in this scope
   16 | while(num>=m){
      |            ^
Language: C++

#include<iostream>
#include<queue>

using namespace std;
static const int N = 100000;
static const int INFTY =(1<<21);

int n, M[N][N];
int d[N];
int m;
int p[N];
int g[N];
int c;

void bfs(int s){
  queue<int> q;
  q.push(s);
  d[s]=0;
  p[s]=0;
  int u;
  while(!q.empty()){
    u = q.front(); q.pop();
    g[u]=1;
    for (int v=0;v<n;v++){
      if(M[u][v]==INFTY)continue;
      if((p[v]!=INFTY)&&(p[v]!=p[u]+M[u][v])){
        c=1;
      }
      p[v]=p[u]+M[u][v];
      if(d[v]!= INFTY)continue;
      d[v]=d[u]+1;
      q.push(v);
    }
  }
  for(int k=0;k<n;k++){
    if(g[k]==0)bfs(k);
  }
}

int main(){
  int u,k,v;
  c=0;

  cin >>n;
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++)M[i][j]=INFTY;
  }

  cin >>m;
  for(int i=0;i<m;i++){
    cin >>u>>k>>v;
    u--;
    k--;
    M[u][k]=v;
    M[k][u]=(-v);
  }

  for(int i=0;i<n;i++)d[i]=INFTY;
  for(int j=0;j<n;j++)p[j]=INFTY;
  bfs(0);
  if(c==1){
    cout<<"No"<<endl;
  }
  else{
    cout<<"Yes"<<endl;
  }
  return 0;
}


Compiler output:
/tmp/ccUO7kJO.o: in function `bfs(int)':
a.cc:(.text+0x47): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccUO7kJO.o
a.cc:(.text+0x65): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccUO7kJO.o
a.cc:(.text+0xa2): relocation truncated to fit: R_X86_64_PC32 against symbol `g' defined in .bss section in /tmp/ccUO7kJO.o
a.cc:(.text+0xfb): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccUO7kJO.o
a.cc:(.text+0x119): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccUO7kJO.o
a.cc:(.text+0x130): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccUO7kJO.o
a.cc:(.text+0x166): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/ccUO7kJO.o
a.cc:(.text+0x17e): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccUO7kJO.o
a.cc:(.text+0x1be): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccUO7kJO.o
a.cc:(.text+0x1d5): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccUO7kJO.o
a.cc:(.text+0x1f3): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<queue>

using namespace std;
static const int N = 100000;
static const int INFTY =(1<<21);

int n, M[N][N];
int d[N];
int m;
int p[N];
int g[N];
int c;

void bfs(int s){
  queue<int> q;
  q.push(s);
  d[s]=0;
  p[s]=0;
  int u;
  while(!q.empty()){
    u = q.front(); q.pop();
    g[u]=1;
    for (int v=0;v<n;v++){
      if(M[u][v]==INFTY)continue;
      if((p[v]!=INFTY)&&(p[v]!=p[u]+M[u][v])){
        c=1;
      }
      p[v]=p[u]+M[u][v];
      if(d[v]!= INFTY)continue;
      d[v]=d[u]+1;
      q.push(v);
    }
  }
  for(int k=0;k<n;k++){
    if(g[k]==0)bfs(k);
  }
}

int main(){
  int u,k,v;
  c=0;

  cin >>n;
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++)M[i][j]=INFTY;
  }

  cin >>m;
  for(int i=0;i<m;i++){
    cin >>u>>k>>v;
    u--;
    k--;
    M[u][k]=v;
    M[k][u]=(-v);
  }

  for(int i=0;i<n;i++)d[i]=INFTY;
  for(int j=0;j<n;j++)p[j]=INFTY;
  bfs(0);
  if(c==1){
    cout<<"No"<<endl;
  }
  else{
    cout<<"Yes"<<endl;
  }
  return 0;
}


Compiler output:
/tmp/ccI15Vn4.o: in function `bfs(int)':
a.cc:(.text+0x47): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccI15Vn4.o
a.cc:(.text+0x65): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccI15Vn4.o
a.cc:(.text+0xa2): relocation truncated to fit: R_X86_64_PC32 against symbol `g' defined in .bss section in /tmp/ccI15Vn4.o
a.cc:(.text+0xfb): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccI15Vn4.o
a.cc:(.text+0x119): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccI15Vn4.o
a.cc:(.text+0x130): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccI15Vn4.o
a.cc:(.text+0x166): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/ccI15Vn4.o
a.cc:(.text+0x17e): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccI15Vn4.o
a.cc:(.text+0x1be): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccI15Vn4.o
a.cc:(.text+0x1d5): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccI15Vn4.o
a.cc:(.text+0x1f3): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<queue>

using namespace std;
static const int N = 100000;
static const int INFTY =(1<<21);

int n, M[N][N];
int d[N];
int m;
int p[N];
int g[N];
int c;

void bfs(int s){
  queue<int> q;
  q.push(s);
  d[s]=0;
  p[s]=0;
  int u;
  while(!q.empty()){
    u = q.front(); q.pop();
    g[u]=1;
    for (int v=0;v<n;v++){
      if(M[u][v]==INFTY)continue;
      if((p[v]!=INFTY)&&(p[v]!=p[u]+M[u][v])){
        c=1;
      }
      p[v]=p[u]+M[u][v];
      if(d[v]!= INFTY)continue;
      d[v]=d[u]+1;
      q.push(v);
    }
  }
  for(int k=0;k<n;k++){
    if(g[k]==0)bfs(k);
  }
}

int main(){
  int u,k,v;
  c=0;

  cin >>n;
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++)M[i][j]=INFTY;
  }

  cin >>m;
  for(int i=0;i<m;i++){
    cin >>u>>k>>v;
    u--;
    k--;
    M[u][k]=v;
    M[k][u]=(-v);
  }

  for(int i=0;i<n;i++)d[i]=INFTY;
  for(int j=0;j<n;j++)p[j]=INFTY;
  bfs(0);
  if(c==1){
    cout<<"No"<<endl;
  }
  if(c==0){
    cout<<"Yes"<<endl;
  }
  return 0;
}


Compiler output:
/tmp/ccySvOIK.o: in function `bfs(int)':
a.cc:(.text+0x47): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccySvOIK.o
a.cc:(.text+0x65): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccySvOIK.o
a.cc:(.text+0xa2): relocation truncated to fit: R_X86_64_PC32 against symbol `g' defined in .bss section in /tmp/ccySvOIK.o
a.cc:(.text+0xfb): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccySvOIK.o
a.cc:(.text+0x119): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccySvOIK.o
a.cc:(.text+0x130): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccySvOIK.o
a.cc:(.text+0x166): relocation truncated to fit: R_X86_64_PC32 against symbol `c' defined in .bss section in /tmp/ccySvOIK.o
a.cc:(.text+0x17e): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccySvOIK.o
a.cc:(.text+0x1be): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccySvOIK.o
a.cc:(.text+0x1d5): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccySvOIK.o
a.cc:(.text+0x1f3): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C

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

int main(void){
    int x, a, b, sub1;
    scanf("%d%d%d", &x, &a, &b);
    sub1 = x - a;
    do{
        sub1 = sub1 - b;
    }while(sub2 > b);
    
    printf("%d\n", sub1);
}

Compiler output:
main.c: In function 'main':
main.c:11:12: error: 'sub2' undeclared (first use in this function); did you mean 'sub1'?
   11 |     }while(sub2 > b);
      |            ^~~~
      |            sub1
main.c:11:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <stdio.h>
int main(void)
{
int A;
int B;
int X;
scanf("%d%d%d",&X,&A,&B);
int mod=(X-A)%B;
printf("%d¥n",mod)

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before 'return'
    9 | printf("%d¥n",mod)
      |                   ^
      |                   ;
   10 | 
   11 | return 0;
      | ~~~~~~
Language: Java

public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();
		x = x - a*1 - ((x - a*1) / b)*b;
		System.out.println(x);
	}
}


Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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


int main(void){
	long long a,b,c,x,ans,a500,a100,a50,b500,b100;
	cin>>a>>b>>c>>x;
	a500 = int(x/500);
	b500 = x%500;
	a100 = int(b500/100);
	b100 = b500%100;
	a50 = b100/50;
	ans = a500*7+a100*2
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before 'cout'
   14 |         ans = a500*7+a100*2
      |                            ^
      |                            ;
   15 |         cout<<ans<<endl;
      |         ~~~~
Language: C++

#include<stdim.h>
#include<iostream>
using namespace std;
int main() {
  int a,b,x;
  cin >> x >>a>>b;
  cout << (x-a) -b*((x-a)%b) <<endl;
}

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

#include<stdim.h>
#i include<iostream>

int main() {
  int a,b,x;
  cin >> x >>a>>b;
  cout << (x-a) -b*((x-a)%b) <<endl;
}

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

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define pb push_back
#define s stack<T> s;
#define q queue<T> q;
#define ll long long





/** sort(array); 配列をソートする　**/


/** リスト内の一番大きな値を返す **/
int getMaxNum(vector<int> array)
{
	int ret = array[0];
	for(int i=1;i<array.size();i++)
	{
		if(ret < array[i]) ret = array[i];
	}
	return ret;
}


int main(){
	
	int a,b,x;
	scanf("%d",&a);
	scanf("%d",&b);
	scanf("%d",&x);

	double ans=x-a;
	int countB = 1;
	while (true){
		if(ans<=0){
			int ans2=((x-a)-(b*x))
			cout << ans2 << endl;
			return 0;
		}

		countB += 1;
		ans = ans-(b*countB);
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:25: error: expected ',' or ';' before 'cout'
   49 |                         cout << ans2 << endl;
      |                         ^~~~
Language: Java

import java.util.Scanner

class Main{
public static void main(String... args){
Scanner sc = new Scanner(System.in);
int money = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println((money - a) % b);
}
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.Scanner
                        ^
1 error
Language: Java

class Main{
public static void main(String... args){
Scanner sc = new Scanner(System.in);
int money = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println((money - a) % b);
}
}

Compiler output:
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

int main() {
    int X, A, B;
    cin >> X >> A >> B;
    int n = (X - A) / B;
    cout << X - A - n * B;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> X >> A >> B;
      |     ^~~
a.cc:5:5: error: 'cout' was not declared in this scope
    5 |     cout << X - A - n * B;
      |     ^~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;



public class A{
    public static void main(String[] args) throws IOException {

        Reader.init( System.in ); // connect Reader to an input stream
        int X = Reader.nextInt();
        int A = Reader.nextInt();
        int B = Reader.nextInt();
        System.out.println((X-A)%B);
    }
    }






class Reader {

    static BufferedReader reader;
    static StringTokenizer tokenizer;
    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                new InputStreamReader(input) );

        tokenizer = new StringTokenizer("");
    }

    static String nextToken() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    /** get next word */
    static String next() throws IOException {

        while ( ! tokenizer.hasMoreTokens() ) {

            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                    reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {

        return Integer.parseInt( next() );

    }

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

    static long nextLong() {
        return Long.parseLong(nextToken());
    }
}

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

#include "stdafx.h"
#include <string>
#include <iostream>
using namespace std;

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

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

#include<bits/stdc++.h>
using namespace std ; 
int main()
{
	int n , a , b , cnt=0 ; 
	cin >> a >> b >> c >> n;
	for(int i=0 ; i<=a ; i++)
		for(int j=0 ; j<=b ; j++)
			for(int k=0 ; k<=c ; k++)
				cnt+=(i*500 + j*100 + k*50 == n)
	cout << cnt  << endl ; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:26: error: 'c' was not declared in this scope
    6 |         cin >> a >> b >> c >> n;
      |                          ^
a.cc:10:65: error: expected ';' before 'cout'
   10 |                                 cnt+=(i*500 + j*100 + k*50 == n)
      |                                                                 ^
      |                                                                 ;
   11 |         cout << cnt  << endl ;
      |         ~~~~
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();
		int X = sc.nextInt();

		int out =0;

		//最小のコイン数で払う
		int num500 = X/500;
		int num100 = (X%500)/100;
		int num50  = (X-num500*500-num100*100)/50;
		if(num500<=A && num100<= B && num50<=C){
			out++;
		}else{
			System.out.println(0);
			System.exit();
		}

		for(int i=num500; i>=0; i--){
			for(int j= (X-500*i)/100 -1; j>=0; j--){
				if(j>B){
					continue;
				}
				int nc50 = (X- 500*i - 100*j)/50;
				if(nc50<=C){
					out++;
				}
				else{
					break;
				}
			}
		}
		// 出力
		System.out.println(out);
	}
}

Compiler output:
Main.java:21: error: method exit in class System cannot be applied to given types;
			System.exit();
			      ^
  required: int
  found:    no arguments
  reason: actual and formal argument lists differ in length
1 error
Language: C++

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		
		int X = in.nextInt();
		int A = in.nextInt();
		int B = in.nextInt();
		
		int buy = X-A;
		int count = buy/B;
		int V = B*count;
		int Y = buy-V;
		
		System.out.println(Y);
	}

}


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++

#include <iostream>
#include <string>
using namespace std;
int main()
{
　　int X,A,B;
    cin>>X;
	cin>>A;
	cin>>B;
	{
	  cout<<X-(X-A)%B<<endl;
}
}

Compiler output:
a.cc:6:1: error: extended character 　 is not valid in an identifier
    6 | 　　int X,A,B;
      | ^
a.cc:6:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int main()':
a.cc:6:1: error: '\U00003000\U00003000int' was not declared in this scope
    6 | 　　int X,A,B;
      | ^~~~~~~
a.cc:7:10: error: 'X' was not declared in this scope
    7 |     cin>>X;
      |          ^
a.cc:8:14: error: 'A' was not declared in this scope
    8 |         cin>>A;
      |              ^
a.cc:9:14: error: 'B' was not declared in this scope
    9 |         cin>>B;
      |              ^
Language: Java

import java.util.Scanner;

public class contest87 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// total money
		int X = sc.nextInt();
		// price of cake
		int A = sc.nextInt();
		// price of daunts
		int B = sc.nextInt();

		int rmaftercake = X - A;
		int daunutsnum = rmaftercake / B;
		int rmafterdanuts = rmaftercake - B * daunutsnum;
		System.out.println(rmafterdanuts);

	}

}


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

import java.util.Scanner;

public class abc87a{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();
		System.out.println((x-a)%b);
	}

}


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

package Abc087;

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

/**
 * @author miyaa
 *
 */
public class Abc087Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		try {
			int money = Integer.parseInt(in.readLine());
			int cakePrice = Integer.parseInt(in.readLine());
			int donutPrice = Integer.parseInt(in.readLine());

			int result = getBuyingSweetsResult(money, cakePrice, donutPrice);

			System.out.println(result);

		} catch (NumberFormatException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}
	}

	/**
	 * @param money
	 * @param cakePrice
	 * @param donutPrice
	 * @return
	 */
	public static int getBuyingSweetsResult(int money, int cakePrice, int donutPrice) {
		money -= cakePrice;
		while (money - donutPrice >= 0)
			money -= donutPrice;
		return money;
	}
}


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

import java.util.Scanner;

public class main{

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int x=sc.nextInt();
		int a=sc.nextInt();
		int b=sc.nextInt();
		int ans=(x-a)%b;
		System.out.println(ans);

	}

}


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

import java.*;
class Main{
  public static void main(String[] args) {
    Scanner in=new Scanner(System.in);
    int t=in.nextInt();
    int u=in.nextInt();
    int s=in.nextInt();
    System.out.println((t-u)%s);

  }
}

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

class Main{
    public static void main(String args[]){
        java.util.Scanner sc = new java.util.Scanner(System.in);
        int X,A,B,ans;

        X = sc.nextInt();
        A = sc.nextInt();
        B = sc.nextInt();


        ans = X - A;
        int C = ans/B;
        ans = ans - C*B;


        System.out.println(ans);

    }
}

Compiler output:
a.cc:2:11: error: expected ':' before 'static'
    2 |     public static void main(String args[]){
      |           ^~~~~~~
      |           :
a.cc:2:29: error: 'String' has not been declared
    2 |     public static void main(String args[]){
      |                             ^~~~~~
a.cc:19:2: error: expected ';' after class definition
   19 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:3:9: error: 'java' was not declared in this scope
    3 |         java.util.Scanner sc = new java.util.Scanner(System.in);
      |         ^~~~
a.cc:6:13: error: 'sc' was not declared in this scope
    6 |         X = sc.nextInt();
      |             ^~
a.cc:16:9: error: 'System' was not declared in this scope
   16 |         System.out.println(ans);
      |         ^~~~~~
Language: C++

public class Main{
    public static void main(String args[]){
        java.util.Scanner sc = new java.util.Scanner(System.in);
        int X,A,B,ans;

        X = sc.nextInt();
        A = sc.nextInt();
        B = sc.nextInt();


        ans = X - A;
        int C = ans/B;
        ans = ans - C*B;


        System.out.println(ans);

    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'public'
    1 | public class Main{
      | ^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	long x,a,b;
	cin>>x;
	cin>>a;
	cin>>b;
	cout<<(x-a)%b<<endl;
	return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected '}' at end of input
    9 |         return 0;
      |                  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
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();
        int X=sc.nextInt();
        int l=0;
        for(i=0;i<=A;i++){
            for(j=0;j<=B;j++){
                for(k=0;k<=C;k++){
                    if(X=500*i+100*j+50*k){
                        l++;
                    }
                }
            }
            if(i==A){
                System.out.println(l);
            }
        }
        

        


    }
}


Compiler output:
Main.java:10: error: cannot find symbol
        for(i=0;i<=A;i++){
            ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
        for(i=0;i<=A;i++){
                ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
        for(i=0;i<=A;i++){
                     ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
            for(j=0;j<=B;j++){
                ^
  symbol:   variable j
  location: class Main
Main.java:11: error: cannot find symbol
            for(j=0;j<=B;j++){
                    ^
  symbol:   variable j
  location: class Main
Main.java:11: error: cannot find symbol
            for(j=0;j<=B;j++){
                         ^
  symbol:   variable j
  location: class Main
Main.java:12: error: cannot find symbol
                for(k=0;k<=C;k++){
                    ^
  symbol:   variable k
  location: class Main
Main.java:12: error: cannot find symbol
                for(k=0;k<=C;k++){
                        ^
  symbol:   variable k
  location: class Main
Main.java:12: error: cannot find symbol
                for(k=0;k<=C;k++){
                             ^
  symbol:   variable k
  location: class Main
Main.java:13: error: cannot find symbol
                    if(X=500*i+100*j+50*k){
                             ^
  symbol:   variable i
  location: class Main
Main.java:13: error: cannot find symbol
                    if(X=500*i+100*j+50*k){
                                   ^
  symbol:   variable j
  location: class Main
Main.java:13: error: cannot find symbol
                    if(X=500*i+100*j+50*k){
                                        ^
  symbol:   variable k
  location: class Main
Main.java:13: error: incompatible types: int cannot be converted to boolean
                    if(X=500*i+100*j+50*k){
                        ^
Main.java:18: error: cannot find symbol
            if(i==A){
               ^
  symbol:   variable i
  location: class Main
14 errors
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 X=sc.nextInt();
        X=X-A;
        while(X>B){
            X=X-B;
            if(X<B){
                System.out.println(Y);
            }
          
        }
        

        


    }
}


Compiler output:
Main.java:12: error: cannot find symbol
                System.out.println(Y);
                                   ^
  symbol:   variable Y
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[]args){
        Scanner sc=new Scanner(System.in);
        int A=sc.nextI;nt();
        int B=sc.nextInt();
        int X=sc.nextInt();
        int Y=X-A;
        while(Y>B){
            Y=Y-B;
            if(Y<B){
                System.out.println(Y);
            }
          
        }
        

        


    }
}


Compiler output:
Main.java:5: error: cannot find symbol
        int A=sc.nextI;nt();
                ^
  symbol:   variable nextI
  location: variable sc of type Scanner
Main.java:5: error: cannot find symbol
        int A=sc.nextI;nt();
                       ^
  symbol:   method nt()
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[]args){
        Scanner sc=new Scanner(System.in);
        int A=sc.nextI;nt();
        int B=sc.nextInt();
        int X=sc.nextInt();
        int Y=X-A;
        int Z=Y;
        for(int i=0;Z<B;i++){
            Z=Z-B;
            if(Y<B){
                System.out.println(Z);
            }
          
        }
        

        


    }
}


Compiler output:
Main.java:5: error: cannot find symbol
        int A=sc.nextI;nt();
                ^
  symbol:   variable nextI
  location: variable sc of type Scanner
Main.java:5: error: cannot find symbol
        int A=sc.nextI;nt();
                       ^
  symbol:   method nt()
  location: class Main
2 errors
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 X=sc.nextInt();
        Y=X-A;
        for(int i=0;Y<B;i++){
            Y=Y-B;
            if(Y<B){
                System.out.println(Y);
            }
          
        }
        

        


    }
}


Compiler output:
Main.java:8: error: cannot find symbol
        Y=X-A;
        ^
  symbol:   variable Y
  location: class Main
Main.java:9: error: cannot find symbol
        for(int i=0;Y<B;i++){
                    ^
  symbol:   variable Y
  location: class Main
Main.java:10: error: cannot find symbol
            Y=Y-B;
            ^
  symbol:   variable Y
  location: class Main
Main.java:10: error: cannot find symbol
            Y=Y-B;
              ^
  symbol:   variable Y
  location: class Main
Main.java:11: error: cannot find symbol
            if(Y<B){
               ^
  symbol:   variable Y
  location: class Main
Main.java:12: error: cannot find symbol
                System.out.println(Y);
                                   ^
  symbol:   variable Y
  location: class Main
6 errors
Language: Java

import java.util.scanner;
public class at{
    public static void main(String[]args){
        Scanner sc=new Scanner(System.in);
        int A=sc.nextInt();
        int B=sc.nextInt();
        int X=sc.nextInt();
        X=X-A;
        for(int i=0;X<B;i++){
            X=X-B;
            if(X<B){
                System.out.println(X);
            }
            break;
        }
        

        


    }
}


Compiler output:
Main.java:2: error: class at is public, should be declared in a file named at.java
public class at{
       ^
Main.java:1: error: cannot find symbol
import java.util.scanner;
                ^
  symbol:   class scanner
  location: package java.util
Main.java:4: error: cannot find symbol
        Scanner sc=new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class at
Main.java:4: error: cannot find symbol
        Scanner sc=new Scanner(System.in);
                       ^
  symbol:   class Scanner
  location: class at
4 errors
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 X=sc.nextInt();
        X=X-A;
        for(i=0;X<B;i++){
            X=X-B;
            if(X<B){
                System.out.println(X);
            }
        }
        

        


    }
}

Compiler output:
Main.java:11: error: cannot find symbol
        for(i=0;X<B;i++){
            ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
        for(i=0;X<B;i++){
                    ^
  symbol:   variable i
  location: class Main
2 errors
Language: C++

#include<iostream>
using namespave std;
int main()
{
    int X;
    cin >> X;
    int A, B;
    cin >> A, B;
    cout << X-(A+B) ;
    return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespave'
    2 | using namespave std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> X;
      |     ^~~
      |     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:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << X-(A+B) ;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~