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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n+1); i++)
const int MAX = 510000;
const int MOD = 1000000007;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (long long i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

// 二項係数計算
long long COM(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
  	if(n==k){
      return 1;
    }
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
// vector<vector<int>> A(3, vector<int>(4));
int main() {
    ll k,s;
    cin>>k>>s;
    ll ans=0;
    for(int i=0; i<k; i++){
        for(int j=0; j<k; j++){
            if(S-i-j<=s&&0<=S-i-j){
                ans++;
            }
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:16: error: 'S' was not declared in this scope
   40 |             if(S-i-j<=s&&0<=S-i-j){
      |                ^
Language: C++

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

int main(){
  int k,s;
  cin>>k>>s;
  int count=0;
  for(int i=0;i<=k;i++){
    for(int j=0;i<=k;i++){
      for(int l=0;i<=k;i++){
        if(i+j+l==s) count++;
      }
    }
  }
  cout<<count<<endl;
  return 0;
}

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

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

int main(){
 ios_base::sync_with_stdio(false);
 cin.tie(NULL);
 int k , s;
 int ans = 0;
 cin >> k >> s;
 for(int i = 0; i <= k; i++){
    for(int j = 0; j <= k; j++){
	   for(int z = 0; z <= k; z++){
		      if(i + j + z == s) ans++;   
		   } 
	  }	 
 }	
 cout << ans << " ";	
 re

Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: 're' was not declared in this scope
   19 |  re
      |  ^~
a.cc:19:4: error: expected '}' at end of input
   19 |  re
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<algorithm>
#include<bitset>
#include<cmath>
#include<complex>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<iterator>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define FOR(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define MOD (1000000007)
#define INF (2e9)
#define INFL (2e18)

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
using vint=vector<int>;
using vll=vector<ll>;
template<class T>using arr=vector<vector<T>>;
template<class T>int popcount(T &a){int c=0; rep(i, 8*(int)sizeof(a)){if((a>>i)&1) c++;} return c;}
template<class T>void pr(T x){cout << x << endl;}
template<class T>void prvec(vector<T>& a){rep(i, a.size()-1){cout << a[i] << " ";} pr(a[a.size()-1]);}
template<class T>void prarr(arr<T>& a){rep(i, a.size()) if(a[i].empty()) pr(""); else prvec(a[i]);}
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 main()
{
    int k, s; cin >> k >> s;
    int ans = 0:
    rep(x, k){
        rep(y, k){
            if(s - x - y >= 0) ans++;
        }
    }

    pr(ans);
    return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:16: error: expected ',' or ';' before ':' token
   44 |     int ans = 0:
      |                ^
a.cc:45:9: error: 'x' was not declared in this scope
   45 |     rep(x, k){
      |         ^
a.cc:21:31: note: in definition of macro 'rep'
   21 | #define rep(i,n) for(int i=0; i<(n); i++)
      |                               ^
Language: C++

int main()
{
  long long k,s;cin>>k>>s;
  long long cnt =0;
  for (size_t x = 0; x <= k; x++)
  {
    for (size_t y = 0; y <= k; y++)
    {
      long long z = s - (x+y);
      if (0 <= z && z <= k)
      {
        cnt++;
      }
      
    }
    
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:17: error: 'cin' was not declared in this scope
    3 |   long long k,s;cin>>k>>s;
      |                 ^~~
a.cc:5:8: error: 'size_t' was not declared in this scope
    5 |   for (size_t x = 0; x <= k; x++)
      |        ^~~~~~
a.cc:1:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | int main()
a.cc:5:22: error: 'x' was not declared in this scope
    5 |   for (size_t x = 0; x <= k; x++)
      |                      ^
a.cc:7:16: error: expected ';' before 'y'
    7 |     for (size_t y = 0; y <= k; y++)
      |                ^~
      |                ;
a.cc:7:24: error: 'y' was not declared in this scope
    7 |     for (size_t y = 0; y <= k; y++)
      |                        ^
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout << cnt << endl;
      |   ^~~~
a.cc:18:18: error: 'endl' was not declared in this scope
   18 |   cout << cnt << endl;
      |                  ^~~~
Language: C++

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

int main() {
  int K, S;
  cin >> K >> S;
  
  int count = 0;
  
  for (int x = 0; x <= K; i++){
    for (int y = 0; y <= K; j++){
      if (S - x - y >= 0 && S - x - y <= K) count++;
    }
  }
  
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: 'i' was not declared in this scope
   10 |   for (int x = 0; x <= K; i++){
      |                           ^
a.cc:11:29: error: 'j' was not declared in this scope
   11 |     for (int y = 0; y <= K; j++){
      |                             ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int k,s;
	int t=0;
	cin>>k>>s;
	if(s>3*k){
		cout<<0;
		return<<0;
	}
	for(int x=0;x<=k;x++){
		for(int y=0;y<=k;y++){
			for(int z=0;z<=k;z++){
				if(x+y+z==s){
					t++;
				}
			}
		}
		
	
	}
	cout<<t;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected primary-expression before '<<' token
   10 |                 return<<0;
      |                       ^~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int k,s;
	int t=0;
	cin>>k>>s;
	for(int x=0;x<=k;x++){
		for(int y=0;y<=k;y++){
			for(int y=0;y<=k;y++){
				if(x+y+z==s){
					t++;
				}
			}
		}
		
	
	}
	cout<<t;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:40: error: 'z' was not declared in this scope
   11 |                                 if(x+y+z==s){
      |                                        ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int k,s;
	int t=0;
	cin>>k>>s;
	for(intx=0;x<k;x++){
		for(inty=0;y<k;y++){
			for(inty=0;y<k;y++){
				if(x+y+z==s){
					t++;
				}
			}
		}
		
	
	}
	cout<<t;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'intx' was not declared in this scope; did you mean 'int'?
    8 |         for(intx=0;x<k;x++){
      |             ^~~~
      |             int
a.cc:8:20: error: 'x' was not declared in this scope
    8 |         for(intx=0;x<k;x++){
      |                    ^
a.cc:9:21: error: 'inty' was not declared in this scope; did you mean 'int'?
    9 |                 for(inty=0;y<k;y++){
      |                     ^~~~
      |                     int
a.cc:9:28: error: 'y' was not declared in this scope
    9 |                 for(inty=0;y<k;y++){
      |                            ^
a.cc:11:40: error: 'z' was not declared in this scope
   11 |                                 if(x+y+z==s){
      |                                        ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int K, S;
  cin >> K >> S;
  int count = 0;
  for (int X = 0; X <= K; X ++){
    for (int Y = 0; Y <= K; Y ++){
      for (int Z = 0; Z <= K; Z ++){
        if (X + Y + Z = S){
          count ++;
        }
      }
    }
  }
  cout << count << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: lvalue required as left operand of assignment
   11 |         if (X + Y + Z = S){
      |             ~~~~~~^~~
Language: C++

int main(void)
{
	int K, S, t, z;
  	cin >> K >> S;
  	t = 0;
  	for(int x = 0; x <= K; x++){
    	for(int y = 0; y <= K; y++){
          z = S - x - y;
          if(0 <= z &&z <= K){
           t++;
          }
        }
    }
  cout << t << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> K >> S;
      |         ^~~
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout << t << endl;
      |   ^~~~
a.cc:14:16: error: 'endl' was not declared in this scope
   14 |   cout << t << endl;
      |                ^~~~
Language: C++

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

int main(){
  int K,S;
  cin >> K >> S;
  
  int count=0;
  
  for(int i=0; i<=K; i++;){
    for(int j=0; j<=K; j++;){
      if(S-K <= (i+j) && (i+j)<= S){
        count++;
      }
    }
  }
  cout << count << endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: expected ')' before ';' token
   10 |   for(int i=0; i<=K; i++;){
      |      ~                  ^
      |                         )
a.cc:10:26: error: expected primary-expression before ')' token
   10 |   for(int i=0; i<=K; i++;){
      |                          ^
Language: C++

#include <iostream>

using namespace std;

int main(void){
 int K,S;
 cin >> K >> S;


 int ans = 0;

 for(int x = 0; x <= K; x++)
 {
   for(int y = 0; y <= K; y++S)
   {
   int z = S - x - y;
     if(0 <= z and z <= K)
     {
     ans = ans + 1;
     }
   }
 }

 cout << ans << endl;
 
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: expected ')' before 'S'
   14 |    for(int y = 0; y <= K; y++S)
      |       ~                      ^
      |                              )
a.cc:14:31: error: expected ';' before ')' token
   14 |    for(int y = 0; y <= K; y++S)
      |                               ^
      |                               ;
Language: C++

#include <iostream>

using namespace std;

int main(void){
2 int K,S;
3 cin >> K >> S;
4
1
5 int ans = 0;
6
7 for(int x = 0; x <= K; ++x){
8 for(int y = 0; y <= K; ++y){
9 int z = S - x - y;
10 if(0 <= z and z <= K){
11 ans = ans + 1;
12 }
13 }
14 }
15
16 cout << ans << endl;
17 
18 }


Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: expected ';' before 'int'
    6 | 2 int K,S;
      |  ^~~~
      |  ;
a.cc:7:2: error: expected ';' before 'cin'
    7 | 3 cin >> K >> S;
      |  ^~~~
      |  ;
a.cc:8:2: error: expected ';' before numeric constant
    8 | 4
      |  ^
      |  ;
    9 | 1
      | ~ 
a.cc:11:2: error: expected ';' before numeric constant
   11 | 6
      |  ^
      |  ;
   12 | 7 for(int x = 0; x <= K; ++x){
      | ~ 
a.cc:12:18: error: 'x' was not declared in this scope
   12 | 7 for(int x = 0; x <= K; ++x){
      |                  ^
a.cc:12:23: error: 'K' was not declared in this scope
   12 | 7 for(int x = 0; x <= K; ++x){
      |                       ^
a.cc:20:3: error: expected ';' before numeric constant
   20 | 15
      |   ^
      |   ;
   21 | 16 cout << ans << endl;
      | ~~ 
a.cc:22:3: error: expected ';' before numeric constant
   22 | 17
      |   ^
      |   ;
   23 | 18 }
      | ~~
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int k = sc.nextInt();
        int s = sc.nextInt();
        int ans = 0;
        for (int i = 0; i <= k; i++) {
            for (int j = 0; j <= k; j++) {
                for (int l = 0; l <= k; l++) {
                    if(i + j + l == s) ans++;
                }
            }
        }
        System.out.println(ans);
    }


Compiler output:
Main.java:17: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define sz(x) (int)x.size()
#define pb push_back
#define mp make_pair
#define ll long long 
#define mod 1000000007
void setIO(string name) {
  ios_base::sync_with_stdio(0); cin.tie(0);
  freopen((name+".in").c_str(),"r",stdin);
  freopen((name+".out").c_str(),"w",stdout);
}
void fast(){
  ios_base::sync_with_stdio(false);cin.tie(NULL);
}


int main() {
   fast(); 
   int k,s;
   cin>>k>>s;
   int sum=0;
  //int i=s/3;
  
   for(int x=i;x<=min(s,k);x++){
     for(int y=x;y<=min(s,k);y++){
      if(x+y>s){
        x=k+1;
        break;
      }
      for(int z=y;z<=min(s,k);z++){
        if(x+y+z>s){
          x=k+1;
          y=k+1;
          break;
        }
        if(x+y+z==s){
           if(x==y && y==z && x==z){
            sum+=1;
           }else if(x==y || y==z || x==z){
            sum+=3;
           }else{
            sum+=6;
           }
        }
      }
     }
   }
   cout<<sum<<"\n";
   

} 

Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: 'i' was not declared in this scope
   25 |    for(int x=i;x<=min(s,k);x++){
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int K,S;
  cin >> K >> S;
  
  int count = 0;
  for(int x = 0; x <= K; x++){
    for(int y = 0; y <= K; y++){
      int z = S - x - y;
      if(z >= 0 && z <= K){
        count++;
    }
  }
    
    cout << count << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
  int K,S;
  cin >> K >> S;
  
  int count = 0;
  for(int x = 0; x <= K; x++){
    for(int y = 0; y <= K; y++){
      for(int z = 0; z <= K; z++){
        if( (x + y + z) == S){
          count++;
        }
      }
    }
    
    cout << count << endl;
}

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

// lcmとか__builtin_popcountとかはg++ -std=c++17 default.cppみたいなかんじで
 
#include <bits/stdc++.h>
#define mod 1000000007
#define INF 1001001001
#define int long long
#define ln cout<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
using namespace std;
 
int main() {
    cin.tie(0);
   	ios::sync_with_stdio(false);
 
    int a,b,c,d,m,n,maxi=0,f=0,mini=INF,sum=0;
    string str;
    int k;
    cin>>k>>n;
    int v[k+1];
    int w[(k+1)+(k+1)];
    rep(i,k+1){
        v[i]=i;
        //cout<<i<<" ";
    }
    //ln;
    rep(i,k+1){
        rep(j,k+1){
            w[i*(k+1)*j];
           // cout<<v[i]+v[j]<<" ";
        }
    }
    //ln;
    map<int,int> mp;
    rep(i,(k+1)*(k+1)){
        rep(j,k+1){
            mp[w[i]+v[j]]++;
        }
    }
    cout<<mp[n]<<endl;
    
    return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

// lcmとか__builtin_popcountとかはg++ -std=c++17 default.cppみたいなかんじで
 
#include <bits/stdc++.h>
#define mod 1000000007
#define INF 1001001001
#define ll long long
#define ln cout<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
using namespace std;
 
int main() {
    cin.tie(0);
   	ios::sync_with_stdio(false);
 
    ll a,b,c,d,m,n,maxi=0,f=0,mini=INF,sum=0;
    string str;
    ll k;
    cin>>k>>n;
    ll v[k+1];
    vector<ll> w;
    rep(i,k+1){
        v[i]=i;
        //cout<<i<<" ";
    }
    //ln;
    rep(i,k+1){
        rep(j,k+1){
            w.push_back(v[i]+v[j]);
           // cout<<v[i]+v[j]<<" ";
        }
    }
    //ln;
    map<ll,ll> mp;
    rep(i,(k+1)*(k+1))){
        rep(j,k+1){
            mp[w[i]+v[j]]++;
        }
    }
    cout<<mp[n]<<endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:23: error: expected primary-expression before ')' token
   37 |     rep(i,(k+1)*(k+1))){
      |                       ^
Language: C++

// lcmとか__builtin_popcountとかはg++ -std=c++17 default.cppみたいなかんじで
 
#include <bits/stdc++.h>
#define mod 1000000007
#define INF 1001001001
#define ll long long
#define ln cout<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
using namespace std;
 
int main() {
    cin.tie(0);
   	ios::sync_with_stdio(false);
 
    ll a,b,c,d,m,n,maxi=0,f=0,mini=INF,sum=0;
    string str;
    ll k;
    cin>>k>>n;
    ll v[n+1];
    vector<ll> w;
    rep(i,k+1){
        v[i]=i;
        //cout<<i<<" ";
    }
    //ln;
    rep(i,v.size()){
        rep(j,v.size()){
            w.push_back(v[i]+v[j]);
           // cout<<v[i]+v[j]<<" ";
        }
    }
    //ln;
    map<ll,ll> mp;
    rep(i,w.size()){
        rep(j,v.size()){
            mp[w[i]+v[j]]++;
        }
    }
    cout<<mp[n]<<endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: request for member 'size' in 'v', which is of non-class type 'long long int [(n + 1)]'
   29 |     rep(i,v.size()){
      |             ^~~~
a.cc:10:44: note: in definition of macro 'REP'
   10 | #define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
      |                                            ^
a.cc:29:5: note: in expansion of macro 'rep'
   29 |     rep(i,v.size()){
      |     ^~~
a.cc:30:17: error: request for member 'size' in 'v', which is of non-class type 'long long int [(n + 1)]'
   30 |         rep(j,v.size()){
      |                 ^~~~
a.cc:10:44: note: in definition of macro 'REP'
   10 | #define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
      |                                            ^
a.cc:30:9: note: in expansion of macro 'rep'
   30 |         rep(j,v.size()){
      |         ^~~
a.cc:38:17: error: request for member 'size' in 'v', which is of non-class type 'long long int [(n + 1)]'
   38 |         rep(j,v.size()){
      |                 ^~~~
a.cc:10:44: note: in definition of macro 'REP'
   10 | #define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
      |                                            ^
a.cc:38:9: note: in expansion of macro 'rep'
   38 |         rep(j,v.size()){
      |         ^~~
Language: C++

#include <vector>
#include <algorithm>
#include <cmath>
typedef long long ll;
#define rep(i,n) for(int i = 0;i<n;++i)
#define repi(itr,vec) for(auto itr = vec.begin();itr!=vec.end();++itr)
using namespace std;
int main(){
        ios::sync_with_stdio(false);
        cin.tie(nullptr);

  ll k, s;
  cin >> k >> s;
  ll ans = 0;
  rep(i, k+1){
    ll yz = s-i;
    if(yz>=0){
      ll temp = min(yz, k)-max(yz-k,(ll)0)+1;
      if(temp>0) ans+=temp;
      else continue;
      
    }
    else{
      break;
    }
  }
  cout << ans << '\n';
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'ios' has not been declared
    9 |         ios::sync_with_stdio(false);
      |         ^~~
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin.tie(nullptr);
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <cmath>
  +++ |+#include <iostream>
    4 | typedef long long ll;
a.cc:27:3: error: 'cout' was not declared in this scope
   27 |   cout << ans << '\n';
      |   ^~~~
a.cc:27:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int K,S
  cin >> K >> S;
  int C = 0
  for (int i = 0; i < K; i++) {
    for (int j = 0; j < K; j++){
      for(int k = 0; k < K; k++){
        if(i+j+k == S){
          C++;
        }
      }
    }
  }
    cout << C << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> K >> S;
      |   ^~~
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for (int i = 0; i < K; i++) {
      |   ^~~
a.cc:8:19: error: 'i' was not declared in this scope
    8 |   for (int i = 0; i < K; i++) {
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  cin >> K >> S;
  int C = 0
  for (int i = 0; i < K; i++) {
    for (int j = 0; i < K; j++){
      for(int k = 0; i < K; k++){
        if(i+j+k == S){
          C++;
        }
      }
    }
  }
    cout << C << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'K' was not declared in this scope
    5 |   cin >> K >> S;
      |          ^
a.cc:5:15: error: 'S' was not declared in this scope
    5 |   cin >> K >> S;
      |               ^
a.cc:7:3: error: expected ',' or ';' before 'for'
    7 |   for (int i = 0; i < K; i++) {
      |   ^~~
a.cc:7:19: error: 'i' was not declared in this scope
    7 |   for (int i = 0; i < K; i++) {
      |                   ^
Language: C++

#include<iostream>
using namespace std;
int main()
{  int n,s;
  cin>>n>>s;
 long int cnt=0;
 for(int i=0;i<=n;i++)
 {  int t1=s-i;
  if(t1>2*n)
      continue;
   for(int j=0;j<=n;j++)
    {  int t2=t1-j;
       if(t2>n)
           coninue;
     for(int k=0;k<=n;k++)
         {  if(i+j+k==s)
        cnt++;
         }
    }
 }
 cout<<cnt;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'coninue' was not declared in this scope
   14 |            coninue;
      |            ^~~~~~~
Language: C++

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

int main() {
  int k,s,ans=0;
  cin >> k >> s;
  for ( int i=0 ; i<=k ; i++){
    for (int j=0 ; j<=k ; i++){
      for (int l=0 ; l<=k ; l++){
        if ( i+j+l==s){
          ans++;
      }
    }
  }
           cout << ans << endl;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 's' was not declared in this scope
   10 |         if(i+k+j==s) ans++;
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    int k,s;
    int ans = 0;
    cin >> k >> s;
    for(int i=0;i<=n;i++) for(int j=0;j<=n;j++) for(int k=0;k<=n;k++) if(i+j+k==s) ans++;
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'n' was not declared in this scope
    7 |     for(int i=0;i<=n;i++) for(int j=0;j<=n;j++) for(int k=0;k<=n;k++) if(i+j+k==s) ans++;
      |                    ^
Language: C++

#include <math.h>

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

int main() {
    // int n;
    // cin >> n;
    // int a[n];
    // sort(a, a + n);
    // int len = 0;
    // for (int i = 0; i < n; i++) cin >> a[i];
    // for (int i = 0; i < n; i++) {
    //     for (int j = i + 1; j < n; j++) {
    //         for (int k = j + 1; k < n; k++) {
    //             if (a[i] + a[j] > a[k]) len = max(len, a[i] + a[j] + a[k]);
    //         }
    //     }
    // }
    // cout << len << endl;

    // int n;
    // cin >> n;
    // int x[n], y[n];
    // double dist = 0.0;
    // for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
    // for (int i = 0; i < n; i++) {
    //     for (int j = i + 1; j < n; j++) {
    //         dist = max(dist, sqrt(pow(x[i] - x[j], 2) + pow(y[i] - y[j],
    //         2)));
    //     }
    // }
    // cout << dist << endl;

    int k, s;
    cin >> k >> s;
    int count = 0;
    for (int x = 0; x <= k; x++) {
        for (int y = 0; y <= k; y++) {
            if(s-x-y<=k)
        }
    }
    cout << count << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:9: error: expected primary-expression before '}' token
   42 |         }
      |         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    cin >> K >> S;
    int ans =0;
    int num = 0;

    for(int i=0;i<K;i++){
        for(int j=0;j<K;j++){
            for(int k=0;k<K;k++){
                num = i + j + k;
                if (num == S){
                    ans +=1;
                }
            }
        }
    }
    cout << ans << endl;

}

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

#include<iostream>
using namepsace std;

int main(){
    cin >> K >> S;
    int ans =0;
    int num = 0;

    for(int i=0;i<K;i++){
        for(int j=0;j<K;j++){
            for(int k=0;k<K;k++){
                num = i + j + k;
                if (num == S){
                    ans +=1;
                }
            }
        }
    }
    cout << ans << endl;

}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepsace'
    2 | using namepsace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> K >> S;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:12: error: 'K' was not declared in this scope
    5 |     cin >> K >> S;
      |            ^
a.cc:5:17: error: 'S' was not declared in this scope
    5 |     cin >> K >> S;
      |                 ^
a.cc:19:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |     cout << ans << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |     cout << ans << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include <stdio.h>
 
int main(void){
 
  long long K,S,i,j,k;
  long long count = 0;
  scanf("%lld %lld",&K,&S);
  
  for(i=0;i<K;i++){
  	for(j=0;j<K;j++){
  		for(k=0;k<K;k++){
    		if(i+j+k==S){
      			count++;
    		}
  		}
  	}
  }
  
  prinyf("%d",count);
  return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:19:3: error: implicit declaration of function 'prinyf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   19 |   prinyf("%d",count);
      |   ^~~~~~
      |   printf
Language: C++

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

int main(){
  int k, s, sum=0;
  cin >> k >> s;
  
  for(int x=0; x <= k; x++){
    if(x > s) break;
    for(int y=0; y <= k; y++){
      if((x+y) > s) break;
      if((s-x+y) <= k)) sum++;
    }
  }
  cout << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: expected primary-expression before ')' token
   12 |       if((s-x+y) <= k)) sum++;
      |                       ^
Language: C++

#include <bits/stdc++.h>

int main() {
  int S,K,sum=0; cin>>K>>S;
  for(int i=0; i<=K; i++) for(int j=0; j<=K; j++) {
  	if(0 <= S-i-j && S-i-j <= K) sum++;
  }
  cout<<sum<<endl;
}


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

#include <bits/stdc++/h>

int main() {
  int S,K,sum=0; cin>>K>>S;
  for(int i=0; i<=K; i++) for(int j=0; j<=K; j++) {
  	if(0 <= S-i-j && S-i-j <= K) sum++;
  }
  cout<<sum<<endl;
}


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

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

int main(){
  int k, s, sum=0;
  cin >> k >> s;
  
  for(int x=0; x < s; x++){
    if((x+y+z) > s) break;
    for(int y=0; y < s; y++){
      if((x+y+z) > s) break;
      for(int z=0; z < s; z++){
        if((x+y+z) > s) break;
        if((x+y+z) == z) sum++;
      }
    }
  }
  cout << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'y' was not declared in this scope
    9 |     if((x+y+z) > s) break;
      |           ^
a.cc:9:13: error: 'z' was not declared in this scope
    9 |     if((x+y+z) > s) break;
      |             ^
a.cc:11:15: error: 'z' was not declared in this scope
   11 |       if((x+y+z) > s) break;
      |               ^
Language: C++

k, s = map(int, input().split())

#.
ans = 0

#.
for x in range(k+1):
    for y in range(k+1):
        #.
        des_v = s - x - y

        #.
        if des_v >= 0 and des_v <= k:
            ans += 1

print(ans)

Compiler output:
a.cc:3:2: error: invalid preprocessing directive #.
    3 | #.
      |  ^
a.cc:6:2: error: invalid preprocessing directive #.
    6 | #.
      |  ^
a.cc:9:10: error: invalid preprocessing directive #.
    9 |         #.
      |          ^
a.cc:12:10: error: invalid preprocessing directive #.
   12 |         #.
      |          ^
a.cc:1:1: error: 'k' does not name a type
    1 | k, s = map(int, input().split())
      | ^
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#include <utility> 
typedef long long int lli;
using namespace std;
 int main(){
    int w,h,n;
    cin >> w >> h >> n;
    int max_x=w;
    int min_x=0;
    int max_y=h;
    int min_y=0;
 
    for(LL i=0; i<n; i++){
        cin >> x >> y >> a;
        if(a==1){
            min_x=max(min_x,x);
        }else if(a==2){
            max_x=min(max_x,x);
        }else if(a==3){
            min_y=max(min_y,y);
        }else{
            max_y=min(max_y,y);
        }
    }
 

     return 0;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'LL' was not declared in this scope
   14 |     for(LL i=0; i<n; i++){
      |         ^~
a.cc:14:17: error: 'i' was not declared in this scope
   14 |     for(LL i=0; i<n; i++){
      |                 ^
a.cc:15:16: error: 'x' was not declared in this scope
   15 |         cin >> x >> y >> a;
      |                ^
a.cc:15:21: error: 'y' was not declared in this scope
   15 |         cin >> x >> y >> a;
      |                     ^
a.cc:15:26: error: 'a' was not declared in this scope
   15 |         cin >> x >> y >> a;
      |                          ^
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int k = scn.nextInt();
		int s = scn.nextInt();
      	int count = 0;
      	for(int x=0; x<=k; ++x){
        	for(int y=0; y<=K; ++y){
	    		if(s>=x+y && s-(x+y)<=k){
            		count = count + 1;
           		}
        	}
    	}
      	System.out.println(count);
	}
}


Compiler output:
Main.java:10: error: cannot find symbol
        	for(int y=0; y<=K; ++y){
        	                ^
  symbol:   variable K
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int k = scn.nextInt();
		int s = scn.nextInt();
      	int count = 0;
      	for(int x=0; x<=k; ++x){
        	for(int y=0; y<=K; ++y){
	    		if(s>=x+y && s-(x+y)<=k){
            		count = count + 1
           		}
        	}
    	}
      	System.out.println(count);
	}
}


Compiler output:
Main.java:12: error: ';' expected
            		count = count + 1
            		                 ^
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int k = scn.nextInt();
		int s = scn.nextInt();
      	int count = 0;
      	for(int x=0; x<=k; ++x){
        	for(int y=0; y<=K; ++y){
	    		if(s>=x+y && s-(x+y)<=k){
            		count = count + 1
           		}
        	}
    	}
      	System.out.println(count);
	}
}

Compiler output:
Main.java:12: error: ';' expected
            		count = count + 1
            		                 ^
1 error
Language: C++

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

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

int main(){
  int K,S;
  cin >> K >> S;
  int ans = 0;
  for(int i = 0;i < K+1;i++){
    for(int j = 0;j < K + 1;j++){
      if(S-i-j >= 0 && S-i-j <=K){
        ans++;
      }
    }
  }
  printf("%d\n",ans);
}
  
  int K,S;
  cin >> K >> S;
  int ans = 0;
  for(int i = 0;i < K+1;i++){
    for(int j = 0;j < K + 1;j++){
      if(S-i-j >= 0){
        ans++;
      }
    }
  }
  print("%d\n",ans);
}
  
  

Compiler output:
a.cc:23:3: error: 'cin' does not name a type
   23 |   cin >> K >> S;
      |   ^~~
a.cc:25:3: error: expected unqualified-id before 'for'
   25 |   for(int i = 0;i < K+1;i++){
      |   ^~~
a.cc:25:17: error: 'i' does not name a type
   25 |   for(int i = 0;i < K+1;i++){
      |                 ^
a.cc:25:25: error: 'i' does not name a type
   25 |   for(int i = 0;i < K+1;i++){
      |                         ^
a.cc:32:8: error: expected constructor, destructor, or type conversion before '(' token
   32 |   print("%d\n",ans);
      |        ^
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected '(' before 'else'
   10 |     if else(i+j+a>=b){
      |        ^~~~
      |        (
Language: C++

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


Compiler output:
a.cc:16:3: error: 'cout' does not name a type
   16 |   cout << count << endl;
      |   ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C

#include <bits/stdc++.h>
using namespace std;
int three_dist(int x, int y ,int z)
{
    int r=0;
    if(x != y) r++;
    if(x != z) r++;
    if(z != y) r++;
    return r;
}
int main()
{
    double c=0;
    int k ,s;
    cin >> k >> s;
    if (k>=s)
        for (int i=0 ,j=s; i<s; --j ,i++)
        {
            c += 3;
            if (i > 1)
            {
                if (i%2 == 1)
                    c += 3;
                c += (((i/2)-1)*6);
            }
        }
    else
    {
        int small = (s - 2*k);
        for (int i=(small<0 ? 0 :small); i<=k; i++)
        {
            int y = s-i;
            for (int u = y-k; u<=y/2; u++)
            {
                cout << i<<"    "<< u<<"    "<< y-u<<"    \n";
                if (three_dist(i , u ,y-u) == 2)
                    c += 1.5;
                else if (three_dist(i , u ,y-u) == 3)
                    c += 2;
            }
        }
    }
    if (s%3 == 0 && s/3 <= k)
        c++;
    cout << (s ? c : 1);
    return 0;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

//3重ループだと2500^3=1.5625*10^10で間に合わない
//２つの文字の値が決まれば残りの文字の値が１つに決まる
//2500^2=6.25*10^6で間に合う

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

int main(){
  int k , s;
  cin >> k >> s;
  int count =0;
  
  for(int i=0;i<=k;i++){
    for(int j=0;j<=k;j++){
      if((3k-i-j)>=0&&(3k-i-j)<=k) count++;
    }
  }
  
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: fixed-point types not supported in C++
   15 |       if((3k-i-j)>=0&&(3k-i-j)<=k) count++;
      |           ^~
a.cc:15:24: error: fixed-point types not supported in C++
   15 |       if((3k-i-j)>=0&&(3k-i-j)<=k) count++;
      |                        ^~
Language: C

#include<stdio.h>

int main(){
  
  int K, S, Sum = 0;
  scanf("%d%d",&K,&S);
  
  for(int i=0; i<=K; i++){
    for(int j=0; j<=K; j++){
      if(S-i-j<=K && S-i-j >= 0) Sum++;
    }
  }
  pritnf("%d¥n", Sum);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:3: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   13 |   pritnf("%d¥n", Sum);
      |   ^~~~~~
      |   printf
Language: C

#include<stdio.h>

int main(){
  
  int K, S, Sum = 0;
  scanf("%d%d",&K,&S);
  
  for(int i=0; i<=K; i++){
    for(int j=0; j<=K; j++){
      if(S-i-j<=K && S-i-j >= 0) Sum++;
    }
  }
  cout << Sum << endl;
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:3: error: 'cout' undeclared (first use in this function)
   13 |   cout << Sum << endl;
      |   ^~~~
main.c:13:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:18: error: 'endl' undeclared (first use in this function)
   13 |   cout << Sum << endl;
      |                  ^~~~
Language: C++

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

int main(){
  int K,S;
  cin>>K>>S;
  int i = 0;
  int j = 0;
  for(int x = 0;x <= K;x++){
    for(int y = 0;y <= K;y++){
      for(int z = 0;z <= K;z++){
         j = x + y + z;
        if(j == S){
          i++;
          break;
      }
      j = 0;
    }
  }
  cout<<i<<endl;
}

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

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

int main(){
  int K,S;
  cin >> K >> S;
  
  int cnt =0,s=S;
  for(int i=0;i<=K;i++){
    S=s;
    if(S>3*K){
      break;
    }
    S -=i;
    if(S>2*K){
      continue;
    }
    if(S>K){
      cnt +=2*K-S+1;
    }
    if(S<=K){
      cnt +=S+1;
    }
    cout << cnt <<endl;
  }

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

#include<iostream>
using namespace std;
int main(){
    int K, S, count = 0;
    cin >> K >> S;
    for(int X = 0; X <= K; X++){
        for(int Y = 0; Y <= K ; Y++){
            Z = S - X - Y;
            if(Z <= K) count++;
        }
    }
    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'Z' was not declared in this scope
    8 |             Z = S - X - Y;
      |             ^
Language: C++

#include <iostream>

using namespace std;

int main()	{
  int k, s;
  cin >> k >> s;
  int count = 0;
  for (int x = 0; x <= k; x++)
    for (int y = 0; y <= k; y++)	{
      int z = s - x - y;
      if (z >= 0 && z <= k)	{
        count++;
      }
    }
  cout << count << endl;
  return 0;

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

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

  
int main() {
  int k,s;
  cin >> k>>s;
 
  
  int count=0;
  for(int x=0; x<k+1; x++){
    for(int y=0; y<k+1; y++){
      if (s-x-y>=0 && S-x-y<=K) count++;
    }
  }
  
  cout << count  << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: 'S' was not declared in this scope
   13 |       if (s-x-y>=0 && S-x-y<=K) count++;
      |                       ^
a.cc:13:30: error: 'K' was not declared in this scope
   13 |       if (s-x-y>=0 && S-x-y<=K) count++;
      |                              ^
Language: C++

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

  
int main() {
  int k,s;
  cin >> k>>s;
 
  
  int count=0;
  for(int x=0; x<k+1; x++){
    for(int y=0; y<k+1; y++){
      if (s-sum>=0 && S-sum<=K) count++;
    }
  }
  
  cout << count  << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'sum' was not declared in this scope
   13 |       if (s-sum>=0 && S-sum<=K) count++;
      |             ^~~
a.cc:13:23: error: 'S' was not declared in this scope
   13 |       if (s-sum>=0 && S-sum<=K) count++;
      |                       ^
a.cc:13:30: error: 'K' was not declared in this scope
   13 |       if (s-sum>=0 && S-sum<=K) count++;
      |                              ^
Language: C++


int main() {
	int K, S;
	cin >> K;
	cin >> S;
	int cont = 0;

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

		for (int j = 0; j<=K; j++) {
			int z = S - i - j;
			if (z>= 0 && z <= K) {
				++cont;
			}
		
		}
	}
	cout << cont << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> K;
      |         ^~~
a.cc:18:9: error: 'cout' was not declared in this scope; did you mean 'cont'?
   18 |         cout << cont << endl;
      |         ^~~~
      |         cont
a.cc:18:25: error: 'endl' was not declared in this scope
   18 |         cout << cont << endl;
      |                         ^~~~
Language: C++

#include<bits/stdc++.h>
#define PI acos(-1.0)
#define eps 1e-67
#define pf printf
#define sf scanf
#define sd(n) scanf("%d",&n)
#define sd2(n1,n2) scanf("%d %d",&n1,&n2)
#define slf(n) scanf("%lf",&n)
#define slf2(n1,n2) scanf("%lf %lf",&n1,&n2)
#define sLf(n1) scanf("%Lf",&n1)
#define sLf2(n1,n2) scanf("%Lf %Lf",&n1,&n2)
#define sl(n) scanf("%lld",&n)
#define sl2(n1,n2) scanf("%lld %lld",&n1,&n2)
#define rep(i,a,b) for(long long int i=a;i<b;i++)
#define repb(i,a,b) for(long long int i=a;i>=b;i--)
#define repa(i,a,b,c) for(long long int i=a;i<b;i=i+c)
#define reps(i,a,b,c) for(long long int i=a;i>b;i=i-c)
#define asort(a) sort(a.begin(),a.end())
#define asortb(a,comp) sort(a.begin(),a.end(),comp)
#define arev(a) reverse(a.begin(),a.end())
#define all(v) (v).begin(),(v).end()
#define allc(v,comp) (v).begin(),(v).end(),comp
#define allrc(v,a,b,comp) (v).begin()+a,(v).end()-b,comp
#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define pbb pop_back
#define mp make_pair
#define mt make_tuple
#define bs(v,x) binary_search(v.begin(),v.end(),x)
#define lb(v,x) lower_bound(v.begin(),v.end(),x)
#define ub(v,x) upper_bound(v.begin(),v.end(),x)
#define tl(c) towlower(c)
#define root(x) sqrt(x)
#define power(a,n) pow(a,n)
#define tu(c) towupper(c)
#define sq(a) ((a)*(a))
#define cube(a) ((a)*(a)*(a))
#define mx 1000
#define MX 100000

using namespace std;

typedef string str;
typedef long long int ll;
const ll mod=1000000007;
typedef double lf;
typedef long double llf;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int,int> pi;
typedef pair<ll,ll> pll;
typedef vector<pll> vpll;
typedef char ch;
typedef map<ll,ll> mpl;


int main()
{
    ll k,s,i,j,c=0;
    cin>>k>>s;
    rep(i,0,k){
       rep(j,o,k)
       {
          if((s-i-j)<=k && (s-i-j)>=0){
            c++;
          }      
       }
    }
    cout<<c<<endl;
     return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:14: error: 'o' was not declared in this scope
   65 |        rep(j,o,k)
      |              ^
a.cc:14:40: note: in definition of macro 'rep'
   14 | #define rep(i,a,b) for(long long int i=a;i<b;i++)
      |                                        ^
Language: C++

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

void solve(long long K, long long S)
{
    long long cnt = 0;
    vector<long long> S_Z(K, 0);

    for (long long i = 0; i <= K; i++)
    {
        for (long long j = i; j <= K; j++)
        {
            for (long long k = j; k <= K; k++)
            {
                if (i + j + k == S)
                {
                    if (i == j && j == k)
                        cnt++;
                    else if (i == j || j == k || i == k)
                        cnt += 3;
                    else
                        cnt += 6

                            break;
                }
            }
        }
    }
    cout << cnt << endl;
}

// Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main()
{
    long long K;
    scanf("%lld", &K);
    long long S;
    scanf("%lld", &S);
    solve(K, S);
    return 0;
}


Compiler output:
a.cc: In function 'void solve(long long int, long long int)':
a.cc:22:33: error: expected ';' before 'break'
   22 |                         cnt += 6
      |                                 ^
      |                                 ;
   23 | 
   24 |                             break;
      |                             ~~~~~
Language: C++

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

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); 
int k,s; cin >> k >> s;
int ans{};

for(int i{}; i<=k; ++i){
	for(int j{}; j<=k; ++j){
		int z = s-i-j;
		if(0<=z && z<=k){
			ans+=1;
		}
	}
}

cout << ans << "\n";





 return 0;
}


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

//三重ループはTLEでした。
#include <bits/stdc++.h>
using namespace std;
 
int main() {
int k,s;
  cin >>k>>s;
int count=0;

  for(int i=0;i <=k;i++){
  for(int j=0;j <=k;j++){
  int m=s-i-j;
   if(i+j+m==s && i <=k &&i >=0){
   count++;}
   }
  }
 }
  cout <<count <<endl;
}

Compiler output:
a.cc:18:3: error: 'cout' does not name a type
   18 |   cout <<count <<endl;
      |   ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int k,s;
  cin >> k >> s;
  int count=0;
  for(int i=0;i<=k;i++){
    for(int j=0;j<=k;j++){
        if(0<=s-i-j<=k)count++;
      }
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc:13:3: error: 'cout' does not name a type
   13 |   cout << count << endl;
      |   ^~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> k >> s;
  int count=0;
  for(int i=0;i<=k;i++){
    for(int j=0;j<=k;j++){
      for(int h=0;h<=k;h++){
        if(s==i+j+h){
          count++;
        }
      }
    }
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'k' was not declared in this scope
    5 |   cin >> k >> s;
      |          ^
a.cc:5:15: error: 's' was not declared in this scope
    5 |   cin >> k >> s;
      |               ^