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

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

int main(){
  int a,b,c,d;
  int count = 0;
  
  cin >>a>> b>>c>> d;
  
  for(int r=0; r <= N; r++)
  {
    for(int g=0; g <= N; g++)
	{
      if(d - r * a - g * b < 0)
        continue;
      if((d - r * a - g * b) % c == 0){
        count++;
        continue;
      }
    }
  }

  cout << count << endl;

}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	cin.tie(nullptr);
    ios::sync_with_stdio(false);
    
    int ans;
	int a,b,c,d;
	cin>>a>>b>>c>>d;
	for(int i=0;i<=(d/a);i++)
		for(int j=0;j<=(d/b);j++)
			for(int z=0;z<=(d/c);z++)
			  if(a*i+b*j+c*z==d)
              { 
                ans++;
                break；
              }
               
    cout<<ans; 
 } 

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'break\U0000ff1b' was not declared in this scope
   17 |                 break；
      |                 ^~~~~~~
Language: C++

#include <bits/stdc++.h>
scanf("%lld", &a);
printf("%.10lf");
printf("%s", s.c_str());
typedef long long ll;
using namespace std;
ll fac[200007],finv[200007],inv[200007];
void cominit(){
    fac[0]=fac[1]=1;
    finv[0]=finv[1]=1;
    inv[1]=1;
    for(int i=2;i<200007;i++){
        fac[i]=fac[i-1]*i%mod;
        inv[i]=mod-inv[mod%i]*(mod/i)%mod;
        finv[i]=finv[i-1]*inv[i]%mod;
    }
}
ll com(ll n,ll k){
    if(n<k)return 0;
    if(n<0 || k<0)return 0;
    return fac[n]*(finv[k]*finv[n-k]%mod)%mod;
}
********

ll root(ll u){
    if(uni[u]<0)return u;
    return uni[u]=root(uni[u]);
}
void connect(int a,int b){
    a=root(a);
    b=root(b);
    if(a==b)return;
    if(uni[a]>uni[b]){
        a^=b;
        b^=a;
        a^=b;
    }
    uni[a]+=uni[b];
    uni[b]=a;
    return;
}
ll size(ll u){
    return -uni[root(u)];
}
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cominit();
    memset(uni,-1,sizeof(uni));
    return 0;
}

Compiler output:
a.cc:2:6: error: expected constructor, destructor, or type conversion before '(' token
    2 | scanf("%lld", &a);
      |      ^
a.cc:3:7: error: expected constructor, destructor, or type conversion before '(' token
    3 | printf("%.10lf");
      |       ^
a.cc:4:7: error: expected constructor, destructor, or type conversion before '(' token
    4 | printf("%s", s.c_str());
      |       ^
a.cc: In function 'void cominit()':
a.cc:13:27: error: 'mod' was not declared in this scope; did you mean 'modf'?
   13 |         fac[i]=fac[i-1]*i%mod;
      |                           ^~~
      |                           modf
a.cc: In function 'll com(ll, ll)':
a.cc:21:38: error: 'mod' was not declared in this scope; did you mean 'modf'?
   21 |     return fac[n]*(finv[k]*finv[n-k]%mod)%mod;
      |                                      ^~~
      |                                      modf
a.cc: At global scope:
a.cc:25:4: error: expected constructor, destructor, or type conversion before 'root'
   25 | ll root(ll u){
      |    ^~~~
a.cc: In function 'void connect(int, int)':
a.cc:30:7: error: 'root' was not declared in this scope
   30 |     a=root(a);
      |       ^~~~
a.cc:33:8: error: 'uni' was not declared in this scope; did you mean 'unix'?
   33 |     if(uni[a]>uni[b]){
      |        ^~~
      |        unix
a.cc:38:5: error: 'uni' was not declared in this scope; did you mean 'unix'?
   38 |     uni[a]+=uni[b];
      |     ^~~
      |     unix
a.cc: In function 'll size(ll)':
a.cc:43:13: error: 'uni' was not declared in this scope; did you mean 'unix'?
   43 |     return -uni[root(u)];
      |             ^~~
      |             unix
a.cc:43:17: error: 'root' was not declared in this scope
   43 |     return -uni[root(u)];
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:49:12: error: 'uni' was not declared in this scope; did you mean 'unix'?
   49 |     memset(uni,-1,sizeof(uni));
      |            ^~~
      |            unix
Language: C++

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

Compiler output:
a.cc:2:16: error: expected identifier before ';' token
    2 | using namespace;
      |                ^
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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout << B-A+1;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

#inclulde<stdio.h>

int main()
{
	int m,k;
	scanf("%d %d",&m,&k);
	printf("%d",m-k+1);
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inclulde; did you mean #include?
    1 | #inclulde<stdio.h>
      |  ^~~~~~~~
      |  include
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |         scanf("%d %d",&m,&k);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inclulde<stdio.h>
main.c:6:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |         scanf("%d %d",&m,&k);
      |         ^~~~~
main.c:6:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |         printf("%d",m-k+1);
      |         ^~~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: Java

import java.util.Scanner;

public class AtCoder {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int K = scanner.nextInt();

        System.out.println(consecutive(N, K));;
    }

    protected static int consecutive(int N, int K) {
        int consecutive = N-K+1;

        return consecutive;
    }
}

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

#include<iostream>
using namespace std;

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

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

#include <bits/stdc++.h>
int main() {
int n,r;
cin >> n >> r;
cout << n-r+1 << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | cin >> n >> r;
      | ^~~
      | std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 | cout << n-r+1 << 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:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 | cout << n-r+1 << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
int main() {
	int n,r;
  	cin >> n >> r;
  	cout << n-r+1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |         cin >> n >> r;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |         cout << n-r+1 << 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:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |         cout << n-r+1 << endl;
      |                          ^~~~
      |                          std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
int main() {
	int n,r;
  	cin >> n >> r;
  	cout << n-r+1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |         cin >> n >> r;
      |         ^~~
      |         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:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |         cout << n-r+1 << 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:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |         cout << n-r+1 << 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++

#define _USE_MATH_DEFINES
#include<iostream>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<string>
#include<set>
#include<map>
#include<stdbool.h>
#include<math.h>
#include<sstream>
#include<math.h>
#include<vector>
#include<functional>
#include<queue>
#include<utility>
#include<bitset>
typedef long long ll;
#define N (1000000000+7)
#define INF 1e16
using namespace std;
typedef pair<ll, ll> P;

int main(void) {
	int n, k;
	cin >> n >> K;
	cout << n - k + 1 << endl;
	return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'n' was not declared in this scope
    7 |   cout<<n-k+1<<endl;
      |         ^
a.cc:7:11: error: 'k' was not declared in this scope
    7 |   cout<<n-k+1<<endl;
      |           ^
Language: C++

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

int main() {
   int r,g,b,n,a,t,x;
  cin>>r>>g>>b>>n;
  
  int ans;
  
  for(int a=0;a =< n;a++){
    for(int t=0;t < n-a;t++){
      if((n-r*a-g*t)%b == 0 && n-r*a-g*t => 0){
        
        ans++}
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected primary-expression before '<' token
   10 |   for(int a=0;a =< n;a++){
      |                  ^
a.cc:12:43: error: expected primary-expression before '>' token
   12 |       if((n-r*a-g*t)%b == 0 && n-r*a-g*t => 0){
      |                                           ^
a.cc:14:14: error: expected ';' before '}' token
   14 |         ans++}
      |              ^
      |              ;
Language: C++

#include <bits/stdc++.h>
int main(){
  int n,k;
  cin>>n>>k;
  cout<<n-k+1<<"\n";
}

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 /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout<<n-k+1<<"\n";
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |  cout<<n-k+1<<endl;
      |        ^
      |        yn
a.cc:6:10: error: 'k' was not declared in this scope
    6 |  cout<<n-k+1<<endl;
      |          ^
a.cc:7:11: error: expected ';' before '}' token
    7 |   return 0
      |           ^
      |           ;
    8 | }
      | ~
Language: C

#include <stdio.h>
int main(void)
{
	int a, b;
	scanf_s("%d %d", &a, &b);
	printf("%d\n", a - b + 1);
	return 0;
}

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

#include <stdio.h>
int main(void)
{
	int a, b,;
	scanf("%d %d", &a, &b);
	printf("%d\n", a - b + 1);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:18: error: expected identifier or '(' before ';' token
    4 |         int a, b,;
      |                  ^
Language: C

#include <stdio.h>
int main(void)
{
	int a, b,c;
	scanf_s("%d %d", &a, &b);
	printf("%d\n", a - b + 1);
}

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

#include <stdio.h>
int main(void)
{
	int a, b,c;
	scanf_s("%d %d", &a, &b);
	printf("%d\n", a - b + 1);
  return 0;
}

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

#include <stdio.h>

inr main(){
  int K,N;
  int ans;
  scanf("%d %d",&N,&K);
  ans = N - K + 1;
  printf("%d",ans);
  return 0;
}


Compiler output:
main.c:3:1: error: unknown type name 'inr'; did you mean 'int'?
    3 | inr main(){
      | ^~~
      | int
Language: C

#include <stdio.h>

inr main(){
  int K,N;
  int asn;
  scanf("%d %d",&N,&K);
  ans = N - K + 1;
  printf("%d",ans);
  return 0;
}


Compiler output:
main.c:3:1: error: unknown type name 'inr'; did you mean 'int'?
    3 | inr main(){
      | ^~~
      | int
main.c: In function 'main':
main.c:7:3: error: 'ans' undeclared (first use in this function); did you mean 'asn'?
    7 |   ans = N - K + 1;
      |   ^~~
      |   asn
main.c:7:3: 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 n,m;
    cin>>n>>m;
    cout<<(m > n ? 0 : n-m+1<<"\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: invalid operands of types 'int' and 'const char [2]' to binary 'operator<<'
    8 |     cout<<(m > n ? 0 : n-m+1<<"\n";
      |                        ~~~~~^~~~~~
      |                           |   |
      |                           int const char [2]
a.cc:8:35: error: expected ')' before ';' token
    8 |     cout<<(m > n ? 0 : n-m+1<<"\n";
      |           ~                       ^
      |                                   )
Language: C++

#includde<bits/stdc++.h>
using namespace std;
int main()
{
  int m,n;
  cin>>m;
  cin>>n;
  cout<<m-n+1;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includde; did you mean #include?
    1 | #includde<bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>m;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #includde<bits/stdc++.h>
a.cc:8:3: error: 'cout' was not declared in this scope
    8 |   cout<<m-n+1;
      |   ^~~~
a.cc:8:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>

int main()
{int x,y; cin >> x >> y;
 cout << x - y + 1 << endl;
 
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 | {int x,y; cin >> x >> y;
      |           ^~~
      |           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:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |  cout << x - y + 1 << 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:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |  cout << x - y + 1 << 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++

def main():
    N, K = map(int, input().split())
    ans = N - K + 1
    print(ans)


if __name__ == '__main__':
    main()


Compiler output:
a.cc:7:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    7 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: C++

#include<stdc++.h>
 using namespace std;
int main()
{
 int n,k;
  cin >> n >> k;
  cout << n-k+1 << endl;
}

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

#include<iostream>
using mamespace std;
int main(){
  int N,K;
  cin>>N>>K;
  cout<<N-K+1<<endl;
  return 0;
}
    

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'mamespace'
    2 | using mamespace std;
      |       ^~~~~~~~~
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>>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:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout<<N-K+1<<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:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout<<N-K+1<<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 <stdio.h>

int N, K, ans;

scanf("%d %d", &N, &K);

ans = N - K + 1;

return ans;

Compiler output:
main.c:5:7: error: expected declaration specifiers or '...' before string constant
    5 | scanf("%d %d", &N, &K);
      |       ^~~~~~~
main.c:5:16: error: expected declaration specifiers or '...' before '&' token
    5 | scanf("%d %d", &N, &K);
      |                ^
main.c:5:20: error: expected declaration specifiers or '...' before '&' token
    5 | scanf("%d %d", &N, &K);
      |                    ^
main.c:7:1: warning: data definition has no type or storage class
    7 | ans = N - K + 1;
      | ^~~
main.c:7:1: error: type defaults to 'int' in declaration of 'ans' [-Wimplicit-int]
main.c:7:7: error: initializer element is not constant
    7 | ans = N - K + 1;
      |       ^
main.c:9:1: error: expected identifier or '(' before 'return'
    9 | return ans;
      | ^~~~~~
Language: C++

#innclude<bits/stdc++.h>
using namespace std;
int main()
{
  int n,k;
  cin>>n>>k;
  cout<<n-k+1;
}
  

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #innclude; did you mean #include?
    1 | #innclude<bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   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 | #innclude<bits/stdc++.h>
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout<<n-k+1;
      |   ^~~~
a.cc:7:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
using namespace std;
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n,k;
  cin >> n >> k;
  if n >= k
    cout << n-k+1;
  else
    cout << 0;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected '(' before 'n'
    8 |   if n >= k
      |      ^
      |      (
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else
      |   ^~~~
Language: C++

#include <bits/stdc++.h>

#define pb push_back
#define eb emplace_back
#define mp make_pair
#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)

using namespace std;

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


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

  int n, k, ans = 0;
  cin >> n >> k;

  bitset<n> bs;
  for (int i = 0; i < pow(2, n); i++) {
  	if (bs.count() == k) {
  		ans++;
  	}
  }
  
  cout << ans << endl;

}	

  //cout << "Case #" << caseNum++ << ": " << ans << endl;  



Compiler output:
a.cc: In function 'int main()':
a.cc:26:11: error: the value of 'n' is not usable in a constant expression
   26 |   bitset<n> bs;
      |           ^
a.cc:23:7: note: 'int n' is not const
   23 |   int n, k, ans = 0;
      |       ^
a.cc:26:11: note: in template argument for type 'long unsigned int'
   26 |   bitset<n> bs;
      |           ^
a.cc:28:16: error: request for member 'count' in 'bs', which is of non-class type 'int'
   28 |         if (bs.count() == k) {
      |                ^~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'N' was not declared in this scope
    4 |   cout<<N-K+1<<endl;
      |         ^
a.cc:4:11: error: 'K' was not declared in this scope
    4 |   cout<<N-K+1<<endl;
      |           ^
Language: C

a,b=map(int,input().split())
print(a-b+1)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a,b=map(int,input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
    1 | a,b=map(int,input().split())
      |   ^
main.c:1:5: error: implicit declaration of function 'map' [-Wimplicit-function-declaration]
    1 | a,b=map(int,input().split())
      |     ^~~
main.c:1:9: error: expected expression before 'int'
    1 | a,b=map(int,input().split())
      |         ^~~
main.c:2:1: error: expected ',' or ';' before 'print'
    2 | print(a-b+1)
      | ^~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <sstream>
#include <queue>
#include <deque>
#define ll long long
#define MP make_pair
#define PII pair<int, int>
#define F first
#define S second
#define SHN 1e9
#define lSHN 1e18
using namespace std;
int n,m;
int main()
{
	cin >>n>>m;
	cout n-m+1;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: expected ';' before 'n'
   21 |         cout n-m+1;
      |             ^~
      |             ;
Language: C++

#inclide <iostream>
using namespace std;

int main() {
int a,b;
cin >> a >> b;
cout << a-b+1 << endl;
}


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

#include <iostream>

int main() {
  int n, k;
  cin >> n >> k;
  cout << n-k+1 << endl;
}

Compiler output:
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 >> 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:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout << n-k+1 << 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 |   cout << n-k+1 << 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 ll  long long
#define speed_up    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define rep(i,a,b)  for(ll i=a;i<b;i++)
#define pb push_back
#define Max(x,y,z) max(x,max(y,z))
#define f first
#define s second
#define lbd lower_bound
#define sz(x)       (ll)x.size()
#define pi 3.1415926536
#define mod 1000000007
using namespace std;
vector<ll> v;
find_divisors(ll a)
{
    ll b=sqrt(a);
    for(ll i=1;i<=b;i++)
    {   if(a%i==0)
    {
        if(a/i==i)
            v.pb(i);
        else
        {
            v.pb(i);
            v.pb(a/i);
        }
    }
    }
}
void solve()
{
    ll n,m,k,x,y,res=0,l,cnt=0,sum=0,z,sum1=0,cnt1=0,h,res1,cnt2=0;
   cin>>n;
   set<ll> s1;
   find_divisors(n);
   m=sz(v);
   rep(i,0,m)
   {    //cout<<v[i]<<" ";
       x=v[i]-1;
       if(x>0){
        if(n%x==(n/x))
        s1.insert(x);}
   }
   x=s1.size();
   for(auto i:s1)
       cnt+=i;
       cout<<cnt;

}
int main()
{   speed_up
    ll t;
   // cin>>t;
    t=1;
    while(t--)
        solve();
}


Compiler output:
a.cc:15:1: error: ISO C++ forbids declaration of 'find_divisors' with no type [-fpermissive]
   15 | find_divisors(ll a)
      | ^~~~~~~~~~~~~
a.cc: In function 'int find_divisors(long long int)':
a.cc:30:1: warning: no return statement in function returning non-void [-Wreturn-type]
   30 | }
      | ^
Language: C

#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <math.h>

#define SWAP(a, b) a = a ^ b; b = a ^ b; a = a ^ b

void print_int(int n)
{
    printf("%d\n",n);
    
}

void sort(int a[], int n)
{
    int h, i, j;

    for(h = 1; h < n / 9; h = h * 3 + 1)
        continue;

    for(; h > 0; h /= 3)
    {
        for(i = h; i < n; i++)
        {
            j = i;
            while(j >= h && a[j] < a[j-h])
            {
                swap(&a[j], &a[j-h]);
                j -= h;
            }
        }
    }
}

void print_list(int a[], int n)
{
    for(int i = 0; i < n; i++)
    {
        printf("%d ", a[i]);
    }
}

void intcpy(int a[], const int b[], int count)
{
    for(int i = 0; i < count; i++)
    {
        a[i] = b[i];
    }
}

int list_sum(int a[], int n)
{
    int sum = 0;

    for(int i = 0; i < n; i++)
    {
        sum += a[i];
    }

    return sum;
}


void permutate(int s[], int count, int n)
{
    if(n == count)
        return;

    for(int i = n; i < count; i++)
    {
        swap(&s[i], &s[n]);

        if(i != n)
        {
            //intcpy(result[j++], s, count);
        }
        
        permutate(s, count, n+1);
        swap(&s[i], &s[n]);
    }
}



int main(void)
{
    int a, b;
    scanf("%d %d", a, b);
    print_int(a-b+1);
    
    
    return 0;
}



Compiler output:
main.c: In function 'sort':
main.c:28:17: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
   28 |                 swap(&a[j], &a[j-h]);
      |                 ^~~~
Language: C

int main(void)
{
    int a, b;
    scanf("%d %d", a, b);
    print_int(a-b+1);
    
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |     scanf("%d %d", a, b);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:4:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |     scanf("%d %d", a, b);
      |     ^~~~~
main.c:4:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:5: error: implicit declaration of function 'print_int' [-Wimplicit-function-declaration]
    5 |     print_int(a-b+1);
      |     ^~~~~~~~~
Language: C++

using namespace std;
#define MIN(a, b) ((a) <= (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
void search(int n,int m,char**field){
	
}
int main(){
	int n,m,ans;
	ans = 0;
	//string ans="No";
	cin >> n >> m;
	ans = n - m + 1;
	cout << ans << endl;
	//cout << maxt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> n >> m;
      |         ^~~
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:13:9: error: 'cout' was not declared in this scope
   13 |         cout << ans << endl;
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:24: error: 'endl' was not declared in this scope
   13 |         cout << ans << 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;
Language: C++

using namespace std;
#define MIN(a, b) ((a) <= (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))

int main(){
	int n,m,ans;
	ans = 0;
	//string ans="No";
	cin >>n >> m;
	ans = n - m + 1;
	cout << ans << endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin >>n >> m;
      |         ^~~
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:11:9: error: 'cout' was not declared in this scope
   11 |         cout << ans << endl;
      |         ^~~~
a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:24: error: 'endl' was not declared in this scope
   11 |         cout << ans << 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;
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <vector>

using namespace std;
vector<int> find_all(const string str, const string subStr) {
   　vector<int> result;
 
    int subStrSize = subStr.size();
    int pos = str.find(subStr);
 
    while (pos != string::npos) {
        result.push_back(pos);
        pos = str.find(subStr, pos + subStrSize);
    }
 
    return result;
}
typedef long long unsigned int ll;
#define REP(i,n) for(int i=0;i<n;i++)

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {
    ll n,ans=0;
    ll a=0,b=0;
  int ab=0;
    scanf("%lld", &n);
    string s;
    REP(i,n){
        cin >> s;
       ans += find_all(str, subStr).size();
      if(s[1]== 'A'){
      a +=1;
}
if(s[s[i].length] == 'B'){
b+=1;
    }
      if(s[1]== 'A'&&s[s[i].length] == 'B'){
      ab =1;
      }
    }
      if(ab==1&&a==1&&b==1){}
  else{
ans+= min(a,b);}
    printf( "%lld\n", ans);
    return 0;
}

Compiler output:
a.cc:11:4: error: extended character 　 is not valid in an identifier
   11 |    　vector<int> result;
      |    ^
a.cc: In function 'std::vector<int> find_all(std::string, std::string)':
a.cc:11:4: error: '\U00003000vector' was not declared in this scope
   11 |    　vector<int> result;
      |    ^~~~~~~~
a.cc:11:13: error: expected primary-expression before 'int'
   11 |    　vector<int> result;
      |             ^~~
a.cc:17:9: error: 'result' was not declared in this scope
   17 |         result.push_back(pos);
      |         ^~~~~~
a.cc:21:12: error: 'result' was not declared in this scope
   21 |     return result;
      |            ^~~~~~
a.cc: In function 'int main()':
a.cc:38:24: error: 'str' was not declared in this scope; did you mean 'std'?
   38 |        ans += find_all(str, subStr).size();
      |                        ^~~
      |                        std
a.cc:38:29: error: 'subStr' was not declared in this scope
   38 |        ans += find_all(str, subStr).size();
      |                             ^~~~~~
a.cc:42:11: error: request for member 'length' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   42 | if(s[s[i].length] == 'B'){
      |           ^~~~~~
a.cc:45:29: error: request for member 'length' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   45 |       if(s[1]== 'A'&&s[s[i].length] == 'B'){
      |                             ^~~~~~
Language: C++

using namespace std;
#define MIN(a, b) ((a) <= (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
void search(int n,int m,char**field){
	
}
int main(){
	int n,k,ans;
	//string ans="No";
	cin >> n >> k;
	ans = n - k + 1;
	cout << ans << endl;
	//cout << maxt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         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:12:9: error: 'cout' was not declared in this scope
   12 |         cout << ans << endl;
      |         ^~~~
a.cc:12:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:24: error: 'endl' was not declared in this scope
   12 |         cout << ans << 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;
Language: C++

#include <iosteram>
using namespace std;

int main() {
  int x, y;
  cin >> x >> y;
  cout << x - y + 1 << endl;
  return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected ';' before 'N'
    5 |   cin N,K;
      |      ^~
      |      ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <algorithm>
int main() {
  long N,i;
  double M;
  long sum;
  cin>>N;
  sum=0;
  M=N^(0.5);
  for(i=1;i<M;i++){
if(N%i==0){

sum=sum+(N/i-1)
}
    
  }
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: invalid operands of types 'long int' and 'double' to binary 'operator^'
   14 |   M=N^(0.5);
      |     ~^~~~~~
      |     |  |
      |     |  double
      |     long int
a.cc:18:16: error: expected ';' before '}' token
   18 | sum=sum+(N/i-1)
      |                ^
      |                ;
   19 | }
      | ~
Language: C++

#include<iostream>
using namespace std;

int N, K;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: statement cannot resolve address of overloaded function
    8 |     cout << N-K+1; endl;
      |                        ^
Language: C++

# include <iostream>
using namespace std;

int main() {
    int n, k; cin >> n >> k;
    cout << n - k + 1 << endkl
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:26: error: 'endkl' was not declared in this scope
    6 |     cout << n - k + 1 << endkl
      |                          ^~~~~
Language: C++

#include <string>
#include <iostream>

using namespace std;

int main() {
	int N , a = 0, b = 0,length,counter = 0;
	string s;
	cin >> N;
	for (int i = 0; i < N ; i++) {
		cin >> s;
		length = s.size();
		if (s[0] == 'B')b++;
		if (s[length - 1] == 'A')a++;
		for (int L = 0; L < length - 1; L++) {
			if (s[L] == 'A'&& s[L + 1]=='B')counter++;
		}
	}
	if (a = b) {
		counter += a-1;
	}
	if (a > b) {
		counter += b;
	}
	if (a < b) {
		counter += a
	}
	cout << counter << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:29: error: expected ';' before '}' token
   26 |                 counter += a
      |                             ^
      |                             ;
   27 |         }
      |         ~
Language: C

#include<stdio.h>
int main(void){
int n,k;
scanf(“%d%d”,&n,&k);
printf(“%d”,n-k+1);
return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:4:7: error: stray '\342' in program
    4 | scanf(<U+201C>%d%d<U+201D>,&n,&k);
      |       ^~~~~~~~
main.c:4:8: error: expected expression before '%' token
    4 | scanf(“%d%d”,&n,&k);
      |        ^
main.c:4:12: error: stray '\342' in program
    4 | scanf(<U+201C>%d%d<U+201D>,&n,&k);
      |                   ^~~~~~~~
main.c:5:8: error: stray '\342' in program
    5 | printf(<U+201C>%d<U+201D>,n-k+1);
      |        ^~~~~~~~
main.c:5:9: error: expected expression before '%' token
    5 | printf(“%d”,n-k+1);
      |         ^
main.c:5:11: error: stray '\342' in program
    5 | printf(<U+201C>%d<U+201D>,n-k+1);
      |                  ^~~~~~~~
Language: C

using System;
using System.Linq;//リストの使用
using System.Collections.Generic;
using System.Text;//テキストの高速出力に必要
class Program
{
	static void Main()
	{
		string[] input = Console.ReadLine().Split(' ');
		int n = int.Parse(input[0]);
		int k = int.Parse(input[1]);
		
		int count = 0;
		
		if(n != 0 && k != 0){
			count = n-k+1;
		}
	
		Console.WriteLine(count);
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using System;
      | ^~~~~
main.c:2:1: error: unknown type name 'using'
    2 | using System.Linq;//リストの使用
      | ^~~~~
main.c:2:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | using System.Linq;//リストの使用
      |             ^
main.c:3:1: error: unknown type name 'using'
    3 | using System.Collections.Generic;
      | ^~~~~
main.c:3:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | using System.Collections.Generic;
      |             ^
main.c:4:1: error: unknown type name 'using'
    4 | using System.Text;//テキストの高速出力に必要
      | ^~~~~
main.c:4:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | using System.Text;//テキストの高速出力に必要
      |             ^
main.c:5:1: error: unknown type name 'class'
    5 | class Program
      | ^~~~~
main.c:6:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    6 | {
      | ^
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Main start=new Main();
        start.start();
 
    }
    public Main(){
    }
    public void start(){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int N = sc.nextInt();
        int K=sc.nextInt();
        System.out.println(N-K+1);
      return;
 
//        char[][] s=new char[N][];
        int bCount=0;
        int aCount=0;
        int result=0;
        int a=0;
        for(int i=0;i<N;i++){
            char[] t=sc.next().toCharArray();
            for(int j=0;j<t.length-1;j++){
                if(t[j]=='A'&&t[j+1]=='B'){
                    result++;
                }
            }
            if(t[0]=='B'){
                bCount++;
            }
            if(t[t.length-1]=='A'){
                aCount++;
            }
            if(t[0]=='B'||t[t.length-1]=='A'){
                a++;
            }
 
        }
        System.out.println(result+Math.min(a-1,Math.min(aCount,bCount)));
 
    }
    int gcd (int a, int b) {
        int temp;
        while((temp = a%b)!=0) {
            a = b;
            b = temp;
        }
        return b;
    }
}

Compiler output:
Main.java:19: error: unreachable statement
        int bCount=0;
            ^
1 error
Language: C++

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

void main() {

	int n;	//配列数

	int l, i = 0, a[2];
	while (std::cin >> l)
	{
		a[i] = l;
		i++;
		if (i >= 2) {
			break;
		}
	}

	int com=0;
	//com = kai(a[0]) /( kai(a[1]) * kai(a[0] - a[1]));
	com = a[0] - a[1] + 1;
	printf("%d\n",com);
}

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

#include<stdio.h>
int main(void){
int n,k;
scanf(“%d%d”,&n,&k);
printf(“%d”,n-k+1);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:7: error: stray '\342' in program
    4 | scanf(<U+201C>%d%d<U+201D>,&n,&k);
      |       ^~~~~~~~
main.c:4:8: error: expected expression before '%' token
    4 | scanf(“%d%d”,&n,&k);
      |        ^
main.c:4:12: error: stray '\342' in program
    4 | scanf(<U+201C>%d%d<U+201D>,&n,&k);
      |                   ^~~~~~~~
main.c:5:8: error: stray '\342' in program
    5 | printf(<U+201C>%d<U+201D>,n-k+1);
      |        ^~~~~~~~
main.c:5:9: error: expected expression before '%' token
    5 | printf(“%d”,n-k+1);
      |         ^
main.c:5:11: error: stray '\342' in program
    5 | printf(<U+201C>%d<U+201D>,n-k+1);
      |                  ^~~~~~~~
Language: C

#include <stdio.h>

int main(){

int N,K;
scanf("%d %d,&H,&K);

printf("%d\n, H- k +1);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:7: warning: missing terminating " character
    6 | scanf("%d %d,&H,&K);
      |       ^
main.c:6:7: error: missing terminating " character
    6 | scanf("%d %d,&H,&K);
      |       ^~~~~~~~~~~~~~
main.c:8:8: warning: missing terminating " character
    8 | printf("%d\n, H- k +1);
      |        ^
main.c:8:8: error: missing terminating " character
    8 | printf("%d\n, H- k +1);
      |        ^~~~~~~~~~~~~~~~
main.c:10:1: error: expected expression before 'return'
   10 | return 0;
      | ^~~~~~
main.c:10:10: error: expected ')' before '}' token
   10 | return 0;
      |          ^
      |          )
   11 | }
      | ~         
main.c:6:6: note: to match this '('
    6 | scanf("%d %d,&H,&K);
      |      ^
main.c:10:10: error: expected ';' before '}' token
   10 | return 0;
      |          ^
      |          ;
   11 | }
      | ~
Language: Java

public class ProA {
    public static void main(String[] args) {
        int n,k,result;
        n = Integer.parseInt(args[0]);
        k = Integer.parseInt(args[1]);      
        result = n - k + 1;
        System.out.println(result);
    }
}


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

public static void main(String[] args) {
        int n,k,result;
        n = Integer.parseInt(args[0]);
        k = Integer.parseInt(args[1]);      
        result = n - k + 1;
        System.out.println(result);
    }


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