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

#include<iostream>
suing namespace std;
main(){
  int a,b;
  cin>>a>>b;
  if(b==1)cout<<0<<endl;
  else{
    int c=a-b;
    cout<<c<<endl;
  }
}

Compiler output:
a.cc:2:1: error: 'suing' does not name a type
    2 | suing namespace std;
      | ^~~~~
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>a>>b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   if(b==1)cout<<0<<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:6:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   if(b==1)cout<<0<<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)
      |     ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout<<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:9:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout<<c<<endl;
      |              ^~~~
      |              std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // スペース区切りの整数の入力
    int N,K;
    cin >> N >> K;
    ans = N - K;
    // 出力
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |     ans = N - K;
      |     ^~~
      |     abs
Language: C++

#include <iostream>

using namespace std;

int main(){
    int a;
    //a
    int b;
    //b
    cin >> a >> b;
    //aとbを標準入力
    if (a == 1){
    cout<< 0 <<endl;
  } else {
    cout<< b - a <<endl;
    //aとbの差を出力する処理
}

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

#include<stdio.h>
int main(void)
{
  int N,K;
  int amari;
  int kubari;
  scanf("%d %d", &N ,&K);
  if(N == K)
    printf("0\n");
  else if(K == 1);
    printf("0\n");
  else
    amari=N-K;
  	kubari = amari + 1;
  	printf("%d\n",kubari);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:3: error: 'else' without a previous 'if'
   12 |   else
      |   ^~~~
Language: C

#include<stdio.h>
int main(void)
{
  int N,K
  int amari;
  int kubaru;
  scanf("%d %d", &N ,&K);
  if(N=K);
    printf("0\n");
  else
    amari=N-K;
  	kubaru = amaru + 1;
  	printf("%d\n",kubaru);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    5 |   int amari;
      |   ^~~
main.c:7:23: error: 'K' undeclared (first use in this function)
    7 |   scanf("%d %d", &N ,&K);
      |                       ^
main.c:7:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:3: error: 'else' without a previous 'if'
   10 |   else
      |   ^~~~
main.c:11:5: error: 'amari' undeclared (first use in this function)
   11 |     amari=N-K;
      |     ^~~~~
main.c:12:18: error: 'amaru' undeclared (first use in this function)
   12 |         kubaru = amaru + 1;
      |                  ^~~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
    int a;
    //a
    int b;
    //b
    cin >> a >> b;
    //aとbを標準入力
    cout << (a + a.length) - b << endl;
    //aとbの差を出力する処理
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: request for member 'length' in 'a', which is of non-class type 'int'
   12 |     cout << (a + a.length) - b << endl;
      |                    ^~~~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
    int a;
    //a
    int b;
    //b
    cin >> a >> b;
    //aとbを標準入力
    cout << (a.length) - b << endl;
    //aとbの差を出力する処理
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: request for member 'length' in 'a', which is of non-class type 'int'
   12 |     cout << (a.length) - b << endl;
      |                ^~~~~~
Language: C++

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

int main(){
    int A, B, C;
    cin >> A >> B;
    C = A-B;
    if(K ==1) {
        cout << "0" << endl;
        return 0;
    }
    cout << C << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'K' was not declared in this scope
    8 |     if(K ==1) {
      |        ^
Language: C

#include<stdio.h>

int main(){
int N,K;
scanf("%d, %d",&N, &K);
if (K = 1){
printf("1¥n);
}
printf("%d¥n",N-K);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:8: warning: missing terminating " character
    7 | printf("1¥n);
      |        ^
main.c:7:8: error: missing terminating " character
    7 | printf("1¥n);
      |        ^~~~~~
main.c:8:1: error: expected expression before '}' token
    8 | }
      | ^
main.c:7:8: error: expected ';' before '}' token
    7 | printf("1¥n);
      |        ^
      |        ;
    8 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c; cin >> a >> b;
  int c=a;
  for(int i=0;i<100;i++) {
    c-=b;
    if(c<b) {
      break;
    }
  }
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: redeclaration of 'int c'
    5 |   int c=a;
      |       ^
a.cc:4:13: note: 'int c' previously declared here
    4 |   int a, b, c; cin >> a >> b;
      |             ^
Language: Java

import java.util.Scanner;
public class main.java {
	public static void main(String[]args){
		Scanner tc =new Scanner(System.in);
		int N,K;
		N=tc.nextInt();
		K=tc.nextInt();
		if(K>=1 && K<=100 && N>=1 && N<=100){
		if(N>K){
			int D=N-K;
			System.out.println(D);
		}if(K>N){
			int D=K-N;
			System.out.println(D);
		}
		
	}
	}

}


Compiler output:
Main.java:2: error: '{' expected
public class main.java {
                 ^
1 error
Language: Java

import java.util.Scanner;
public class main {
	public static void main(String[]args){
		Scanner tc =new Scanner(System.in);
		int N,K;
		N=tc.nextInt();
		K=tc.nextInt();
		if(K>=1 && K<=100 && N>=1 && N<=100){
		if(N>K){
			int D=N-K;
			System.out.println(D);
		}if(K>N){
			int D=K-N;
			System.out.println(D);
		}
		
	}
	}

}

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

#include <stdio.h>
int main(void)
{
	int n, k ;
	if(n>=1&&n<=100&&k>=1&&k<=100){
	scanf("%d",n);scanf("%d",k);d
    if(n>=1&&n<=100&&k>=1&&k<=100){
	printf("%d",n%k);
	}
	else{}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:37: error: 'd' was not declared in this scope
    6 |         scanf("%d",n);scanf("%d",k);d
      |                                     ^
a.cc:10:9: error: expected '}' before 'else'
   10 |         else{}
      |         ^~~~
a.cc:5:39: note: to match this '{'
    5 |         if(n>=1&&n<=100&&k>=1&&k<=100){
      |                                       ^
Language: Java

import java.util.Scanner;
public class main {
	public static void main(String[]args){
		Scanner tc =new Scanner(System.in);
		int N,K;
		N=tc.nextInt();
		K=tc.nextInt();
		if(N>K){
			int D=N-K;
			System.out.println(D);
		}if(K>N){
			int D=K-N;
			System.out.println(D);
		}
		
	}

}


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

#include<stdio.h>
int main()
{
  int ball=0;
  int people=0;
  int max=0;
 scanf_s("%d %d\n",&ball,&people);
  max=ball-people;
  printf("%d",max);
 
  return 0;
}

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

#include <stdio.h>
int main(){
  int N,K;
  scanf(''%d%d'',&N,&K);
  if(K==1){
   printf(''0'');
  }else{
   print(''%d'',N-K);
  }
}


Compiler output:
main.c: In function 'main':
main.c:4:9: error: empty character constant
    4 |   scanf(''%d%d'',&N,&K);
      |         ^~
main.c:4:12: error: 'd' undeclared (first use in this function)
    4 |   scanf(''%d%d'',&N,&K);
      |            ^
main.c:4:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:15: error: empty character constant
    4 |   scanf(''%d%d'',&N,&K);
      |               ^~
main.c:4:15: error: expected ')' before '\x0'
    4 |   scanf(''%d%d'',&N,&K);
      |        ~      ^~
      |               )
main.c:6:11: error: empty character constant
    6 |    printf(''0'');
      |           ^~
main.c:6:13: error: expected ')' before numeric constant
    6 |    printf(''0'');
      |          ~  ^
      |             )
main.c:6:14: error: empty character constant
    6 |    printf(''0'');
      |              ^~
main.c:8:4: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |    print(''%d'',N-K);
      |    ^~~~~
      |    printf
main.c:8:10: error: empty character constant
    8 |    print(''%d'',N-K);
      |          ^~
main.c:8:14: error: empty character constant
    8 |    print(''%d'',N-K);
      |              ^~
main.c:8:14: error: expected ')' before '\x0'
    8 |    print(''%d'',N-K);
      |         ~    ^~
      |              )
Language: C

#include <stdio.h>
int main(){
  int N,K;
  scanf(''%d%d'',&N,&K);
  if(K==1){
   printf(''0'')
  }else{
   print(''%d'',N-K)
  }
}

Compiler output:
main.c: In function 'main':
main.c:4:9: error: empty character constant
    4 |   scanf(''%d%d'',&N,&K);
      |         ^~
main.c:4:12: error: 'd' undeclared (first use in this function)
    4 |   scanf(''%d%d'',&N,&K);
      |            ^
main.c:4:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:15: error: empty character constant
    4 |   scanf(''%d%d'',&N,&K);
      |               ^~
main.c:4:15: error: expected ')' before '\x0'
    4 |   scanf(''%d%d'',&N,&K);
      |        ~      ^~
      |               )
main.c:6:11: error: empty character constant
    6 |    printf(''0'')
      |           ^~
main.c:6:13: error: expected ')' before numeric constant
    6 |    printf(''0'')
      |          ~  ^
      |             )
main.c:6:14: error: empty character constant
    6 |    printf(''0'')
      |              ^~
main.c:6:17: error: expected ';' before '}' token
    6 |    printf(''0'')
      |                 ^
      |                 ;
    7 |   }else{
      |   ~              
main.c:8:4: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |    print(''%d'',N-K)
      |    ^~~~~
      |    printf
main.c:8:10: error: empty character constant
    8 |    print(''%d'',N-K)
      |          ^~
main.c:8:14: error: empty character constant
    8 |    print(''%d'',N-K)
      |              ^~
main.c:8:14: error: expected ')' before '\x0'
    8 |    print(''%d'',N-K)
      |         ~    ^~
      |              )
main.c:8:21: error: expected ';' before '}' token
    8 |    print(''%d'',N-K)
      |                     ^
      |                     ;
    9 |   }
      |   ~
Language: C

#include<stdio.h>

int main(){]
          int k,n;
           scanf("%d%d",&n,&k);
           if(k==1)printf("0");
           else printf("%d",n-k);
           return 0;
          }

Compiler output:
main.c: In function 'main':
main.c:3:12: error: expected statement before ']' token
    3 | int main(){]
      |            ^
Language: Java

import java.util*;

class Main{
  public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int k = stdIn.nextInt();
    
    if(k == 1){
      System.out.println(0);
    }else{
      System.out.println(n-k);
    }
  }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util*;
                ^
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"

signed main() {
  IOS;
  int n, k;
  cin >> n >> k;
  cout << (k == 1 ? 0 : (n-k) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
   12 |   cout << (k == 1 ? 0 : (n-k) << endl;
      |                         ~~~~~ ^~
      |                           |
      |                           int
a.cc:12:38: error: expected ')' before ';' token
   12 |   cout << (k == 1 ? 0 : (n-k) << endl;
      |           ~                          ^
Language: C++

#include <iostream>
using namespace std;


int main() {
	int A, K;

	cin >> N >> K;

	int diff = N - K;

	if (K == 1) diff = 0;

	cout << diff << endl;



}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'N' was not declared in this scope
    8 |         cin >> N >> K;
      |                ^
Language: C++

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

int main()
{
   int N,K;
  cin>>N>>K;
  if(N==1){
  cout<<0<<endl;}
  else{
  cout<<N-K<<endl;}
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>N>>K;
      |   ^~~
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout<<0<<endl;}
      |   ^~~~
a.cc:9:12: error: 'endl' was not declared in this scope
    9 |   cout<<0<<endl;}
      |            ^~~~
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout<<N-K<<endl;}
      |   ^~~~
a.cc:11:14: error: 'endl' was not declared in this scope
   11 |   cout<<N-K<<endl;}
      |              ^~~~
Language: C++

int N, K;
    cin >> N;
    cin >> K;

    if (K < 2) {
        cout << 0 << endl;
        return 0;
    }

    cout << N - K - 1 << endl;

Compiler output:
a.cc:2:5: error: 'cin' does not name a type
    2 |     cin >> N;
      |     ^~~
a.cc:3:5: error: 'cin' does not name a type
    3 |     cin >> K;
      |     ^~~
a.cc:5:5: error: expected unqualified-id before 'if'
    5 |     if (K < 2) {
      |     ^~
a.cc:10:5: error: 'cout' does not name a type
   10 |     cout << N - K - 1 << endl;
      |     ^~~~
Language: C++

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

int main()  {
    int N, K;
    cin >> N >> K;
     if (k == 1) {
         cout << 0 << endl;
     }
     if (k > 1)  {
         cout << N - (k-1) << endl;
     }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'k' was not declared in this scope
    7 |      if (k == 1) {
      |          ^
a.cc:10:10: error: 'k' was not declared in this scope
   10 |      if (k > 1)  {
      |          ^
Language: C++

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

int main()  {
    cin >> N >> K;
     if (k == 1) {
         cout << 0 << endl;
     }
     if (k > 1)  {
         cout << N - (k-1) << endl;
     }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'N' was not declared in this scope
    5 |     cin >> N >> K;
      |            ^
a.cc:5:17: error: 'K' was not declared in this scope
    5 |     cin >> N >> K;
      |                 ^
a.cc:6:10: error: 'k' was not declared in this scope
    6 |      if (k == 1) {
      |          ^
a.cc:9:10: error: 'k' was not declared in this scope
    9 |      if (k > 1)  {
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int name = N, K;
  cout << N - K << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: 'N' was not declared in this scope
    5 |   int name = N, K;
      |              ^
a.cc:6:15: error: 'K' was not declared in this scope
    6 |   cout << N - K << endl;
      |               ^
Language: C

#include <stdio.h>

int main() {
  int N,K;
  scanf("%d %d", &N, &K);
  if (K == 1) {
    int a = N;
  }else {
    int a = N-K;
  }
  printf("%d", a);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:16: error: 'a' undeclared (first use in this function)
   11 |   printf("%d", a);
      |                ^
main.c:11:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
  int name = N;
  int name = K;
  cout << N - K << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: 'N' was not declared in this scope
    5 |   int name = N;
      |              ^
a.cc:6:7: error: redeclaration of 'int name'
    6 |   int name = K;
      |       ^~~~
a.cc:5:7: note: 'int name' previously declared here
    5 |   int name = N;
      |       ^~~~
a.cc:6:14: error: 'K' was not declared in this scope
    6 |   int name = K;
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  scanf("%d%d",&n,&k);
  int mx = n-(k-1), mn = 1;
  printf("%d",mx-mn);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'n' was not declared in this scope; did you mean 'yn'?
    4 |   scanf("%d%d",&n,&k);
      |                 ^
      |                 yn
a.cc:4:20: error: 'k' was not declared in this scope
    4 |   scanf("%d%d",&n,&k);
      |                    ^
a.cc:6:18: error: 'mn' was not declared in this scope; did you mean 'mx'?
    6 |   printf("%d",mx-mn);
      |                  ^~
      |                  mx
Language: C

include<iostream>
using namespace std;
int main()
{
  int n,k;
  cin >> n >> k;
  cout << n%k;
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<iostream>
      |        ^
main.c: In function 'main':
main.c:6:3: error: 'cin' undeclared (first use in this function)
    6 |   cin >> n >> k;
      |   ^~~
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:3: error: 'cout' undeclared (first use in this function)
    7 |   cout << n%k;
      |   ^~~~
Language: C++

// Ball Distribution

#include <iostream>
#include <vector>
#include <math.h>
#include <string>

using namespace std;

int main()
{
    int N,K;
    cin >> N >> K;
    cout << N % k;
    return 0;
}%

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'k' was not declared in this scope
   14 |     cout << N % k;
      |                 ^
a.cc: At global scope:
a.cc:16:2: error: expected unqualified-id before '%' token
   16 | }%
      |  ^
Language: C++

using namespace std;
int main() {
	int i , j;
	cin >> i >> j;
	cout << i - j;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> i >> j;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:5:9: error: 'cout' was not declared in this scope
    5 |         cout << i - j;
      |         ^~~~
a.cc:5:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: expected initializer before 'cin'
    3 |         cin >> a >> b;
      |         ^~~
a.cc:4:9: error: 'cout' was not declared in this scope
    4 |         cout << a + b;
      |         ^~~~
a.cc:4:21: error: 'b' was not declared in this scope
    4 |         cout << a + b;
      |                     ^
Language: C++

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



int main() {
#ifdef whyqx
    freopen("work.in", "r", stdin);
    freopen("work.out", "w", stdout);
#endif
    int n, k;
    cin >> n >> k;
    if (k == 1) cout << 0;
    else cout << n - k << endl;
    return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected ';' before '}' token
   15 |     return 0
      |             ^
      |             ;
   16 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ll long long
#define ii pair<int, int>
#define vi vector<int>
#define ld long double
#define vii vector<ii>
#define vll vector<ll>
#define maxn -879879

template<typename T>
void trace(T a){ cout << a << '\n';}
template<typename T, typename... Args>
void trace(T a, Args ...args){ cout << a << ' '; trace(args...);}

int main(){
	int n,k;
	cin >> n >> k;
	trace(n%k)
 	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: expected ';' before 'return'
   23 |         trace(n%k)
      |                   ^
      |                   ;
   24 |         return 0;
      |         ~~~~~~
Language: C++

    int main(){
    	int a;
        int b;
        int c;
        c = a-b
        return c;  
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: expected ';' before 'return'
    5 |         c = a-b
      |                ^
      |                ;
    6 |         return c;
      |         ~~~~~~
Language: C++

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

#define ll long long int

typedef pair<ll,ll> pii;

#define vl vector<ll>
#define vb vector<bool>
#define vs vector<string>
#define vvl vector<vector<ll,ll> >
#define vvs vector<vector<string> >
#define pb push_back
#define mk make_pair
#define sbit(a)  __builtin_popcount(a)
#define f(i,a,n) for(i=a;i<n;i++)
#define fb(i,a,n) for(i=a;i>=n;i--)
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define nextp(s) next_permutation(s.begin(), s.end()); 
#define ignor cin.ignore(numeric_limits<streamsize>::max(), '\n')
#define bsearch(a,x) binary_search(a.begin(),a.end(),x)
#define ini ll i,j,k,l,m,n,x,y,sm=0,cnt=0
const ll mod=1e9+7;
const double pi=acos(-1);


bool prime[1000000];
void sieve(ll n) 
{ 
    memset(prime, true, sizeof(prime)); 
  
    for (ll p=2; p*p<=n; p++) 
    { 
        if (prime[p] == true) 
        { 
            for (ll i=p*2; i<=n; i += p) 
                prime[i] = false; 
        } 
    } 
} 



ll bs(ll arr[], ll l, ll r, ll x)
{
   if (r >= l)
   {
        ll mid = l + (r - l)/2;
        if (arr[mid] == x)  
            return mid;
        if (arr[mid] > x) 
            return bs(arr, l, mid-1, x);
        return bs(arr, mid+1, r, x);
   }
   return -1;
}




ll moex(ll x,ll n,ll mod)

{
    
	if(n==0)
        
       		return 1;
    
	else if(n%2 == 0)   
        	
		return moex((x*x)%mod,n/2,mod);
    
	else 
              return (x*moex((x*x)%mod,(n-1)/2,mod))%mod;

}


ll modi(ll a, ll m) 
{ 
      	ll k=moex(a, m-2, m); 
	return k;
} 
const ll maximum=99999;
void subString(string s, int n) 
{
    for (int i = 0; i < n; i++) 
        for (int len = 1; len <= n - i; len++)
            cout << s.substr(i, len) << endl;
}


int main(){
    	fast;
       ll n,k;
       cin>>n>>k;
       if(n==k)
       cout<<0;
       else
       cout <<n-k<;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:100:19: error: expected primary-expression before ';' token
  100 |        cout <<n-k<;
      |                   ^
Language: C++

#include <iostream>
int main() {
 int n, k;
  cin >> n >> k;
  if(k == 1) cout << "0" << endl;
  else cout << n - k << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> n >> k;
      |   ^~~
      |   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:5:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   if(k == 1) cout << "0" << 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:5:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   if(k == 1) cout << "0" << 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)
      |     ^~~~
a.cc:6:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   else cout << n - k << 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:6:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   else cout << n - k << endl;
      |                         ^~~~
      |                         std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

using namespace std;

int main(){
  int N,K;cin>>N>>K;
  if(K==1){
    cout<<0<<endl;
    }else{
    cout<<N-K<<endl;
    }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: 'cin' was not declared in this scope
    4 |   int N,K;cin>>N>>K;
      |           ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:5: error: 'cout' was not declared in this scope
    6 |     cout<<0<<endl;
      |     ^~~~
a.cc:6:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:14: error: 'endl' was not declared in this scope
    6 |     cout<<0<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<N-K<<endl;
      |     ^~~~
a.cc:8:5: 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<<N-K<<endl;
      |                ^~~~
a.cc:8:16: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

int main(){
	int a;
    int b;
    int c;
    c = a-b
    return c  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected ';' before 'return'
    5 |     c = a-b
      |            ^
      |            ;
    6 |     return c
      |     ~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main() {

	int N, K;
	cin >> N >> K;
	
	if (N == K || K = 1) {
		cout << 0 << endl;
	}
	else {
		cout << N - K << endl;
	}

	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: lvalue required as left operand of assignment
    9 |         if (N == K || K = 1) {
      |             ~~~~~~~^~~~
Language: C++

#include <stdio.h>
#include <iostream.h>

int main(){
	int a;
    int b;
    int c;
    c = a-b
    return c  
}

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

#include<iostream>
using namespace std;

int main(){
    int N,K,;
    cin>>N>>K;
    cout<<N%K<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: expected unqualified-id before ';' token
    5 |     int N,K,;
      |             ^
Language: C++

int main(){
  int N,K;cin>>N>>K;
  if(K==1){
    cout<<0<<endl;
    }else{
    cout<<N-K<<endl;
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:2:11: error: 'cin' was not declared in this scope
    2 |   int N,K;cin>>N>>K;
      |           ^~~
a.cc:4:5: error: 'cout' was not declared in this scope
    4 |     cout<<0<<endl;
      |     ^~~~
a.cc:4:14: error: 'endl' was not declared in this scope
    4 |     cout<<0<<endl;
      |              ^~~~
a.cc:6:5: error: 'cout' was not declared in this scope
    6 |     cout<<N-K<<endl;
      |     ^~~~
a.cc:6:16: error: 'endl' was not declared in this scope
    6 |     cout<<N-K<<endl;
      |                ^~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
using ll = long long int;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pll = pair<ll, ll>;

int main() {
	int K, N;
	cin >> K >> N;
	cout << N - K << endl;
	return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before '}' token
   12 |         return 0
      |                 ^
      |                 ;
   13 | }
      | ~
Language: Java

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

		int n = sc.nextInt();
		int k = sc.nextInt();
		int ans;
		if (k > 1) {
			ans = n - k;
		} else {
			ans = 0;
		}
		System.out.println(ans);

	}

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

int main(int argc, const char * argv[]) {    
    int N, K;
    cin >> N;
    cin >> K;
    
    if (K < 2) {
        cout << 0 << endl;
        return 0;
    }
    
    cout << N - K - 1 << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> N;
      |     ^~~
a.cc:7:9: error: 'cout' was not declared in this scope
    7 |         cout << 0 << endl;
      |         ^~~~
a.cc:7:22: error: 'endl' was not declared in this scope
    7 |         cout << 0 << endl;
      |                      ^~~~
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << N - K - 1 << endl;
      |     ^~~~
a.cc:11:26: error: 'endl' was not declared in this scope
   11 |     cout << N - K - 1 << endl;
      |                          ^~~~
Language: Java

import java.util.Scanner;

public class Main2 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		if (k == 1) {
			System.out.println(0);
		} else {
			int out = n - k;
			System.out.println(out);
		}

	}
}

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

#include <bits/stdc++.h>

/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace __gnu_pbds;
*/

using namespace std;

#if DEBUG && !ONLINE_JUDGE
    #include "debug.h"
#else
    #define debug(...)
#endif

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<vector<int> > vvi;
typedef vector<vector<ii> > vvii;

#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define fill(a,x) memset(a,x,sizeof(a))
#define ff first
#define ss second
#define trav(a, x) for(auto& a : x) 
#define FOR(i,a,b) for(int i = a; i<=b; ++i)
#define NFOR(i,a,b) for(int i = a; i>=b; --i)
const ll INF = 1e18;
const int mod = 1e9 + 7;
ll gcd(ll a,ll b){if (a==0) return b;return gcd(b%a,a);}
ll lcm(ll a,ll b){return a*(b/gcd(a,b));}
ll Abs(ll a){if(a>0)return a;return -a;}
ll Ceil(ll a,ll b){if(a%b==0)return a/b;else return a/b+1;}
double Abs(double a){if(a>0)return a;return -a;}

//*X.find_by_order(2) element at index=2
//X.order_of_key(1) how many elements strictly less than 1

//#define ordered_set tree<int, null_type,less_equal<int>, rb_tree_tag,tree_order_statistics_NOde_update> 

inline int pow_(ll x, ll y,ll p){
  int r = 1; while(y){if(y & 1) r = r * x % p; y >>= 1; x = x * x % p;} return r;
}
inline int inv_(int x){return pow_(x, mod - 2, mod);}
inline int add(int a, int b){a += b; if(a >= mod) a -= mod; return a;}
inline int mul(int a, int b){return a * 1LL * b % mod;}
inline int sub(int a, int b){a -= b; if(a < 0) a += mod; return a;}

int main()
{
	#ifdef LOCAL_TEST
	freopen("in.txt","r",stdin);
	freopen("out.txt", "w", stdout);
	#else
	ios_base::sync_with_stdio(false);cin.tie(NULL);
	#endif
	int n,k;
	cin>>n>>k;
	if(n==1)
	{
		cout << "0\n";
		return 0;
	}
]	cout << n << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:70:1: error: expected primary-expression before ']' token
   70 | ]       cout << n << "\n";
      | ^
Language: C

#include<stdio.h>
int main(){
  int n,k;
  scanf("%d %d",&n,&k);
  if(k==1){
    pritf("0\n");
    return 0;
  }
  printf("%d\n",n-k);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:5: error: implicit declaration of function 'pritf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |     pritf("0\n");
      |     ^~~~~
      |     printf
Language: C++

using namespace std;

int main() {
  int K, N;
  cin>>K>>N;
  cout<<N-K<<endl;
  return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>K>>N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout<<N-K<<endl;
      |   ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:14: error: 'endl' was not declared in this scope
    6 |   cout<<N-K<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:7:11: error: expected ';' before '}' token
    7 |   return 0
      |           ^
      |           ;
    8 | }
      | ~
Language: C++

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

int main(){
    int N,K;
    cin >> N >> K;
    if(K==1){
      cout << 0 << endl;
    }
  else{
    cout << N-K << endl;
  }
  return;
}

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

import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        solve();
    }

    static void solve() {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int k = scanner.nextInt();

        if (k == 1) {
            System.out.println(0);
        } else {
            System.out.println((n - (k - 1) - 1));
        }

    }
}


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

/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		
	    if(k==1)
	    System.out.println("0");
	    else
	    System.out.println(n-k);
		
	}
}

Compiler output:
Main.java:8: error: class Ideone is public, should be declared in a file named Ideone.java
public class Ideone
       ^
1 error
Language: C

#include<stdio.h>
2.int main(){
3.  int n,k;
4.  scanf("%d %d",&n,&k);
5.  if(k==1){
6.    pritf("0\n");
7.    return 0;
8.  }
9.  printf("%d",n-k);
10.  return 0;
11.}


Compiler output:
main.c:2:1: error: invalid suffix "int" on floating constant
    2 | 2.int main(){
      | ^~~~~
main.c:2:1: error: expected identifier or '(' before numeric constant
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>

int main(){
  int N,K;
  cin >> N >> K;
  int max=N-K+1-1;
  cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin >> N >> K;
      |   ^~~
      |   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:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << max << 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:11:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout << max << 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<bits/stdc++.h>
#define rep(i,l,r) for (int i=l;i<=r;i++)
using namespace std;
typedef long long ll;
int a,b,c,ans,N,M,tt;
int main(){
	scanf("%d%d",&N,&K);
	if (K==1) printf("0\n");
	else printf("%d\n",N-K);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: 'K' was not declared in this scope
    7 |         scanf("%d%d",&N,&K);
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
 int n,k

 cin>>n>>k;

 if(k==1){
     cout<<0;
 }
 else{
 cout<<n-k;
 }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:2: error: expected initializer before 'cin'
    7 |  cin>>n>>k;
      |  ^~~
a.cc:9:5: error: 'k' was not declared in this scope
    9 |  if(k==1){
      |     ^
Language: Java

package Contest1506;

import java.util.Scanner;

public class A1506 {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int k = scn.nextInt();
		scn.close();
		System.out.println((k == 1) ? "0" : n - k);
	}
}


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

#include <bits/stdc++.h>
using ll = long long;
using namespace std;
 
int main() {
  ll N,K;
  cin>>N>>K;
  if (N==1)cout<<0;
  else cout<<K-(N-1)-1;
  return 0;
}
#include <bits/stdc++.h>
using ll = long long;
using namespace std;

int main() {
  ll N,K;
  cin>>N>>K;
  if (K==1)cout<<0<<endl;
  else cout<<K-N<<endl;
  return 0;
}


Compiler output:
a.cc:16:5: error: redefinition of 'int main()'
   16 | int main() {
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main() {
      |     ^~~~
Language: Java

    import java.util.*;
    public class Main {// Main
        public static void main(String[] args){
            int n = sc.nextInt();
            int k = sc.nextInt();
            if(k==1) System.out.println(0);
            else System.out.println(n-k);
        }
    }							

Compiler output:
Main.java:4: error: cannot find symbol
            int n = sc.nextInt();
                    ^
  symbol:   variable sc
  location: class Main
Main.java:5: error: cannot find symbol
            int k = sc.nextInt();
                    ^
  symbol:   variable sc
  location: class Main
2 errors
Language: C++

import java.util.*;
 
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int k = sc.nextInt();

        if (k == 1) {
            System.out.println(0);
        } else {
            System.out.println(n - k);
        }
	}
}

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:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

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

using namespace std;


int main() {
		cin >> N >> K;
			if (K == 1)
				cout << 0 << endl;
			else
				cout << N - K << endl;

			return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'N' was not declared in this scope
   10 |                 cin >> N >> K;
      |                        ^
a.cc:10:29: error: 'K' was not declared in this scope
   10 |                 cin >> N >> K;
      |                             ^
Language: C++


/*
LANG:C++
PROB:

*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <iostream>
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)


using namespace __gnu_pbds;
using namespace std;


typedef tree<int, null_type, less<int>, rb_tree_tag,
            tree_order_statistics_node_update>
    ordered_set;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef double ld;
typedef unsigned long long ui64;

template<class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; }


  int main()
  {
ios::sync_with_stdio(false);
    cin.tie(nullptr);

    // ifstream fin(".in");
    // ofstream fout(".in");

i64 a,b;
cin>>a>>b;
if(b==1)
cout<<0;
else
cout<<a-<<endl;


    return 0;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:61:9: error: expected primary-expression before '<<' token
   61 | cout<<a-<<endl;
      |         ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
 int n,k

 cin>>n>>k;

 if(k==1){
     cout<<0;
 }
 cout<<n-k;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:2: error: expected initializer before 'cin'
    7 |  cin>>n>>k;
      |  ^~~
a.cc:9:5: error: 'k' was not declared in this scope
    9 |  if(k==1){
      |     ^
a.cc:12:10: error: 'k' was not declared in this scope
   12 |  cout<<n-k;
      |          ^
Language: C++

#include <iostream>
using namespace std;

int main() {
    int N, K;
    cint >> N >> K;

    if(K == 1) {
        cout << 0 << endl;
    } else {
        cout << N - K << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cint' was not declared in this scope; did you mean 'uint'?
    6 |     cint >> N >> K;
      |     ^~~~
      |     uint
Language: Java

import java.util.Scanner;

public class A1506 {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		int k = scn.nextInt();
		scn.close();
		System.out.println((k == 1) ? "0" : n - k);
	}
}

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

#include <stdio.h>
#include <iostream>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <string.h>

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n)  FOR(i,0,n)

using namespace std;

typedef long long ll;

ll n, k;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    cin >> n >> k;
    
    if (k == 1) {
        cout << 0 << endl;
        return;
    }
    
    cout << n - k << endl;
}


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

//#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define MAX_INT 2100000000
#define ex5 (100000+10)
using namespace std;
typedef long long int ll;
//#ifdef COMPILE_IN_VCPP
#include <windows.h>
HWND GetConsoleHwnd(void)
{
#define MY_BUFSIZE 1024 // Buffer size for console window titles.
	HWND hwndFound;         // This is what is returned to the caller.
	char pszNewWindowTitle[MY_BUFSIZE]; // Contains fabricated// WindowTitle.
	char pszOldWindowTitle[MY_BUFSIZE]; // Contains original// WindowTitle.
	ULARGE_INTEGER nt;
	nt.QuadPart = GetTickCount64();
	GetConsoleTitle(pszOldWindowTitle, MY_BUFSIZE);
	wsprintf(pszNewWindowTitle, "%d%d/%d",nt.HighPart,nt.LowPart,GetCurrentProcessId());
	SetConsoleTitle(pszNewWindowTitle);
	Sleep(40);
	hwndFound = FindWindow(NULL, pszNewWindowTitle);
	SetConsoleTitle(pszOldWindowTitle);
	return(hwndFound);
}
//#endif
int main()
{
#ifdef COMPILE_IN_VCPP
	SetWindowPos(GetConsoleHwnd(), HWND_TOPMOST, 0, 0, 0, 0,
		(SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW));
#endif
	int n, k;
	cin >> n >> k;
	if (k == 1) cout << '0' << endl ;
	else cout << n - k << endl;
}


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

#include <bits/stdc++.h>

#define REP(i, a, b) for (int i = (a); i < (b); i++)
#define REPR(i, a, b) for (int i = (a); i >= (b); i--)
#define ALL(container) (container).begin(), (container).end()

using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;

const int INF = 1e9;

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

  if (k == 1) {
    cout << 0;
  } else {
    cout << N-K << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:7: error: 'k' was not declared in this scope
   20 |   if (k == 1) {
      |       ^
Language: C++

//#include<bits/stdc++.h>	// 全てのヘッダーファイルをinclude
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include<set>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPR (i,n) for(int i=n;i>0;i--)
#define FOR(i,m,n) for(int i=m;i<n;i++)
const int MOD{ int(1e9 + 7) };	// int 1000000007
const int inf{ int(1e9) };	// inf = 1000000000 // 1e9 はdouble型
using namespace std;
typedef long long ll;

int n, m, k, a, b, c, d;
int sum, cnt;
string s, t, u;


int main(void) {

	int ;
	cin >> n >> k;

	cout << (k==1?0:(n-k+1)-1) << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: declaration does not declare anything [-fpermissive]
   23 |         int ;
      |         ^~~