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

/* ex4_3
  terakura */

#include <stdio.h>

int depth(int west_height, int east_height);      //n番目の塔の高さ nは隣同士の塔の高さの差からわかる

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

    printf("%d\n", depth(int west_height, int east_height));

    return 0;

}




int depth(int west_height, int east_height){
    int diff, ans , hei;
    diff = east_height - west_height;
    ans =(1 + diff) * diff /2 - east_height;
    return ans;

}


Compiler output:
main.c: In function 'main':
main.c:12:26: error: expected expression before 'int'
   12 |     printf("%d\n", depth(int west_height, int east_height));
      |                          ^~~
main.c:12:20: error: too few arguments to function 'depth'
   12 |     printf("%d\n", depth(int west_height, int east_height));
      |                    ^~~~~
main.c:6:5: note: declared here
    6 | int depth(int west_height, int east_height);      //n番目の塔の高さ nは隣同士の塔の高さの差からわかる
      |     ^~~~~
Language: C

/* ex4_3
  terakura */

#include <stdio.h>

int depth(int west_height, int east_height);      //n番目の塔の高さ nは隣同士の塔の高さの差からわかる

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

    printf("%d\n", west_heght, east_heght);

    return 0;

}




int depth(int west_height, int east_height){
    int diff, ans , hei;
    diff = east_height - west_height;
    ans =(1 + dif) * dif /2 - east_height;
    return ans;

}


Compiler output:
main.c: In function 'depth':
main.c:24:15: error: 'dif' undeclared (first use in this function); did you mean 'diff'?
   24 |     ans =(1 + dif) * dif /2 - east_height;
      |               ^~~
      |               diff
main.c:24:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

/* ex4_3
  terakura */

#include <stdio.h>

int depth(nt west_height, int east_height);      //n番目の塔の高さ nは隣同士の塔の高さの差からわかる

int main(void){
    int west_heght, east_heght, ans;
    scanf("%d %d", &west_heght, &east_heght);

    printf("%d\n", west_heght, east_heght);

    return 0;

}




int depth(int west_height, int east_height){
    int diff ans hei;
    diff = east_height - west_height;
    int i
    for(i = 1; i < diff + 1; i++){
        hei = hei + i;     //A(n) = A(n-1) + n
    }
    ans = ans - east_height;
    return ans;

}


Compiler output:
main.c:6:11: error: unknown type name 'nt'; did you mean 'int'?
    6 | int depth(nt west_height, int east_height);      //n番目の塔の高さ nは隣同士の塔の高さの差からわかる
      |           ^~
      |           int
main.c: In function 'depth':
main.c:22:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ans'
   22 |     int diff ans hei;
      |              ^~~
main.c:22:14: error: unknown type name 'ans'
main.c:23:5: error: 'diff' undeclared (first use in this function)
   23 |     diff = east_height - west_height;
      |     ^~~~
main.c:23:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
   25 |     for(i = 1; i < diff + 1; i++){
      |     ^~~
main.c:25:9: error: 'i' undeclared (first use in this function)
   25 |     for(i = 1; i < diff + 1; i++){
      |         ^
main.c:28:5: error: 'ans' undeclared (first use in this function)
   28 |     ans = ans - east_height;
      |     ^~~
Language: C

#include <stdio.h>

int calculate(int num1, int num2);

int main(void){
  int west,east;
  scanf("%d %d",&west,&east);
  printf("%d\n",calculate(west,east);
  return 0;
}

int calculate(int num1, int num2){
  int diff,height;
  diff = num2 - num1;
  height = diff*(diff + 1)/2 - num2;
  return height;
}

Compiler output:
main.c: In function 'main':
main.c:8:37: error: expected ')' before ';' token
    8 |   printf("%d\n",calculate(west,east);
      |         ~                           ^
      |                                     )
main.c:9:12: error: expected ';' before '}' token
    9 |   return 0;
      |            ^
      |            ;
   10 | }
      | ~
Language: C

/* ex4_3
  key_tree */

#include <stdio.h>

int main(void){
    // プロトタイプ宣言
    int snow_depth(int west_height, int east_height);
    //埋もれていない高さを西側はwest_height、東側はeast_height
    int west_height, east_height;
    scanf("%d %d ",&west_height, &east_height);

    printf("%d\n", snow_depth(west_height, east_height));

    return 0;
}

int snow_depth(int west_height, int east_height){
    int dif, ans;
    dif = east_height - west_height
    ans =(1 + dif) * dif /2 - east_height

    return ans;
}

Compiler output:
main.c: In function 'snow_depth':
main.c:20:36: error: expected ';' before 'ans'
   20 |     dif = east_height - west_height
      |                                    ^
      |                                    ;
   21 |     ans =(1 + dif) * dif /2 - east_height
      |     ~~~
Language: C

/*  ex4_3
    pptenshi  */

#include<stdio.h>

int west_tower_num(int height_west, int height_east);
int height_tower(int num);
int snowfall(int height, int height_above_snow);

int main(void) {
    int height_west,  // a 
        height_east;  // b

    // input
    scanf("%d%d", &height_west, &height_east);
    
    // output
    printf(
        "%d\n", 
        snowfall(
            height_tower(west_tower_num(height_west, height_east)), 
            west_tower_num
        ));

    return 0;
}


/*  calculate west tower number
    parameter   height_west : height of west tower above snow,
                height_east : height of east tower above snow    */ 
int west_tower_num(int height_west, int height_east) {
    return height_east - height_west - 1;
}


/*  calculete height of tower
    parameter   num : tower number   */
int height_tower(int num) {
    return num * (num + 1) / 2; 
}

//  calculate snowfall amount 
int nowfall(int height, int height_above_snow) {
    return height - height_above_snow;
}

Compiler output:
main.c: In function 'main':
main.c:22:13: error: passing argument 2 of 'snowfall' makes integer from pointer without a cast [-Wint-conversion]
   22 |             west_tower_num
      |             ^~~~~~~~~~~~~~
      |             |
      |             int (*)(int,  int)
main.c:8:30: note: expected 'int' but argument is of type 'int (*)(int,  int)'
    8 | int snowfall(int height, int height_above_snow);
      |                          ~~~~^~~~~~~~~~~~~~~~~
Language: C

/*
  kadai4_3 stone_monument
  unomi
*/
#include <stdio.h>
#include <math.h>

int convert_snow_height(int east_height, int west_height, int east_height){
    int east_tower_height=0, diff_height=0;
    // (east_height - west_height)本目(東側)と(east_height - west_height - 1)本目(西側)の間で高さ測定
    diff_height = east_height - west_height;
    // 1 ~ nまでの和を計算 -> 東側の(east_height - west_height)本目の塔の高さ
    east_tower_height = diff_height*(1+diff_height)/2;
    // 積雪の高さ = 東側の塔の高さ - 東側の雪に埋もれていない部分の高さ
    return east_tower_height - east_height;
}

int main(void){
    int west_height=0,east_height=0;
    // west_height(a), east_height(b) の入力を取得
    scanf("%d %d",&west_height, &east_height);

    printf("%d\n",convert_snow_height(east_height, west_height, east_height));

    return 0;
}


Compiler output:
main.c:8:63: error: redefinition of parameter 'east_height'
    8 | int convert_snow_height(int east_height, int west_height, int east_height){
      |                                                           ~~~~^~~~~~~~~~~
main.c:8:29: note: previous definition of 'east_height' with type 'int'
    8 | int convert_snow_height(int east_height, int west_height, int east_height){
      |                         ~~~~^~~~~~~~~~~
Language: C

/* ex4_3
    fmuacshai */
 
#include<stdio.h>
//プロトタイプ宣言
int snow(int w_height,int e_height);
 
int main (void){
    //与えられる西の塔の高さと東の塔の高さをwestとeastと定義
    int west,east;
    //westを入力
    scanf("%d",&west);
    //eastを入力
    scanf("%d",&east);
    //snow関数の結果を出力
    printf("%d\n",snow(west,east));
    return 0;
}
 //西の塔w_heightと東の塔e_heightを変数とした関数snowを定義
int snow(int w_height,int e_height){
    //結果ansと低い方の塔の番号numと西の塔の実際の高さをsumとする
    int ans,num,sum;
    //numの計算
    num=e_height-w_height;
    num-=1;
    //sumの初期設定
    sum=0;
    //sumの計算
    while(dif>0){
        sum+=num;
        num-=1;
    }
    //ansの計算
    ans=sum-w_height;
    //返り値を返す
    return(ans);
}

Compiler output:
main.c: In function 'snow':
main.c:29:11: error: 'dif' undeclared (first use in this function)
   29 |     while(dif>0){
      |           ^~~
main.c:29:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int calc_height(int index){
  return index*(index+1)/2;
}
int solve_index(int rest_a,rest_b){
  return rest_b-rest_a-1;
}

int main(void){
  int rest_a,rest_b,left_index,depth;
  scanf("%d %d",&rest_a,&rest_b);
  left_index = solve_index(rest_a,rest_b);
  depth = calc_height(left_index) - rest_a;
  printf("%d\n",depth);
  return 0;
}

Compiler output:
main.c:6:28: error: unknown type name 'rest_b'
    6 | int solve_index(int rest_a,rest_b){
      |                            ^~~~~~
main.c: In function 'main':
main.c:13:16: error: implicit declaration of function 'solve_index' [-Wimplicit-function-declaration]
   13 |   left_index = solve_index(rest_a,rest_b);
      |                ^~~~~~~~~~~
Language: C

/* ex4_3
   YSK722 */

#include <stdio.h>

// プロトタイプ宣言
int calculation();


int main(void){
    int west, east, ans;
    scanf("%d %d", &west, &east);

    // 関数の呼び出し
    ans = calculation();

    printf("%d\n", ans);
    return 0;
}


// 関数の定義
int calculation(){
    int i, height = 0;
    for (i = 1; i < east - west; i++) {
        height += i;
    }
    return height - west;
}

Compiler output:
main.c: In function 'calculation':
main.c:25:21: error: 'east' undeclared (first use in this function)
   25 |     for (i = 1; i < east - west; i++) {
      |                     ^~~~
main.c:25:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:28: error: 'west' undeclared (first use in this function)
   25 |     for (i = 1; i < east - west; i++) {
      |                            ^~~~
Language: C

#include <stdio.h>

int main(void){
    int a, b, dif, ans;
    scanf("%d %d", &a, &b);
    dif = b - a;
    
    ans = dif * (dif - 1) / 2 - a;
    
    printf("%d", ans);
    
    return 0;

Compiler output:
main.c: In function 'main':
main.c:12:5: error: expected declaration or statement at end of input
   12 |     return 0;
      |     ^~~~~~
Language: Java


import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author PARUL
 */
public class stoneMonument {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int a = in.nextInt();
    
        int b = in.nextInt();
        int arr[]=new int[1000];
        arr[0]=0;
        for (int i = 1; i <= 999; i++) {
            arr[i]=arr[i-1]+i;
        }
        int a1=0,b1;
        b1 = 0;
        for (int i = 1; i <= 999; i++) {
            if(arr[i]>=a){
                 a1=arr[i];
                 b1=arr[i+1];
                  break;
            }
        }
//        for (int i = 1; i <1000; i++) {
//            System.out.print(arr[i]+" ");
//        }
            System.out.println(a1-a);
    }
}


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


import java.util.Scanner;
public class B_stoneMonument {
    public static void main(String[] args) {
        
        Scanner input=new Scanner(System.in);
        
        int a=input.nextInt();
        int b=input.nextInt();
        int diff=0;
        
        for(int i=1;i<999;i++)
        {
            int p=i*(i+1)/2;
            if(p>=a)
            {
                diff=p+i+1-b;
                break;
            }
        
        
        }
        
        
        
        
        if(diff<1)
        System.out.println("1");
        else
            System.out.println(diff);
    }
    
}


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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define REP(i,n) for (int i = 1; i < (int)(n); i++)
#define all(x) x.begin(), x.end()
template<class T> bool chmin(T &a, T b) {if(a>b) {a=b;return 1;}return 0;}
using namespace std;
using vint = vector<int>;
using vvint = vector<vector<int>>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<int,int>;
const ll inf = 1e18;
const int MAX_N = 500;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expression cannot be used as a function
   18 |     cout << (b-a)(b-a+1)/2-b << endl;
      |             ~~~~~^~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:22: error: 'B' undeclared (first use in this function)
    5 |   printf("%d",(b-a)*(B-a+1)/2-b);
      |                      ^
main.c:5:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'bb' was not declared in this scope; did you mean 'b'?
    5 |   int ans=(bb-a)*(b-a+1)/2-b;
      |            ^~
      |            b
Language: C++

include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
  cin>>a>>b;
  int x=b-a;
  int ans=((x*(x-1))/2)-a;
  cout<<ans<<endl;
   return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin>>a>>b;
      |   ^~~
a.cc:8:3: error: 'cout' was not declared in this scope
    8 |   cout<<ans<<endl;
      |   ^~~~
a.cc:8:14: error: 'endl' was not declared in this scope
    8 |   cout<<ans<<endl;
      |              ^~~~
Language: C++

#include <bits/stdc++.h>
#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 pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef tuple<int,int,int> T;
typedef vector<P> vp;
typedef vector<T> vt;

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



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

#include<stdio.h>
int main(void){
  int a,b,num[1000],sum=0;
  for(i=1;i<1000;i++){
    sum+=i;
    num[i]=sum;
  }
  printf("%d",num[b-a]);
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:4:7: error: 'i' undeclared (first use in this function)
    4 |   for(i=1;i<1000;i++){
      |       ^
main.c:4:7: 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(){
  long long a, b;
  cin >> a >> b;
  ll f=0;
  for(int i=1;i<=999;++i){
    if(f >= b) break;
    f += i;
  }
  
  cout << f - b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'll' was not declared in this scope
    7 |   ll f=0;
      |   ^~
a.cc:9:8: error: 'f' was not declared in this scope
    9 |     if(f >= b) break;
      |        ^
a.cc:10:5: error: 'f' was not declared in this scope
   10 |     f += i;
      |     ^
a.cc:13:11: error: 'f' was not declared in this scope
   13 |   cout << f - b << endl;
      |           ^
Language: Java

import java.util.*;

public class Main {
    public static void main(String args[]) throws Exception {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int diff = b - a;
        int sum = 0;
        for(int i = 1; i <= diff; i++)
        	sum += i;
        else System.out.println(sum - b);
    }
}


Compiler output:
Main.java:12: error: 'else' without 'if'
        else System.out.println(sum - b);
        ^
1 error
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;

  struct input{
   public long a;
   public long b;
  }

class MainClass {
  static input input; 

  public static void Main (string[] args) {
    
    var temp = Console.ReadLine().Split(' ').Select(long.Parse);
    input.a = temp.ElementAt(0);
    input.b = temp.ElementAt(1);
    var n = input.b - input.a;
    Console.WriteLine(n * (n-1) / 2 - input.a);
  }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:6:10: error: expected ':' before 'long'
    6 |    public long a;
      |          ^~~~~
      |          :
a.cc:7:10: error: expected ':' before 'long'
    7 |    public long b;
      |          ^~~~~
      |          :
a.cc:8:4: error: expected ';' after struct definition
    8 |   }
      |    ^
      |    ;
a.cc:11:16: error: declaration of 'input MainClass::input' changes meaning of 'input' [-Wchanges-meaning]
   11 |   static input input;
      |                ^~~~~
a.cc:11:10: note: used here to mean 'struct input'
   11 |   static input input;
      |          ^~~~~
a.cc:5:10: note: declared here
    5 |   struct input{
      |          ^~~~~
a.cc:13:9: error: expected ':' before 'static'
   13 |   public static void Main (string[] args) {
      |         ^~~~~~~
      |         :
a.cc:13:28: error: 'string' has not been declared
   13 |   public static void Main (string[] args) {
      |                            ^~~~~~
a.cc:13:37: error: expected ',' or '...' before 'args'
   13 |   public static void Main (string[] args) {
      |                                     ^~~~
a.cc:21:2: error: expected ';' after class definition
   21 | }
      |  ^
      |  ;
a.cc: In static member function 'static void MainClass::Main(int*)':
a.cc:15:5: error: 'var' was not declared in this scope
   15 |     var temp = Console.ReadLine().Split(' ').Select(long.Parse);
      |     ^~~
a.cc:16:15: error: 'temp' was not declared in this scope
   16 |     input.a = temp.ElementAt(0);
      |               ^~~~
a.cc:18:9: error: expected ';' before 'n'
   18 |     var n = input.b - input.a;
      |         ^
a.cc:19:5: error: 'Console' was not declared in this scope
   19 |     Console.WriteLine(n * (n-1) / 2 - input.a);
      |     ^~~~~~~
a.cc:19:23: error: 'n' was not declared in this scope
   19 |     Console.WriteLine(n * (n-1) / 2 - input.a);
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std
int main()
  int a,b;cin>>a>>b;
  cout<<(b-a+1)*(b-a)/2-b<<endl;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | int main()
      | ~~~                 
a.cc:4:3: error: expected initializer before 'int'
    4 |   int a,b;cin>>a>>b;
      |   ^~~
a.cc:4:11: error: 'cin' does not name a type
    4 |   int a,b;cin>>a>>b;
      |           ^~~
a.cc:5:3: error: 'cout' does not name a type
    5 |   cout<<(b-a+1)*(b-a)/2-b<<endl;
      |   ^~~~
a.cc:6:1: error: expected declaration before '}' token
    6 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expression cannot be used as a function
    7 |     cout << ((b-a)(b-a+1)/2)-b << endl;
      |              ~~~~~^~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expression cannot be used as a function
    7 |     cout << ((b=a)(b-a+1)/2)-b << endl;
      |              ~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 int sum (int a){
   if(a == 0){
     return 0;
   }
   int s = sum(a-1);
   return s + a;
 }

int main(){
  int x,y;
  cin x >> y;
  int hig = sum(abs(x-y));
  cout << hig - y << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:6: error: expected ';' before 'x'
   13 |   cin x >> y;
      |      ^~
      |      ;
Language: C

#include <stdio.h>
#include <stdlib.h>
int main(void){
int a,b;
int snow=0;
int tall=0;
int count=1;
scanf("%d %d",&a,&b);
talldif=b-a;
for(count=1;;count++){
tall=tall+1;
if(tall>=a&&tall<=b){break;}
}
printf("%d",tall-a);
}

Compiler output:
main.c: In function 'main':
main.c:9:1: error: 'talldif' undeclared (first use in this function); did you mean 'tall'?
    9 | talldif=b-a;
      | ^~~~~~~
      | tall
main.c:9:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <stdlib.h>
int main(void){
int a,b;
int snow=0;
int tall=0;
int count=1
int talldif;
scanf("%d %d",&a,&b);
talldif=b-a;
for(count=1;;count++){
tall=tall+1;
if(tall>=a&&tall<=b){break;}
}
printf("%d",tall-a);
}

Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected ',' or ';' before 'int'
    8 | int talldif;
      | ^~~
main.c:10:1: error: 'talldif' undeclared (first use in this function); did you mean 'tall'?
   10 | talldif=b-a;
      | ^~~~~~~
      | tall
main.c:10:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

int main() {
  int a, b, X;
  scanf("%d %d", &a, &b);
  X = a - b;
  printf("%d", X * (X + 1) / 2 - b);
  return 0;
}

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

import sys

a,b=map(int,input().split())
c=b-a
ans=0
for i in range(1,c+1,1):
	ans+=i
ans-=b
print(ans)
	

Compiler output:
Main.java:1: error: '.' expected
import sys
          ^
Main.java:3: error: ';' expected
a,b=map(int,input().split())
 ^
2 errors
Language: C++

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'else' without a previous 'if'
    9 |         else if(s>a){
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
int plus(int X){
  int A=0;
  rep(i,1,X+1)
    A+=i;
  return A;
  }
signed main(){
  int a,b;
  cin>>a>>b;
  cout<<plus(b-a)-b;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: reference to 'plus' is ambiguous
   23 |   cout<<plus(b-a)-b;
      |         ^~~~
In file included from /usr/include/c++/14/string:49,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_function.h:160:12: note: candidates are: 'template<class _Tp> struct std::plus'
  160 |     struct plus;
      |            ^~~~
a.cc:14:5: note:                 'long long int plus(long long int)'
   14 | int plus(int X){
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;

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

    cout<<(B-A)*(B-A+1)/2-B<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'B' was not declared in this scope
    8 |     cout<<(B-A)*(B-A+1)/2-B<<endl;
      |            ^
a.cc:8:14: error: 'A' was not declared in this scope
    8 |     cout<<(B-A)*(B-A+1)/2-B<<endl;
      |              ^
Language: C++

#inlcude<bits/stdc++.h>
using namespace std;
int main(){
  
  int a;
  int b;
  cin >> a >> b;
  
  int num = b - a;
  int num2 = 0;
  int num3 = 0;
  
  int num4;
  
  while(true){
    num2++;
    num3 = num2 + num3;
    if(num2 == num){
      num4 = num3 - num4;
      break;
    }
  }
  
  cout << num4 << endl;
    
  
}

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

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

int main(){
    int a,b;cin>>a>>b;
    int n=b-a;//n-1本目とn本目の間とわかる
    int ans=-b;
    for(int i=1;i<=n;i++) ans+=i;
    cout<<ans<<endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:13: error: 'cin' was not declared in this scope
    5 |     int a,b;cin>>a>>b;
      |             ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout<<ans<<endl;
      |     ^~~~
a.cc:9:16: error: 'endl' was not declared in this scope
    9 |     cout<<ans<<endl;
      |                ^~~~
Language: C++

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

int main(){
	int a,b,c;
	int depth=1;
	cin>>a>>b;
	int arrray[999];
	for(int i=1;i<=999;i++){
		arrray[i]=((i)*(i+1))/(2);
	}
	for(int j=1;j<1000;j++){
		if(arrray[j]>a){
			c=arrray[j];
			break;
		}
	}
	depth=c
	if(depth>1){
	cout<<depth;
	}
	else{
	    cout<<1;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: expected ';' before 'if'
   22 |         depth=c
      |                ^
      |                ;
   23 |         if(depth>1){
      |         ~~      
a.cc:26:9: error: 'else' without a previous 'if'
   26 |         else{
      |         ^~~~
Language: C++

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

int main(){
	int a,b,c,d;
	int depth=0;
	cin>>a>>b;
	int arrray[999];
	for(int i=1;i<=999;i++){
	    d=((i)*(i+1))
		arrray[i]=d/(2);
	}
	for(int j=1;j<1000;j++){
		if(arrray[j]>a){
			c=arrray[j];
			break;
		}
	}
	depth=c-a;
	cout<<depth;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: expected ';' before 'arrray'
   14 |             d=((i)*(i+1))
      |                          ^
      |                          ;
   15 |                 arrray[i]=d/(2);
      |                 ~~~~~~
Language: C

#include <stdio.h>

int main(void){
  int a,b;//左右の柱の埋もれていない部分
  int dif;//
  int height=0;
  int dep;//積雪量
  scanf("%d %d",&a,&b);
  dif=a-b;
  if(dif<0){
    dif=-dif;
  }
  /*低い方の柱の高さを求める*/
  for(int i=;i<dif;i++){
    height+=i;
  }
  dep=height-a;

  printf("%d",dep);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:13: error: expected expression before ';' token
   14 |   for(int i=;i<dif;i++){
      |             ^
Language: C++

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



int main (){
    int D, N;
    cin>>D>>N;
    cout<<(N-D)*(N-D-1)/2
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before '}' token
    9 |     cout<<(N-D)*(N-D-1)/2
      |                          ^
      |                          ;
   10 | }
      | ~
Language: C++

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

int main(){
	int i,j,k;
  	vector<int> dp;
  	for(i=1,j=0;i<=999;i++){
      j+=i;
      dp.push_back(j);
    }
  cin>>j>>k;
  //k=k-j;
  for(i=0;i<dp.size()-1;i++){
    if(dp[i]>j&&dp[i]-j==dp[i+1]-k)){
        //cout<<dp[i]<<" ";
      cout<<dp[i]-j<<endl;break;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:36: error: expected primary-expression before ')' token
   14 |     if(dp[i]>j&&dp[i]-j==dp[i+1]-k)){
      |                                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
// マクロ
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
// 型エイリアス
using ll = long long;
using vi = vector<int>;
using vs = vector<string>;
using vvi = vector<vi>;
using vvs = vector<vs>;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:44: error: expected ';' before '}' token
   15 |     cout << (b-a)*(b-a+1) / 2 - b << endl;a
      |                                            ^
      |                                            ;
   16 | }
      | ~
Language: C++

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

int main(){
  int a,b,log=0;
  cin>>a>>b;
  int num[999];
  num[0] = 1;
  for(int i=1;i<999;i++){
    num[i] =  num[i-1] +i+1;
    if(num[i]<a) log = i;
  }
  int ans=0;
  while(ans+num[i]<=a){
    for(int i=log;ans+num[i]<=a;i++){
      if(ans+num[i]==a && ans+num[i+1]==b){
        cout<<ans<<endl;
        return 0;
      }
    }
    ans++;
  }cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'i' was not declared in this scope
   14 |   while(ans+num[i]<=a){
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define rep(X,N) for(ll X = 0; X < (N); X++)
#define PI (acos(-1.0))
#define pback push_back
#define mpair make_pair
#define MODN 1000000007
#define ALL(V) (V).begin(),(V).end()

using namespace std;

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

    int n = b - a;

    int eastt = n * (n + 1) / 2;

    cout << eastt - b << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: expected initializer before 'cin'
   15 |     cin >> a >> b;
      |     ^~~
a.cc:17:13: error: 'b' was not declared in this scope
   17 |     int n = b - a;
      |             ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <istream>
#include <map>
#include <set>
#include <queue>
#define rep0(i,n) for (int i = 0; i <= (n); ++i)
#define rep1(i,n) for (int i = 1; i <= (n); ++i)
#define REP(a,b) for (int i = a; i <= (b); ++i) 
#define mREP(a,b) for (int i = a; i == (b); --i)
#define mod 1e9 + 7
typedef long long ll;
using namespace std;
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	/*
	　　　　　 　 _... ..._
	　　　　　 , ´⌒ ⌒ヽ
	　　　 　 ﾉｨ（ノﾉ）ﾉ）ﾉ）
	　　　 　 （（q|.ﾟ ヮﾟﾉ|ﾊ
	　　　　　　△ﾑ,8ﾑﾌつ
	　　　　　/(ﾝ_/＿ヽ＼
	　　　　 ～～i_ﾌ_ﾌ～´
	*/
	scanf("% d % d ", &A, &B);
	printf("% d \ n ", (B - A) * (B - A + 1) / 2 - B);
	return 0;
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:33:28: error: 'A' was not declared in this scope
   33 |         scanf("% d % d ", &A, &B);
      |                            ^
a.cc:33:32: error: 'B' was not declared in this scope
   33 |         scanf("% d % d ", &A, &B);
      |                                ^
a.cc:34:16: warning: unknown escape sequence: '\040'
   34 |         printf("% d \ n ", (B - A) * (B - A + 1) / 2 - B);
      |                ^~~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: expected initializer before '.' token
    4 |   int a.b,h=0;cin>>a>>b;
      |        ^
a.cc:4:20: error: 'a' was not declared in this scope
    4 |   int a.b,h=0;cin>>a>>b;
      |                    ^
a.cc:4:23: error: 'b' was not declared in this scope
    4 |   int a.b,h=0;cin>>a>>b;
      |                       ^
a.cc:5:25: error: 'h' was not declared in this scope
    5 |   for(int i=1;i<b-a;i++)h+=i;
      |                         ^
a.cc:6:9: error: 'h' was not declared in this scope
    6 |   cout<<h-a<<endl;
      |         ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expression cannot be used as a function
    7 |     cout<<(b-a)(b-a+1)/2-b<<endl;
      |           ~~~~~^~~~~~~
Language: C++

#import<ios>
int main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<ios>
      |  ^~~~~~
a.cc: In function 'int main()':
a.cc:2:25: error: 'cin' is not a member of 'std'
    2 | int main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
      |                         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #import<ios>
  +++ |+#include <iostream>
    2 | int main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
a.cc:2:40: error: 'cout' is not a member of 'std'
    2 | int main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
      |                                        ^~~~
a.cc:2:40: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#import<ios>
main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<ios>
      |  ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:21: error: 'cin' is not a member of 'std'
    2 | main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
      |                     ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #import<ios>
  +++ |+#include <iostream>
    2 | main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
a.cc:2:36: error: 'cout' is not a member of 'std'
    2 | main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
      |                                    ^~~~
a.cc:2:36: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#import<ios> main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<ios> main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
      |  ^~~~~~
a.cc:1:14: warning: extra tokens at end of #import directive
    1 | #import<ios> main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
      |              ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#import<ios>main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<ios>main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
      |  ^~~~~~
a.cc:1:17: warning: extra tokens at end of #import directive
    1 | #import<ios>main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
      |                 ^
a.cc:1:8: fatal error: ios>mai: No such file or directory
    1 | #import<ios>main(){int a,b;std::cin>>a>>b;std::cout<<(b-a)*(b-a+1)/2-b;}
      |        ^~~~~~~~~
compilation terminated.
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'i' was not declared in this scope
   12 |     cout << i - b << endl;
      |             ^
Language: C++

#include<stdio.h>
int main(void)
{
  int n;
  int i,co=0;
  scanf("%d",&n);
  for(i=0;i<999;i++){
	co=i*2+1
    if(co>=n){
      break;
    }
  }
  printf("%d\n",co-n);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'if'
    8 |         co=i*2+1
      |                 ^
      |                 ;
    9 |     if(co>=n){
      |     ~~
Language: C++

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

int main(){
	int a,b;cin>>a>>b;
	int c=b-a,s=0;
	for(int i=1,i<c;i++){
		s+=i;
}
	cout<<s-a<<endl;
}

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

#inlucde <iostream>
using namespace std;
int main(){
  int a,b;
  cin >> a >> b;
  cout << (b-a)*(b-a+1)/2 - b << endl;
}

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

a, b = gets.split.map(&:to_i)

i = 2
tmp =  1

loop do
  if tmp > a && tmp - a == tmp - b + i
    puts tmp - a
    break
  else
    tmp += i
    i += 1
  end
end



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

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

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

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>a>>b;
      |   ^~~
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout << N - b << endl;
      |   ^~~~
a.cc:9:20: error: 'endl' was not declared in this scope
    9 |   cout << N - b << endl;
      |                    ^~~~
Language: C++

<bits/stdc++.h>
using namespace std;
//(10+1)*10/2=55
//(3+1)*3/2=6
int main(){
  int a, b;
  cin>>a>>b;
  int n = b - a;
  int A = (n + 1) * n >> 1;
  cout << A - b;
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>a>>b;
      |   ^~~
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout << A - b;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
#include<math.h>
using namespace std;
 
template <class T> using V = vector<T>;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
 
 
#define FOR(i,a,b) for(ll i=(a);i<(ll)(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>(ll)(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(ll)(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
 
 
ll sum(ll n) {
  ll m=0;
  FOR(i,0,20){
    m+=n%10;
    n/=10;
    if(n==0){
      break;
    }
  }
  return m;
}
 
 
ll combi(ll n,ll m) {
  ll ans=1;
  rFOR(i,n,n-m){
    ans*=i;
  }
  FOR(i,1,m+1){
    ans/=i;
  }
  return ans;
}
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}
 
 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  vll A(n);
  A[0]=1;
  FOR(i,1,1000){
    A[i]+=A[i-1]+i+1;
  }
  ll a,b;
  	ci(a>>b);
  co(A[b-a-1]-b)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:76:9: error: 'n' was not declared in this scope
   76 |   vll A(n);
      |         ^
Language: C++

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

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


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

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

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


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

#include <iostream>

int main(){
  int a,b;
  cin >> a >> b;
  std::cout <<  b - (b-a)*(b-a+1)/2;
}

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 >> a >> b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
Language: Java

public class May30thB {
    public static void main(String[] args) {
        int hoge = Integer.parseInt(args[0]);
        int hoga = Integer.parseInt(args[1]);
        int tower[] = new int[1000];
        int k = 0;
        for (int i = 1; i <= 999; i++) {
            k = k + i;
            tower[i] = k;
        }
        if (hoga - hoge == tower[hoga - hoge] - tower[hoga - hoge - 1]) {
            System.out.println(tower[hoga - hoge -1] - hoge);
        }
    }
}


Compiler output:
Main.java:1: error: class May30thB is public, should be declared in a file named May30thB.java
public class May30thB {
       ^
1 error
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; cin >> a >> b;
	int c = b-a;
	int d = b-c;
	int count = 0;
	rep(i,n){
		n += i+1;
	}
	print(count - b);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:15: error: 'n' was not declared in this scope
   29 |         rep(i,n){
      |               ^
a.cc:11:39: note: in definition of macro 'rep'
   11 | #define rep(i,n) for (int i = 0; i < (n); ++i)
      |                                       ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
const int MOD = 1e9 + 7;
typedef long long lint;
const int INF = 1e7;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repi(i, k, n) for (int i = (k); i < (int)(n); ++i)
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
#define all(x) (x).begin(), (x).end()
#define pb push_back
int main()
{
    int a, b;
    cin >> a >> b;
    int ans = b - a;
    ans = (a + ans - 1) / ans * ans;
    ans -= a;
    cout << ans << endl;
    ret

Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'ret' was not declared in this scope; did you mean 'rep'?
   21 |     ret
      |     ^~~
      |     rep
a.cc:21:8: error: expected '}' at end of input
   21 |     ret
      |        ^
a.cc:14:1: note: to match this '{'
   14 | {
      | ^
Language: C

#include<iostream>

using namespace std;

int main(){
  int a,b;
  cin >> a;
  cin >> b;
  int diff = b - a;

  int aa=0;
  int bb=0;
  for(int i = 1;i<diff;i++){
    aa = aa + i;
  }
  bb = aa + diff;

  cout << bb-b<<endl;
  return 0;
}


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

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Sample {

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

		List<String> input = Arrays.asList(sc.nextLine().split(" "));
		int[] inputNum = input.stream().mapToInt(in -> Integer.parseInt(in)).toArray();
		int sa = inputNum[1] - inputNum[0];
		int tall = 0;
		for (int i = 1; i <= sa; i++) {
			tall += i;
		}
		System.out.println(tall - inputNum[1]);
		sc.close();

	}
}


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

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Sample {

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

		List<String> input = Arrays.asList(sc.nextLine().split(" "));
		Integer[] inputNum = (Integer[]) input.stream().map(in -> Integer.parseInt(in)).toArray();
		int sa = inputNum[1]-inputNum[0];
		int tall = 0;
		for(int i = 1;i <=sa;i++) {
			tall+=i;
		}
		System.out.println(tall-inputNum[1]);

	}
}

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

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

int pon(int n) {
  if(i == 1) {
    return 1;
  } else {
    return n + pon(n - 1);
  }
}

int main() {
  int a, b;
  cin >> a >> b;
  int zu = b - a;
  cout << pon(zu) - b << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int pon(int)':
a.cc:5:6: error: 'i' was not declared in this scope
    5 |   if(i == 1) {
      |      ^
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^