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

#include<bits/stdc++.h>
using namespace std;
int main() {
	int A, B, K;
	cin >> A >> B >> K;
	int n = B - A + 1;
	set<int> a;

	


	for (int i = A; i <= min(B,A + K -1); i++)
	{		
		a.insert(i);
		
	}
	for (int i = B; i  >= max(A, B - K + 1) ; i--)
	{
		a.insert(i);

	}

	for each (int ans in a)
	{
		cout << ans << endl;

	}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: expected '(' before 'each'
   23 |         for each (int ans in a)
      |             ^~~~
      |             (
a.cc:23:19: error: expected primary-expression before 'int'
   23 |         for each (int ans in a)
      |                   ^~~
a.cc:23:13: error: 'each' was not declared in this scope
   23 |         for each (int ans in a)
      |             ^~~~
a.cc:30:1: error: expected primary-expression before '}' token
   30 | }
      | ^
a.cc:27:10: error: expected ';' before '}' token
   27 |         }
      |          ^
      |          ;
......
   30 | }
      | ~         
a.cc:30:1: error: expected primary-expression before '}' token
   30 | }
      | ^
a.cc:27:10: error: expected ')' before '}' token
   27 |         }
      |          ^
      |          )
......
   30 | }
      | ~         
a.cc:23:13: note: to match this '('
   23 |         for each (int ans in a)
      |             ^~~~
a.cc:30:1: error: expected primary-expression before '}' token
   30 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
  int a,b,k;
  cin>>a>>b>>k;
  if((b-a+1)<=2k){
    int sum=a;
    rep(i,b-a+1){
  cout <<sum<<endl;
    sum++;}
  }
  
  else{
    for(int tmp=0;tmp<k;tmp++)
      cout<<a+tmp<<endl;
     for(int tmp=b-k+1;tmp<b+1;tmp++)
      cout<<tmp<<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: fixed-point types not supported in C++
   15 |   if((b-a+1)<=2k){
      |               ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
  int a,b,k;
  cin>>a>>b>>k;
  if(b-a+1<=2k){
    int sum=a;
    rep(i,b-a+1){
  cout <<sum<<endl;
    sum++;}
  }
  
  else{
    for(int tmp=0;tmp<k;tmp++)
      cout<<a+tmp<<endl;
     for(int tmp=b-k+1;tmp<b+1;tmp++)
      cout<<tmp<<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: fixed-point types not supported in C++
   15 |   if(b-a+1<=2k){
      |             ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
int main(){
  int a,b,k;
  cin>>a>>b>>k;
  if((b-a+1<=2k){
    int sum=a;
    rep(i,b-a+1){
  cout <<sum<<endl;
    sum++;}
  }
  
  else{
    for(int tmp=0;tmp<k;tmp++)
      cout<<a+tmp<<endl;
     for(int tmp=b-k+1;tmp<b+1;tmp++)
      cout<<tmp<<endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: fixed-point types not supported in C++
   15 |   if((b-a+1<=2k){
      |              ^~
a.cc:15:17: error: expected ')' before '{' token
   15 |   if((b-a+1<=2k){
      |     ~           ^
      |                 )
a.cc:28:1: error: expected primary-expression before '}' token
   28 | }
      | ^
Language: C++

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

int main() {
	int A, B, K;
	cin >> A >> B >> K;
	int n = B - A + 1;
	set<int> a;

	


	for (int i = A; i <= min(B,A + K -1); i++)
	{		
		a.insert(i);
		
	}
	for (int i = B; i  >= max(A, B - K + 1) ; i--)
	{
		a.insert(i);

	}

	for each (int ans in a)
	{
		cout << ans << endl;

	}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:13: error: expected '(' before 'each'
   24 |         for each (int ans in a)
      |             ^~~~
      |             (
a.cc:24:19: error: expected primary-expression before 'int'
   24 |         for each (int ans in a)
      |                   ^~~
a.cc:24:13: error: 'each' was not declared in this scope
   24 |         for each (int ans in a)
      |             ^~~~
a.cc:31:1: error: expected primary-expression before '}' token
   31 | }
      | ^
a.cc:28:10: error: expected ';' before '}' token
   28 |         }
      |          ^
      |          ;
......
   31 | }
      | ~         
a.cc:31:1: error: expected primary-expression before '}' token
   31 | }
      | ^
a.cc:28:10: error: expected ')' before '}' token
   28 |         }
      |          ^
      |          )
......
   31 | }
      | ~         
a.cc:24:13: note: to match this '('
   24 |         for each (int ans in a)
      |             ^~~~
a.cc:31:1: error: expected primary-expression before '}' token
   31 | }
      | ^
Language: C++

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

int main() {
	int A, B, K;
	cin >> A >> B >> K;
	int n = B - A + 1;
	int ar = A;
	vector<int> ary(n);
	set<int> a;

	
	for (int i = 0; i < n; i++)
	{

		ary[i] = ar;
		ar++;
	}


	for (int i = 0; i < K; i++)
	{
		if (i > ary.size()-1) break;
		a.insert(ary[i]);
		
	}
	for (int i = ary.size() - 1; i >= ary.size() - K; i--)
	{
		a.insert(ary[i]);

	}

	for each (int ans in a)
	{
		cout << ans << endl;

	}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:13: error: expected '(' before 'each'
   33 |         for each (int ans in a)
      |             ^~~~
      |             (
a.cc:33:19: error: expected primary-expression before 'int'
   33 |         for each (int ans in a)
      |                   ^~~
a.cc:33:13: error: 'each' was not declared in this scope
   33 |         for each (int ans in a)
      |             ^~~~
a.cc:40:1: error: expected primary-expression before '}' token
   40 | }
      | ^
a.cc:37:10: error: expected ';' before '}' token
   37 |         }
      |          ^
      |          ;
......
   40 | }
      | ~         
a.cc:40:1: error: expected primary-expression before '}' token
   40 | }
      | ^
a.cc:37:10: error: expected ')' before '}' token
   37 |         }
      |          ^
      |          )
......
   40 | }
      | ~         
a.cc:33:13: note: to match this '('
   33 |         for each (int ans in a)
      |             ^~~~
a.cc:40:1: error: expected primary-expression before '}' token
   40 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define fi first
#define se second
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define sort(a) sort((a).begin(),(a).end())
#define rev(a) reverse((a).begin(),(a).end())
using db = double;
using namespace std;
typedef long long ll;


int main() {
  int a, b, k;
  cin >> a >> b >> k;
  if (k > ceil((b - a + 1) / double(2)) {
    for (int i = a; i <= b; i++) cout << i << endl;
  }
  else {
    for (int i = a; i <= a + k - 1; i++) {
      cout << i << endl;
    }
    for (int i = b - k + 1; i <= b; i++) {
      cout << i << endl;
    }    
  }
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:40: error: expected ')' before '{' token
   16 |   if (k > ceil((b - a + 1) / double(2)) {
      |      ~                                 ^~
      |                                        )
a.cc:27:1: error: expected primary-expression before '}' token
   27 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int A, B, K;
  cin >> A >> B >> K;
  for(int i = A; i < min(B, A + K - 1); i++){
    cout << i << endl;
  }
  for(int i = max(B - K + 1, A + K); i++){
    cout << i << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:41: error: expected ';' before ')' token
    9 |   for(int i = max(B - K + 1, A + K); i++){
      |                                         ^
      |                                         ;
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
  long long int A, B, K;
  cin >> A >> B >> K;
  if(B - A + 1 > 2K){
    for(long long int i = A; i <= A + K - 1; i++) cout << i << " ";
    for(long long int i = B - K + 1; i <= B; i++) cout << i << " ";
  }else{
    for(long long int i = A; i <= B; i++) cout << i << " ";  
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: fixed-point types not supported in C++
    9 |   if(B - A + 1 > 2K){
      |                  ^~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
  <long long int> A, B, K;
  cin >> A >> B >> K;
  if(B - A + 1 > 2K){
    for(long long int i = A; i <= A + K - 1; i++) cout << i << " ";
    for(long long int i = B - K + 1; i <= B; i++) cout << i << " ";
  }else{
    for(long long int i = A; i <= B; i++) cout << i << " ";  
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected primary-expression before '<' token
    7 |   <long long int> A, B, K;
      |   ^
a.cc:7:4: error: expected primary-expression before 'long'
    7 |   <long long int> A, B, K;
      |    ^~~~
a.cc:8:10: error: 'A' was not declared in this scope
    8 |   cin >> A >> B >> K;
      |          ^
a.cc:8:15: error: 'B' was not declared in this scope
    8 |   cin >> A >> B >> K;
      |               ^
a.cc:8:20: error: 'K' was not declared in this scope
    8 |   cin >> A >> B >> K;
      |                    ^
a.cc:9:18: error: fixed-point types not supported in C++
    9 |   if(B - A + 1 > 2K){
      |                  ^~
Language: Java

import java.util.*;
/*
public class BSLI{
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int A,B,K;
    Set<Integer> set = new TreeSet<Integer>();
    A = s.nextInt();
    B = s.nextInt();
    K = s.nextInt();
    for(int i = A; i < A + K && i <= B ; i++){
      set.add(i);
    }

    for(int i = B; i > B - K && i >= A ; i--){
      set.add(i);
    }

    for (Iterator<Integer> itr = set.iterator(); itr.hasNext();) {
      System.out.println(itr.next());
    }

  }
}
*/
public class BSLI{
  public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    int A,B,K;
    Set<Integer> set = new TreeSet<Integer>();
    A = s.nextInt();
    B = s.nextInt();
    K = s.nextInt();
    if(A + K >= B - K){
      for(int i = A; i <= B ; i++){
        System.out.println(i);
      }
    }
    else{
      for(int i = A; i < A + K && i <= B ; i++){
        System.out.println(i);
      }
      int start;
      if(B - K < A)start = A;
      else start = B - K + 1;
      for(int i = start; i <= B && i >= A ; i++){
        System.out.println(i);
      }
    }
  }
}


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


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

int main(){
  int A,B,K;
  cin>>A>>B>>K;
  
  if(B-A>2(K-1)){
  
  for(int i=0;i<K;i++){
    cout<<A+i<<endl;
  }
  for(int i=K-1;i>=0;i--){
    cout<<B-i<<endl;
  }
  }
  else{
    for(int i=A;i<=B;i++){
      cout<<i<<endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expression cannot be used as a function
    9 |   if(B-A>2(K-1)){
      |          ~^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)

int main(){
    int A, B, K;
    cin >> A >> B >> K;
    if(B-A+1 >= 2*K){
        for(int i = 0; i < K; i++){
            cout<<A+i<<endl;
        }
        for(int i = K-1; i >= 0; i--;){
            cout<<B-i<<endl;
        }
    }else{
        for(int i = A; i <= B; i++){
            cout<<i<<endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:37: error: expected ')' before ';' token
   12 |         for(int i = K-1; i >= 0; i--;){
      |            ~                        ^
      |                                     )
a.cc:12:38: error: expected primary-expression before ')' token
   12 |         for(int i = K-1; i >= 0; i--;){
      |                                      ^
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <tuple>
#include <stack>

#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define print(s) cout << s << endl
typedef long long ll;
using namespace std;

int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}

int main() {
	int a,b,k; cin >> a >> b >> k;
	for(int i = a; i < k, i++){
		cout << i;
	}
	for (int i = k; k <= b; k++){
		cout << k;
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:34: error: expected ';' before ')' token
   26 |         for(int i = a; i < k, i++){
      |                                  ^
      |                                  ;
Language: C++

a, b, k= map(int, input().split())
for i in range(a, b+1):
    if i < a+k or b-i+1 <= k:
        print(i)    


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

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


Compiler output:
main.c: In function 'main':
main.c:4:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    4 |   int i,j;
      |   ^~~
main.c:5:27: error: 'k' undeclared (first use in this function)
    5 |   scanf("%d %d %d",&a,&b,&k);
      |                           ^
main.c:5:27: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:7: error: 'i' undeclared (first use in this function)
    6 |   for(i=0;i<k;i++)
      |       ^
main.c:8:7: error: 'j' undeclared (first use in this function)
    8 |   for(j=0;j<k;j++)
      |       ^
Language: C++

#include<stdio.h>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
int a,b,k;
scanf (”%d%d%d ” , &a , &b , &k ) ;
for (int i = a; i <= min(b,a+k−1) ; i++) printf (”%d\n”,i);
for (int i = max(b−k+1,a+k) ; i<=b; i++) printf(”%d\n”,i);
}

Compiler output:
a.cc:8:8: error: extended character ” is not valid in an identifier
    8 | scanf (”%d%d%d ” , &a , &b , &k ) ;
      |        ^
a.cc:8:16: error: extended character ” is not valid in an identifier
    8 | scanf (”%d%d%d ” , &a , &b , &k ) ;
      |                ^
a.cc:9:30: error: extended character − is not valid in an identifier
    9 | for (int i = a; i <= min(b,a+k−1) ; i++) printf (”%d\n”,i);
      |                              ^
a.cc:9:50: error: extended character ” is not valid in an identifier
    9 | for (int i = a; i <= min(b,a+k−1) ; i++) printf (”%d\n”,i);
      |                                                  ^
a.cc:9:53: error: stray '\' in program
    9 | for (int i = a; i <= min(b,a+k−1) ; i++) printf (”%d\n”,i);
      |                                                     ^
a.cc:9:54: error: extended character ” is not valid in an identifier
    9 | for (int i = a; i <= min(b,a+k−1) ; i++) printf (”%d\n”,i);
      |                                                      ^
a.cc:10:18: error: extended character − is not valid in an identifier
   10 | for (int i = max(b−k+1,a+k) ; i<=b; i++) printf(”%d\n”,i);
      |                  ^
a.cc:10:49: error: extended character ” is not valid in an identifier
   10 | for (int i = max(b−k+1,a+k) ; i<=b; i++) printf(”%d\n”,i);
      |                                                 ^
a.cc:10:52: error: stray '\' in program
   10 | for (int i = max(b−k+1,a+k) ; i<=b; i++) printf(”%d\n”,i);
      |                                                    ^
a.cc:10:53: error: extended character ” is not valid in an identifier
   10 | for (int i = max(b−k+1,a+k) ; i<=b; i++) printf(”%d\n”,i);
      |                                                     ^
a.cc: In function 'int main()':
a.cc:8:8: error: '\U0000201d' was not declared in this scope
    8 | scanf (”%d%d%d ” , &a , &b , &k ) ;
      |        ^
a.cc:8:10: error: 'd' was not declared in this scope
    8 | scanf (”%d%d%d ” , &a , &b , &k ) ;
      |          ^
a.cc:9:30: error: 'k\U000022121' was not declared in this scope
    9 | for (int i = a; i <= min(b,a+k−1) ; i++) printf (”%d\n”,i);
      |                              ^~~
a.cc:10:18: error: 'b\U00002212k' was not declared in this scope
   10 | for (int i = max(b−k+1,a+k) ; i<=b; i++) printf(”%d\n”,i);
      |                  ^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;

// 数字の各桁の和を返す
int sumDigits (int n) {
    int s;
    while (n < 0) {
        s += n % 10;
        n /= 10;
    }
    return s;
}

// 最大公約数を返す
int gcd (int x, int y) {
  if (y == 0) return x;
  return gcd(y, x%y);
}

int main () {
  int A, B, K; cin >> A >> B >> K;
  vector<int> a(B-A+1);
  
  for (int i = A; i < = B; i++) a[i-A] = i;
  
  if (a.size() > K*2) {
    for (int i = A; A <= B; i++) cout << i << endl;
  } else {
    for (int i = 0; i < K; i++) cout << a[i] << endl;
    for (int i = a.size()-K; i < a.size(); i++) cout << i << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: expected primary-expression before '=' token
   25 |   for (int i = A; i < = B; i++) a[i-A] = i;
      |                       ^
Language: C++

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

int main() {
	int A,B,K;
  	cin >> A >> B >> K;
  
  	if(B - A <= K) {
        for(int i = 0; i < B - A + 1; i++) {
        cout << A + i << endl;
        }else {

        for(int i = 0; i < K; i++) {
            cout << A + i << endl;
        }

        for(int i = K - 1; i > 0; i--) {
            cout << B - i << endl;
        }
      }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected '}' before 'else'
   11 |         }else {
      |          ^~~~
a.cc:8:24: note: to match this '{'
    8 |         if(B - A <= K) {
      |                        ^
a.cc: At global scope:
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n-1;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define INF 999999

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll a, b, k;
	cin >> a >> b >> k;
	if (a+k>b || b-a+1<2*k){
		REP(i, b-a+1){
			cout << a+i << endl; return  0;
		}
	}
	REP(i, k){
		cout << a+i << endl;
	}
	REPR(i, k){
		cout << b-i << endl;
	}
	}
}

Compiler output:
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	ll a,b;
  	int k,i;
  	cin>>a>>b>>k;
  
  	if(b-a+1>2k){
  	for(i=0;i<k;i++){
		cout<<a+i<<endl;
    }
  	
  	for(i=0;i<k;i++){
		cout<<b-k+i+1<<endl;
    }
    }else{
      for(i=a;i<=b;i++){
		cout<<i<<endl;
      }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: fixed-point types not supported in C++
    9 |         if(b-a+1>2k){
      |                  ^~
Language: Java

package spring2;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int k = sc.nextInt();
		int x = b-a+1;
		for(int i = 0; i < k; i++) {
			if(k > x) {
				for(int j = 0; j <= b-a; j++) {
					System.out.println(a+j);
				}
				break;
			}
			System.out.println(a+i);
		}
		for(int i = k - 1; i >= 0; i-=1) {
			if(a+k-1 < b - i) {
				System.out.println(b-i);
			}
		}
		sc.close();
	}

}

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

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

int main() {
  int A,B,K;
  cin >> A >> B >> K;
  if(B-A+1>=2*K) {
    for(int i=A; i<A+K; i++) {
      cout << i << endl;
    }
    for(int i=B; i>B-K; i--) {
      cout << i << endl;
    }
  }
  else {
    for(int i=A; i<=B; i++) {
      cout << i << endl;
    }
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int A,B,K; cin >> A >> B >> K;
    for(int i = A; i <= min(A + K - 1,B))
    {
        cout << i << endl;
    }
    for(int i = max(B - K + 1, A + K); i <= B; i++)
    {
        cout << i << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:41: error: expected ';' before ')' token
    6 |     for(int i = A; i <= min(A + K - 1,B))
      |                                         ^
      |                                         ;
Language: C++

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

int main() {
  long long a, b; cin >> a >> b;
  int k; cin >> k;

  for (long long i = a; i < min(a + k, a + (b - a) / 2; i++) cout << i << endl;
  for (long long i = b - k + 1; i <= b; i++) cout << i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:55: error: expected ')' before ';' token
    8 |   for (long long i = a; i < min(a + k, a + (b - a) / 2; i++) cout << i << endl;
      |                                ~                      ^
      |                                                       )
Language: C

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

int main(int argc, char const *argv[])
{
	scanf("%d%d%d",&a,&b,&k);
	for (int i = a; i < a + k; ++i){
		printf("%d\n",i);
	}
	for (int i = b - k + 1; i <= b; ++i)
	{
		printf("%d\n", i);
	}
}


Compiler output:
main.c: In function 'main':
main.c:9:25: error: 'a' undeclared (first use in this function)
    9 |         scanf("%d%d%d",&a,&b,&k);
      |                         ^
main.c:9:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:28: error: 'b' undeclared (first use in this function)
    9 |         scanf("%d%d%d",&a,&b,&k);
      |                            ^
main.c:9:31: error: 'k' undeclared (first use in this function)
    9 |         scanf("%d%d%d",&a,&b,&k);
      |                               ^
Language: C++

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

using namespace std;
#define ll long long

int main(){
    ll A,B,K;
    int a;
    cin >> A >> B >> K;
    for(int i = A; i < A + K; i++){
        cout<< i << endl;
        if(i == B)return 0;
    }
    int m = max(A + K - i, B - K + 1);
    for(int i = m; i <= B; i++){
        cout<< i << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: 'i' was not declared in this scope
   19 |     int m = max(A + K - i, B - K + 1);
      |                         ^
Language: C++

#ifdef __APPLE__
  #include "/Users/shizuku/Dropbox/dev/cpp/base_cmake_project_external/frankchen0130/bits/stdc++.h"
#elif
  #include "bits/stdc++.h"
#endif
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }

int A, B, K;
set<int> st;

void _main() {
  cin >> A >> B >> K;

  rep(i, A, A+K) {
    if (i > B) break;
    st.insert(i);
  }
  rrep(i, B, B-K+1) {
    if (i < A) break;
    st.insert(i);
  }

  for (const auto& x : st) {
    cout << x << "\n";
  }
}

Compiler output:
a.cc:3:6: error: #elif with no expression
    3 | #elif
      |      ^
a.cc: In function 'int main()':
a.cc:11:49: error: 'cin' was not declared in this scope
   11 | using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
      |                                                 ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #ifdef __APPLE__
a.cc:11:61: error: 'ios' has not been declared
   11 | using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
      |                                                             ^~~
a.cc: At global scope:
a.cc:12:39: error: 'INT_MAX' was not declared in this scope
   12 | typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
      |                                       ^~~~~~~
a.cc:1:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
  +++ |+#include <climits>
    1 | #ifdef __APPLE__
a.cc:17:1: error: 'set' does not name a type
   17 | set<int> st;
      | ^~~
a.cc: In function 'void _main()':
a.cc:20:3: error: 'cin' was not declared in this scope
   20 |   cin >> A >> B >> K;
      |   ^~~
a.cc:20:3: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:5: error: 'st' was not declared in this scope; did you mean 'std'?
   24 |     st.insert(i);
      |     ^~
      |     std
a.cc:28:5: error: 'st' was not declared in this scope; did you mean 'std'?
   28 |     st.insert(i);
      |     ^~
      |     std
a.cc:31:24: error: 'st' was not declared in this scope; did you mean 'std'?
   31 |   for (const auto& x : st) {
      |                        ^~
      |                        std
a.cc:32:5: error: 'cout' was not declared in this scope
   32 |     cout << x << "\n";
      |     ^~~~
a.cc:32:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

int main(){
  int x, y;
  int n;
  vector<int> v;
  cin >> x >> y >> n;
  
  for(int i = x; i <= x+n; i++){
    v.append(i);
  }
  
  for(int j = y; y >= y-n; j--){
    v.append(j);
  }
  
  v.erase(unique(v.begin(), v.end()), v.end());
  
  for(int i = 0; i < v.size(); i++){
    cout << v[i] << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'class std::vector<int>' has no member named 'append'
   13 |     v.append(i);
      |       ^~~~~~
a.cc:17:7: error: 'class std::vector<int>' has no member named 'append'
   17 |     v.append(j);
      |       ^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<bits/stdc++.h>
#include<vector>
 
using namespace std;
 

int main(){
  int A,B,K;
  cin >> A >> B >> K;
  for(int i=A; i<=min(A+K-1,B); i++){
    cout << i << endl;
  }for(int i=max(B-K+1,A+K);,i<=B; i++){
    cout << i << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: expected primary-expression before ',' token
   15 |   }for(int i=max(B-K+1,A+K);,i<=B; i++){
      |                             ^
Language: C++

int main(){
   int a,b,k;
   cin>>a>>b>>k;
   int n[1000000010]={0};
   for(int i=0;i<b-a+1;i++){
      n[i]=i+a;
   }
   for(int i=0;i<b-a+1;i++){
      if(i+1<=k || i+1>=k)cout<<n[i]<<endl;
   }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:4: error: 'cin' was not declared in this scope
    3 |    cin>>a>>b>>k;
      |    ^~~
a.cc:9:27: error: 'cout' was not declared in this scope
    9 |       if(i+1<=k || i+1>=k)cout<<n[i]<<endl;
      |                           ^~~~
a.cc:9:39: error: 'endl' was not declared in this scope
    9 |       if(i+1<=k || i+1>=k)cout<<n[i]<<endl;
      |                                       ^~~~
Language: C++

#include <iostream>
#include <cstring>
#include <set>
using namespace std;
int main()
{
    int l,r,n;
    set<int>s;
    set<int>::iterator ii;
    cin >> l >> r >> n;
//    for(int i=l;i<=r;i++)
//    {
        memset(vis,0,sizeof(vis));
        for(int j=0;j<n&&l+j<=r;j++)
        {
//            cout << l+j<< endl;
            s.insert(l+j);
        }
        for(int j=n-1;j>=0&&r-j>=l;j--)
        {
           s.insert(r-j);
        }

         for(ii=s.begin();ii!=s.end();ii++)
            cout<<(*ii)<<endl;
//    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'vis' was not declared in this scope
   13 |         memset(vis,0,sizeof(vis));
      |                ^~~
Language: C++

//file_name:ABC93_B.cpp
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
inline int in() { int x; scanf("%d",&x); return x;}
template<typename T>inline istream& operator>>(istream&i,v(T)&v)
{rep(j,sz(v))i>>v[j];return i;}
template<typename T>string join(const v(T)&v)
{stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename T>inline ostream& operator<<(ostream&o,const v(T)&v)
{if(sz(v))o<<join(v);return o;}
template<typename T1,typename T2>inline istream& operator>>(istream&i,pair<T1,T2>&v)
{return i>>v.fi>>v.se;}
template<typename T1,typename T2>inline ostream& operator<<(ostream&o,const pair<T1,T2>&v)
{return o<<v.fi<<","<<v.se;}
template<typename T>inline ll suma(const v(T)& a) { ll res(0); for (auto&& x : a) res += x; return res;}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame { puts("-1"); return 0;}
#define yn {puts("Yes");}else{puts("No");}
const int MX = 200005;

    // int scan
    /*
    int x;
    scanf("%d",&x);
    int y;
    scanf("%d",&y);
    int z;
    scanf("%d",&z);

    // matrix scan
    /*
    ll a[n] = {};
    rep(i,n){
        scanf("%lld",&a[i]);
    }
    */

    // string scan
    /*
    string s;
    cin >> s;
    */


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

    if(b-a<=2*c){
        for(int i=a;i<=b;++i){
            cout << i << endl;
        }
    }else{
        srep(i,a,a+c){
            cout<<i<<endl;
        }
        srep(i,b-k+1,b+1){
             cout<<i<<endl;
        }
    }


    ll ans = 0;

    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:95:18: error: 'k' was not declared in this scope
   95 |         srep(i,b-k+1,b+1){
      |                  ^
a.cc:8:34: note: in definition of macro 'srep'
    8 | #define srep(i,s,t) for (int i = s; i < t; ++i)
      |                                  ^
Language: C++

#include <iostream>
using namespace std;

using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
#include <string>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cmath>
#include <climits>
#include <bitset>
#include <array>
#include <deque>
#include <queue>
#include <map>
#define all(x) (x).begin(),(x).end()

void solve(){

}
int main(){
    int A,B,K;
    cin >> A >> B >> K;
    vector<int> ans;
    for (int i = A; i <= B; i++){
        if (i < A+K){
            ans.push_back(i);
        } else if (i > B-K){
            ans.push_back(i);
        }
    }
    for (int i = 0; i < (int)a.size(); i++){
        cout << ans[i] << endl;
    }


    return 0;
}


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

import java.util.Collections;
import java.util.HashSet;
import java.util.Scanner;
import java.util.StringJoiner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            new Main().solve(sc);
        }
    }

    void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int k = sc.nextInt();
        HashSet set = new HashSet<>(k * 2);
        for (int i = 0; i < k; i++) {
            if (a + i > b) {
                break;
            }
            set.add(a + i);
        }
        for (int i = 0; i < k; i++) {
            if (b - i < a) {
                break;
            }
            set.add(b - i);
        }
        List<Integer> list = new ArrayList(set);
        Collections.sort(list);
        for (Integer i : list) {
            System.out.println(i);
        }
    }
}

Compiler output:
Main.java:30: error: cannot find symbol
        List<Integer> list = new ArrayList(set);
        ^
  symbol:   class List
  location: class Main
Main.java:30: error: cannot find symbol
        List<Integer> list = new ArrayList(set);
                                 ^
  symbol:   class ArrayList
  location: class Main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String args[]){
	
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int K = sc.nextInt();
	
		for(int i = 0 ; i < K ; i++ ){
			if(A+K > B-K){
				K--;
			}else{
				break;
			}
		}
		
		if(A+K = B-K){
			for(int j = 0; j < B-A ; j++){
				System.out.println(A);
			}
		}else{
			for(int m = 0; m < K ; m++ ){
				System.out.println(A+m);
			}
			for(int n = K; n < K ; n-- ){
				System.out.println(B-K);
			}
		}
	}
}

Compiler output:
Main.java:19: error: unexpected type
		if(A+K = B-K){
		    ^
  required: variable
  found:    value
1 error
Language: C++

def main():
    a, b, k = map(int, input().split())
    
    for x in range(a, b+1):
        if x <= a+k-1 or b-k+1 <= x:
            print(x) 
    
if __name__ == "__main__":
    main()

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

#include<bits/stdc++.h>
#include<vector>
#include<set>
using namespace std;
int main(){
  int a, b, k; cin >> a >> b >> k;
  for(int i = a; i <= min(b, a+k-1; i++) cout << i;
  for(int i = max(b-k+1, a+k); i <= b; i++) cout << i;
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: expected ')' before ';' token
    7 |   for(int i = a; i <= min(b, a+k-1; i++) cout << i;
      |                          ~        ^
      |                                   )
Language: C++

#include<bits/stdc++.h>
#include<vector>
#include<set>
using namespace std;
int main(){
  int a, b, k; cin >> a >> b >> k;
  vector<int> c(0);
  for(int i = a; i < a+k; ++i){
    c.push_back(i);
  }
  for(int i = b-k+1; i <= b;++i){
    c.push_back(i);
  }
  sort(c.begin(), c.end());
  int d = c.size();
  set<int> va;
  for(int i = 0;i < d; ++i){
    va.insert(c[i]);
  }
  int e = va.size();
  vector<int> lu(0);
  for(int i = 0;i < e; ++i)
  lu.push_back(va);
  for(int i = 0; i < e; ++i) cout << lu[i] << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:23:15: error: no matching function for call to 'std::vector<int>::push_back(std::set<int>&)'
   23 |   lu.push_back(va);
      |   ~~~~~~~~~~~~^~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'std::set<int>' to 'const std::vector<int>::value_type&' {aka 'const int&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; value_type = int]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'std::set<int>' to 'std::vector<int>::value_type&&' {aka 'int&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
Language: C++

#include<bits/stdc++.h>
#include<vector>
#include<set>
using namespace std;
int main(){
  int a, b, k; cin >> a >> b >> k;
  vector<int> c(0);
  for(int i = a; i < a+k; ++i){
    c.push_back(i);
  }
  for(int i = b-k+1; i <= b;++i){
    c.push_back(i);
  }
  sort(c.begin(), c.end());
  int d = c.size();
  set<int> va;
  for(int i = 0;i < d; ++i){
    va.insert(c[i]);
  }
    
  }
  for(int i = 0; i < d; ++i) cout << va[i] << endl;
}




Compiler output:
a.cc:22:3: error: expected unqualified-id before 'for'
   22 |   for(int i = 0; i < d; ++i) cout << va[i] << endl;
      |   ^~~
a.cc:22:18: error: 'i' does not name a type
   22 |   for(int i = 0; i < d; ++i) cout << va[i] << endl;
      |                  ^
a.cc:22:25: error: expected unqualified-id before '++' token
   22 |   for(int i = 0; i < d; ++i) cout << va[i] << endl;
      |                         ^~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

#include<bits/stdc++.h>
#include<vector>
using namespace std;
int main(){
  int a, b, k; cin >> a >> b >> k;
  vector<int> c(0);
  for(int i = a; i < a+k; ++i){
    c.push_back(i);
  }
  for(int i = b-k+1; i < b;++i){
    c.push_back(i);
  }
  sort(c.begin(), c.end(), greater<int>);
  int d = c.size();
  for(int i = 0; i < d; ++i) cout << c[i] << endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:13:40: error: expected primary-expression before ')' token
   13 |   sort(c.begin(), c.end(), greater<int>);
      |                                        ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int a,b,k,z[1919114514],y[1919114514],i,j;
cin>>a>>b>>k;
for(i=a,j=0;i<=a+k;i++,j++){
z[j]=i;
}
for(int i=b,j=0;b-k<=i&&z[z.size()-1]<=i;i++,j++){
y[j]=i;
}
for(int o=0;o<z.size();o++){
cout<<z[o];
}
for(int o=0;o<y.size();o++){
cout<<y[o];
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: request for member 'size' in 'z', which is of non-class type 'int [1919114514]'
   11 | for(int i=b,j=0;b-k<=i&&z[z.size()-1]<=i;i++,j++){
      |                             ^~~~
a.cc:14:17: error: request for member 'size' in 'z', which is of non-class type 'int [1919114514]'
   14 | for(int o=0;o<z.size();o++){
      |                 ^~~~
a.cc:17:17: error: request for member 'size' in 'y', which is of non-class type 'int [1919114514]'
   17 | for(int o=0;o<y.size();o++){
      |                 ^~~~
Language: C++

A, B, K = map(int, input().split())
ans = list(set(range(A, min(B, A+K))) | set(range(max(A, B-K+1), B+1)))
ans.sort()
print(' '.join(map(str, ans)))


Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A, B, K = map(int, input().split())
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int a,b,k;
	cin>>a>>b>>k;
	
	if(b-a+1<=2k){
		for(int i=a;i<=b;i++) cout<<i<<endl;
	}else{
		for(int i=a;i<a+k;i++) cout<<i<<endl;
		for(int i=b-k+1;i<=b;i++) cout<<i<<endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: fixed-point types not supported in C++
    8 |         if(b-a+1<=2k){
      |                   ^~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int a, b, k; cin >> a >> b >> k;
    for (int i = 0; i <= k; i++) {
        cout << a + i << endl;
    }
    for (int i = ; i <= k; i++) {
        cout << b + i << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected primary-expression before ';' token
   11 |     for (int i = ; i <= k; i++) {
      |                  ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
	int A, B, K; cin >> A >>  >> K;
  	if((B-A+1)/2 < K){
    	for(int i = A; i <= B; ++i){
        	cout << i << endl;
        }
    }else{
    	for(int i = A; i < A+K; ++i){
        	cout << i << endl;
        }
      	for(int i = B-K+1; i <= B; ++i){
        	cout << i << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:35: error: expected primary-expression before '>>' token
    6 |         int A, B, K; cin >> A >>  >> K;
      |                                   ^~
Language: C++

a, b, k = map(int, input().split())
c = list(range(a, b+1))
if len(c) <= 2*k:
    for i in c:
        print(i)
else:
    for i in c[:k] + c[-k:]:
        print(i)

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: 'd' was not declared in this scope
    7 |     for(int i=a;i<min(a+c,d);i++) cout<<i<<endl;
      |                           ^
Language: Java


import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.*;

class Main{
  public static void main(String args[]){
    try{
      File file = new File("C:\Users\c0117054\Desktop\test.txt");
      Scanner s=new Scanner(System.in);

      if (checkBeforeWritefile(file)){
        FileWriter filewriter = new FileWriter(file);

        filewriter.write(s.nextInt());
        filewriter.write(s.nextInt());

        filewriter.close();
      }else{
        System.out.println("ファイルに書き込めません");
      }
    }catch(IOException e){
      System.out.println(e);
    }
  }

  private static boolean checkBeforeWritefile(File file){
    if (file.exists()){
      if (file.isFile() && file.canWrite()){
        return true;
      }
    }

    return false;
  }
}

Compiler output:
Main.java:10: error: illegal escape character
      File file = new File("C:\Users\c0117054\Desktop\test.txt");
                               ^
Main.java:10: error: illegal escape character
      File file = new File("C:\Users\c0117054\Desktop\test.txt");
                                     ^
Main.java:10: error: illegal escape character
      File file = new File("C:\Users\c0117054\Desktop\test.txt");
                                              ^
3 errors
Language: Java

import java.util.Scanner;

/**
 *
 * @author c0117054
 */
public class B93 {
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        int a=s.nextInt();
        int b=s.nextInt();
        int k=s.nextInt();
        
        for (int i = 0; i < k; i++) {
            System.out.println(a+i);
            
        }
        for (int i = 0; i <k; i++) {
            System.out.println(b-i);
        }
    }
}

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

#include<iostream>
using namespace std;
int main(){
  int a,b,k;cin>>a>>b>>k; 
  if((b-a+1)/2<=K)for(int i=a;i<=b;i++)cout<<i<<endl;
  else{for(int i=a;i<a+K;i++)cout<<i<<endl;for(int i=b-K+1;i<=b;i++)cout<<i<<endl;}
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'K' was not declared in this scope
    5 |   if((b-a+1)/2<=K)for(int i=a;i<=b;i++)cout<<i<<endl;
      |                 ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b,k;
    cin >>a >> b >> k;
    if(b-a < k){
        for(int i=a;i=<b;i++){
            cout << i << endl;
        }
        for(int i=0; i<k && i < b-a; i ++){
            cout << a + i << endl;
        }
    }else {
        for(int i=0; i<k; i ++){
            cout << a + i << endl;
        }
        for(int i=1; i<=k; i ++){
            cout << b - k + i << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected primary-expression before '<' token
    7 |         for(int i=a;i=<b;i++){
      |                       ^
Language: C++

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

int main(){
  int a,b,c,i;
  cin>>a>>b>>c;
  if(c*2>a+b+1){
    while(a!=b){
      cout<<a<<endl;
      a++;
    }
    }else{
      for(i=0;i<c;i++){
        cout<<a+i<<endl;
      }
      for(i=c;i>=0;i--){
        cout<<b-i<<endl;
      }
    }
}
}

Compiler output:
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

#include<iostream>  #include<algorithm> 
using namespace std;
 int main(){ 
int A,B,K,i,j=0; 
cin>>A>>B>>K; 
int a[200]={0}; 
for(i=A;i<A+K;i++){
 a[j]=i; j++; 
if(i==B)break; } 
for(i=B;i>B-K;i--){
 a[j]=i; j++; 
if(i==A)break; } 
sort(a,a+(2*K));
 for(i=0;i<2*K;i++){
 if((i!=0&&a[i]==a[i-1])||a[i]==0)continue; cout<<a[i]<<endl; }
 return 0; } 


Compiler output:
a.cc:1:21: warning: extra tokens at end of #include directive
    1 | #include<iostream>  #include<algorithm>
      |                     ^
a.cc: In function 'int main()':
a.cc:13:1: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 | sort(a,a+(2*K));
      | ^~~~
      | short
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
int A,B,K,i,j=0;
cin>>A>>B>>K;
int a[200]={0};
for(i=A;i<A+K;i++){
a[j]=i;
j++;
if(i==B)break;  
}
for(i=B;i>B-K;i--){
a[j]=i;
j++;
if(i==A)break;  
}
sort(a.begin(),a.end());
for(i=0;i<2*K;i++){
if(i!=0&&a[i]==a[i-1])continue;
cout<<a[i]<<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: request for member 'begin' in 'a', which is of non-class type 'int [200]'
   19 | sort(a.begin(),a.end());
      |        ^~~~~
a.cc:19:18: error: request for member 'end' in 'a', which is of non-class type 'int [200]'
   19 | sort(a.begin(),a.end());
      |                  ^~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
int A,B,K,i,j=0;
cin>>A>>B>>K;
vector<int>a(2*K)={0};
for(i=A;i<A+K;i++){
a[j]=i;
j++;
if(i==B)break;  
}
for(i=B;i>B-K;i--){
a[j]=i;
j++;
if(i==A)break;  
}
sort(a.begin(),a.end());
for(i=0;i<2*K;i++){
if(i!=0&&a[i]==a[i-1])continue;
cout<<a[i]<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ',' or ';' before '=' token
    8 | vector<int>a(2*K)={0};
      |                  ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int A,B,K;
  cin >> A >> B >> K;
  if ( B-A+1 <= 2*k ) {
    for ( int i = 0; i < K; i++ ) {
      cout << A+i << endl;
    }
    for ( int i = K-1; i >=0 ; i-- ) {
      cout << B -i << endl;
    }
  }else {
    for ( int i = A; i <= B; i++ ) {
      cout << i << endl;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: 'k' was not declared in this scope
    7 |   if ( B-A+1 <= 2*k ) {
      |                   ^