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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxx = 1e5 + 7;
const int Inf = 1 << 30;
ll n, k;
ll ans;

int main() {
	cin >> n >> k;
	if(!k) ans = n * n;
	else {
		ans += (1 + n - k) * (n - k) / 2;
		for(ll b = k + 1; b <= n; b++) { //被模的数
			for(ll r = k; r < b; r++) { //枚举余数
				ll tmp = (n - r) / b;
				if(!tmp) break;
				ll dd = n - tmp * b
				dd = min(dd, b - 1);
				ans += tmp * (dd - r + 1);
				r = dd;
			}
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:33: error: expected ',' or ';' before 'dd'
   19 |                                 dd = min(dd, b - 1);
      |                                 ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxx = 1e5 + 7;
const int Inf = 1 << 30;
ll n, k;
ll ans;

int main() {
	cin >> n >> k;
	if(!k) ans = n * n;
	else {
		ans += (1 + n - k) * (n - k) / 2;
		for(ll b = k + 1; b <= n; b++) { //被模的数
			for(ll r = k; r < b; r++) { //枚举余数
				ll tmp = (n - r) / b;
				if(!tmp) break;
				int dd = n - tmp * b
				dd = min(dd, b - 1);
				ans += tmp * (dd - r + 1);
				r = dd;
			}
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:33: error: expected ',' or ';' before 'dd'
   19 |                                 dd = min(dd, b - 1);
      |                                 ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	long n,k;
	cin>>n>>k;
	long sum=0;
	if(k==0){
	    cout<<n*n;
	    return 0;
	}
	for(int i=k+1; i<=n; i++){
	    sum+=(n/i)*(i-k);
	    sum+=max(n%i-k+1,0);
	}
	cout<<sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: no matching function for call to 'max(long int, int)'
   13 |             sum+=max(n%i-k+1,0);
      |                  ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:13:21: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   13 |             sum+=max(n%i-k+1,0);
      |                  ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:13:21: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   13 |             sum+=max(n%i-k+1,0);
      |                  ~~~^~~~~~~~~~~
Language: C++

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

typedef long long ll;
typedef pair<int, int> P;

int MOD = 1e9 + 7;
ll INF = 1e18;

int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};

int main(){
    ll n, k; cin>>n>>k;

    if(k == 0){
        cout << n*n << endl;
        return 0;
    }

    ll ans=0;
    for(ll i=k+1; i<=n; i++){
        ans += (n / i) * (i - k);
        ans += max(0, (n % i) - k + 1);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:19: error: no matching function for call to 'max(int, ll)'
   24 |         ans += max(0, (n % i) - k + 1);
      |                ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:24:19: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   24 |         ans += max(0, (n % i) - k + 1);
      |                ~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:24:19: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   24 |         ans += max(0, (n % i) - k + 1);
      |                ~~~^~~~~~~~~~~~~~~~~~~~
Language: Java

/*
 * 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.
 */
// package codeforces;

import java.util.Scanner;

/**
 *
 * @author Admin
 */
public class Pyiotan {
    public static void main(String[] args) {
        int n, k;
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        k = sc.nextInt();
        long ans = 0;
        for (int i = k+1; i <= n; ++i) {
            ans += n/i*(i-k) + (n%i-k+1 >= 0 ? n%i-k+1 : 0);
        }
        if (k == 0) {
            ans = (long) n*n;
        }
        System.out.println(ans);
    }
}

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

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

typedef pair<int, int> Pii;

void readint(int N, vector<int> &a);
void readdouble(int N, vector<double> &a);
void readindex(int N, vector<int> &a);



signed main(){

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

    int ans = 0;

    REP(b, K + 1, N + 1){
        int p = (N - 1) / b;
        ans += (b - K) * p;
        int r = N % b;
        ans += max(0, r - K + 1);
        if(K == 0) ans--;
    }
    

    cout << ans;

    return 0;
}








void readint(int N, vector<int> &a){
    string s;
    for(int i = 0; i < N - 1; i++){
        getline(cin, s, ' ');
        a[i] = atoi(s.c_str());
    }
    getline(cin, s, '\n');
    a[N - 1] = atoi(s.c_str());
}
void readdouble(int N, vector<double> &a){
    string s;
    for(int i = 0; i < N - 1; i++){
        getline(cin, s, ' ');
        a[i] = atof(s.c_str());
    }
    getline(cin, s, '\n');
    a[N - 1] = atof(s.c_str());
}
void readindex(int N, vector<int> &a){
    string s;
    for(int i = 0; i < N - 1; i++){
        getline(cin, s, ' ');
        a[i] = atoi(s.c_str()) - 1;
    }
    getline(cin, s, '\n');
    a[N - 1] = atoi(s.c_str()) - 1;
}

Compiler output:
a.cc:22:24: error: macro "REP" passed 3 arguments, but takes just 2
   22 |     REP(b, K + 1, N + 1){
      |                        ^
a.cc:3:9: note: macro "REP" defined here
    3 | #define REP(i, n) FOR(i,0,n)
      |         ^~~
a.cc: In function 'int main()':
a.cc:22:5: error: 'REP' was not declared in this scope
   22 |     REP(b, K + 1, N + 1){
      |     ^~~
Language: C++

#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <typeinfo>
#include <numeric>
#include <functional>
#include <unordered_map>
#include <bitset>
 
 
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
 
 
const ll INF = 1e16;
const ll MOD = 1e9 + 7;
 
#define REP(i, j, k) for(ll i = j; i < k; i++)
#define PRINT(i) cout << i << endl;
#define PRINT2(i,j) cout << i << " " << j << endl;
 
int
main(void){
  int n, k;
  cin >> n >> k;
  if(k == 0){cout << n*n << endl; return 0;}
 
  ll sum = 0L;
  //loop for b
  REP(i, k-1, n+1){
    ll q = n/i;
    sum += q*max(0, (int)i-k);
    
    //ll r = n-q*i;
    ll r = n%b;
    if(r >= k){
      sum += r-k+1;
    }
    //cout << "r:" << r << " q:" << q << endl;    
    //PRINT2(i, sum);    
  }
  
  PRINT(sum);
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:14: error: 'b' was not declared in this scope
   46 |     ll r = n%b;
      |              ^
Language: C++

#include <iostream>
#include <vector>

int main() {
  long long int N, K;
  std::cin >> N >> K;

  if (K == 0) {
    std::cout << N * N << std::endl;
    return 0;
  }

  long long int answer = 0;

  for (int b = K+1; b <= N; b++) {
    const int p = N / b;
    const int r = N % b;

    answer += p * std::max(0, b - K);
    answer += std::max(0, r - K + 1);
  }

  std::cout << answer << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:27: error: no matching function for call to 'max(int, long long int)'
   19 |     answer += p * std::max(0, b - K);
      |                   ~~~~~~~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:19:27: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   19 |     answer += p * std::max(0, b - K);
      |                   ~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
a.cc:20:23: error: no matching function for call to 'max(int, long long int)'
   20 |     answer += std::max(0, r - K + 1);
      |               ~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:20:23: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   20 |     answer += std::max(0, r - K + 1);
      |               ~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <iostream>
#include <vector>

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

  if (K == 0) {
    std::cout << N * N << std::endl;
    return 0;
  }

  long long int answer = 0;

  for (int b = K+1; b <= N; b++) {
    const int p = N / b;
    const int r = N % b;

    answer += p * std::max(0LL, b - K);
    answer += std::max(0LL, r - K + 1);
  }

  std::cout << answer << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:27: error: no matching function for call to 'max(long long int, int)'
   19 |     answer += p * std::max(0LL, b - K);
      |                   ~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:19:27: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   19 |     answer += p * std::max(0LL, b - K);
      |                   ~~~~~~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
a.cc:20:23: error: no matching function for call to 'max(long long int, int)'
   20 |     answer += std::max(0LL, r - K + 1);
      |               ~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:20:23: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   20 |     answer += std::max(0LL, r - K + 1);
      |               ~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <iostream>
using namespace std;
typedef long long ll;
ll n, k;
ll res;
int main(void){
    // Your code here!
    cin >> n >> k;
    if (k == 0) {
        cout << n * n << endl;
        return 0;
    }
    for (int i = k + 1; i <= n; i++) {
        res += n / i * (i - k) + max(0, n % i - k + 1);
    }
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:37: error: no matching function for call to 'max(int, ll)'
   14 |         res += n / i * (i - k) + max(0, n % i - k + 1);
      |                                  ~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:14:37: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   14 |         res += n / i * (i - k) + max(0, n % i - k + 1);
      |                                  ~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <cmath>
#include <sstream>
#include <iomanip>
using namespace std;

int main(void) {

	//string s1,s2,s3;
	long long N = 0, K = 0;
	cin >> N >> K;
	long long res=0;

	bool flag = false;

	long long length = 0;
	long long al = (K-1);
	if (K == 0) {
		res = N*N;
	}
	else {


		for (int b = (K + 1); b <= N; b++) {
			//cout << "K=" <<b << endl;
			while (length < N - K + 1) {
				length += al;
				//cout << res << endl;
				if (length > N - (K - 1)) { flag = true; break; }
				res += al;
				length += K;
				//cout << res << endl;
			}

			if (flag == true) {
				res += al-(length - (N-1));
				//cout << length - (N - 1) << endl;
				flag = false;
			}

			al++;
			length = 0;

		}

		}

		cout << res << endl;

	return 0;




}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> N >> K;
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <iomanip>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:47:17: error: 'cout' was not declared in this scope
   47 |                 cout << res << endl;
      |                 ^~~~
a.cc:47:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
#include <algorithm>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <vector>
typedef long long ll;

using namespace std;

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

    if (K == 0){
	cout << N*N << endl;
	return 0;
    }

    ll res = 0;
    for (ll b = K+1; b <= N; b++){
	ll as = b-K;
	ll f = (N/b)*b+K;

	res += (N/b)*as+max(0, N-f+1);
    }

    cout << res << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:28: error: no matching function for call to 'max(int, ll)'
   26 |         res += (N/b)*as+max(0, N-f+1);
      |                         ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:26:28: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   26 |         res += (N/b)*as+max(0, N-f+1);
      |                         ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:26:28: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   26 |         res += (N/b)*as+max(0, N-f+1);
      |                         ~~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <numeric>
#include <map>
#include <utility>
using namespace std;
#define ll long long
#define rep(i,l,r) for(ll i=(l);i<(r);i++)
int main(void){
    ll n,k,cnt=0;
    cin>>n>>k;
    rep(b,k+1,n+1)cnt+=(n/b)*(b-k)+max(0,n%b-k+1);
    cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:39: error: no matching function for call to 'max(int, long long int)'
   16 |     rep(b,k+1,n+1)cnt+=(n/b)*(b-k)+max(0,n%b-k+1);
      |                                    ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:16:39: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   16 |     rep(b,k+1,n+1)cnt+=(n/b)*(b-k)+max(0,n%b-k+1);
      |                                    ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:16:39: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   16 |     rep(b,k+1,n+1)cnt+=(n/b)*(b-k)+max(0,n%b-k+1);
      |                                    ~~~^~~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <numeric>
#include <map>
#include <utility>
using namespace std;
#define ll long long
#define rep(i,l,r) for(ll i=(l);i<(r);i++)
int main(void){
    ll n,k,cnt=0;
    cin>>n>>k;
    rep(b,k+1,n+1)cnt+=(n/b)*(b-k)+max(0,n%d-k+1);
    cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:44: error: 'd' was not declared in this scope
   16 |     rep(b,k+1,n+1)cnt+=(n/b)*(b-k)+max(0,n%d-k+1);
      |                                            ^
Language: C++

#include <iostream>
#include <algorithm>
#define FOR(i,a,b) for(int i=a;i<b;i++)
int main(){
    int n,k; cin>>n>>k;
    long int ans=0;
    if(k==0){
        FOR(b,k+1,n+1){
            ans+=(n/b)*(b-k)+max(0,n%b-k+1)-1;
        }
    }else{
        FOR(b,k+1,n+1){
            ans+=(n/b)*(b-k)+max(0,n%b-k+1);
        }
    }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     int n,k; cin>>n>>k;
      |              ^~~
      |              std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:30: error: 'max' was not declared in this scope; did you mean 'std::max'?
    9 |             ans+=(n/b)*(b-k)+max(0,n%b-k+1)-1;
      |                              ^~~
      |                              std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:13:30: error: 'max' was not declared in this scope; did you mean 'std::max'?
   13 |             ans+=(n/b)*(b-k)+max(0,n%b-k+1);
      |                              ^~~
      |                              std::max
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     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:16:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |     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<iostream>
using namespace std;

int main(){
	long long int n,k;
	cin>>n>>k;
	long long int a,b,res=0,p=0,r;
	if(k==0){
		res=n*n;
		a=1;
	}
	for(int i=1;i<=n;i++){
		if(a==1)break;
		b=i;
		r=n%b;
		p=n/b;
		res+=p*max(b-k,0);
		//res+=r;
		res+=max(r-k+1,0);
	}
	cout<<res<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: no matching function for call to 'max(long long int, int)'
   17 |                 res+=p*max(b-k,0);
      |                        ~~~^~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:17:27: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   17 |                 res+=p*max(b-k,0);
      |                        ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
a.cc:19:25: error: no matching function for call to 'max(long long int, int)'
   19 |                 res+=max(r-k+1,0);
      |                      ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:19:25: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   19 |                 res+=max(r-k+1,0);
      |                      ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
Language: C

#include<stdio.h>
int main(void) {
	unsigned long n, k, i, j;
	unsigned long cont = 0;
	scanf_s("%lu%lu", &n, &k);
	for (i = 1; i <= n; i++) {
		for (j = 1; j <= n; j++) {
			if (k <= (i % j)) {
				cont += 1;
			}
		}
	}
	printf("%lu", cont);
	return 0;
}

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

#include<stdio.h>
int main(void){
int n,k,i,j;
int cont = 0;
scanf("%d%d",&n,&k);
for(i = 1;i <=n;i++){
for(j=1;j<=n;j++){
if(i %j >= k){
cont += 1;
}
}
}
printf("%d",cont);
return0;
}


Compiler output:
main.c: In function 'main':
main.c:14:1: error: 'return0' undeclared (first use in this function)
   14 | return0;
      | ^~~~~~~
main.c:14:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

/* ----------------------------
 * ABC 90 D
 * ---------------------------- */
#include <iostream>
#include <algorithm>
using namespace std;

using ll long;
int main(){
	ll n, k;
	cin >> n >> k;
	int ans = 0;
	for(ll b = 1; b <= n; ++b){
	for(ll p = 0; k+b*p <= n; ++p){
		ll lb = max(1l, k+b*p);
		ll ub = min(n, b*(p+1) - 1);
		if(lb <= ub) ans+= ub - lb + 1;
	}
	}
	cout << ans << endl;
	return 0;
}
/* わかること */
// k < b である
//
// a % b >= k
// a = pb + q (q >= k)
// q = a - bp (k <= q < b)
// k <= q = a - bp < b
// k + bp <= q + bp = a < b + bp = b*(p + 1)
//


Compiler output:
a.cc:8:7: error: expected nested-name-specifier before 'll'
    8 | using ll long;
      |       ^~
a.cc: In function 'int main()':
a.cc:10:9: error: 'll' was not declared in this scope
   10 |         ll n, k;
      |         ^~
a.cc:11:16: error: 'n' was not declared in this scope
   11 |         cin >> n >> k;
      |                ^
a.cc:11:21: error: 'k' was not declared in this scope
   11 |         cin >> n >> k;
      |                     ^
a.cc:13:15: error: expected ';' before 'b'
   13 |         for(ll b = 1; b <= n; ++b){
      |               ^~
      |               ;
a.cc:13:23: error: 'b' was not declared in this scope
   13 |         for(ll b = 1; b <= n; ++b){
      |                       ^
a.cc:14:15: error: expected ';' before 'p'
   14 |         for(ll p = 0; k+b*p <= n; ++p){
      |               ^~
      |               ;
a.cc:14:27: error: 'p' was not declared in this scope
   14 |         for(ll p = 0; k+b*p <= n; ++p){
      |                           ^
a.cc:15:19: error: expected ';' before 'lb'
   15 |                 ll lb = max(1l, k+b*p);
      |                   ^~~
      |                   ;
a.cc:16:19: error: expected ';' before 'ub'
   16 |                 ll ub = min(n, b*(p+1) - 1);
      |                   ^~~
      |                   ;
a.cc:17:20: error: 'lb' was not declared in this scope
   17 |                 if(lb <= ub) ans+= ub - lb + 1;
      |                    ^~
a.cc:17:26: error: 'ub' was not declared in this scope
   17 |                 if(lb <= ub) ans+= ub - lb + 1;
      |                          ^~
Language: C++

/* ----------------------------
 * ABC 90 D
 * ---------------------------- */
#include <iostream>
#include <algorithm>
using namespace std;

int main(){
	int n, k;
	cin >> n >> k;
	int ans = 0;
	for(long b = 1; b <= n; ++b){
	for(long p = 0; k+b*p <= n; ++p){
		long lb = max(1l, k+b*p);
		long ub = min(n, b*(p+1) - 1);
		if(lb <= ub) ans+= ub - lb + 1;
	}
	}
	cout << ans << endl;
	return 0;
}
/* わかること */
// k < b である
//
// a % b >= k
// a = pb + q (q >= k)
// q = a - bp (k <= q < b)
// k <= q = a - bp < b
// k + bp <= q + bp = a < b + bp = b*(p + 1)
//


Compiler output:
a.cc: In function 'int main()':
a.cc:15:30: error: no matching function for call to 'min(int&, long int)'
   15 |                 long ub = min(n, b*(p+1) - 1);
      |                           ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:15:30: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
   15 |                 long ub = min(n, b*(p+1) - 1);
      |                           ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:15:30: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   15 |                 long ub = min(n, b*(p+1) - 1);
      |                           ~~~^~~~~~~~~~~~~~~~
Language: C++

use std::io::*;
use std::str::FromStr;
use std::cmp::*;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let n: usize = read();
    let k: usize = read();
    let mut ans = 0;
    for b in 1..n+1 {
        if b <= k { continue; }
        let cnt = n / b;
        ans += cnt * (b - k);
        let rest = n - cnt * b;
        if rest >= k {
            ans += rest - (max(1, k) - 1);
        }
    }
    println!("{}", ans);
}

Compiler output:
a.cc:21:14: error: too many decimal points in number
   21 |     for b in 1..n+1 {
      |              ^~~~
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io::*;
      | ^~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::str::FromStr;
      | ^~~
a.cc:3:1: error: 'use' does not name a type
    3 | use std::cmp::*;
      | ^~~
a.cc:5:1: error: 'fn' does not name a type
    5 | fn read<T: FromStr>() -> T {
      | ^~
a.cc:17:1: error: 'fn' does not name a type
   17 | fn main() {
      | ^~
Language: C++

inline long int d() {
  int N;
  int K;
  cin >> N >> K;
  long int count = 0;
  for (int b = K + 1; b <= N; ++b) {
    for (int k = K; k < b; ++k) {
      count += ((N-k)/b + 1);
    }
  }
  if (K == 0) count -= N;
  return count;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << d() << endl;
  return 0;
}

Compiler output:
a.cc: In function 'long int d()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> N >> K;
      |   ^~~
a.cc: In function 'int main()':
a.cc:16:3: error: 'ios' has not been declared
   16 |   ios::sync_with_stdio(false);
      |   ^~~
a.cc:17:3: error: 'cin' was not declared in this scope
   17 |   cin.tie(0);
      |   ^~~
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout << d() << endl;
      |   ^~~~
a.cc:18:18: error: 'endl' was not declared in this scope
   18 |   cout << d() << endl;
      |                  ^~~~
Language: C++

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <sstream>  
#include <stack>
#include <time.h>
#include <vector>
#include <complex>
using namespace std;
int main(){
  int n,k,ans=0;
  cin>>n>>k
  for (int i=k;i<n;i++)
    for (int j=i+1;j<=n;j++)
       ans += (n - i + j - 1) / j;
  if (k == 0)
    ans=n * n;
  cout<<ans;
  system ("pause");
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: expected ';' before 'for'
   18 |   cin>>n>>k
      |            ^
      |            ;
   19 |   for (int i=k;i<n;i++)
      |   ~~~       
a.cc:19:16: error: 'i' was not declared in this scope
   19 |   for (int i=k;i<n;i++)
      |                ^
a.cc:20:20: error: 'j' was not declared in this scope
   20 |     for (int j=i+1;j<=n;j++)
      |                    ^
Language: C++

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <sstream>  
#include <stack>
#include <time.h>
#include <vector>
#include <complex>
using namespace std;
int main(){
  int n,k,ans=0;
  cin>>n>>k
  for (int i=k;i<n;i++)
    for (int j=i+1;j<=n;j++)
       ans += (n - i + j - 1) / j;
  if (k = 0)
    ans=n * n;
  cout<<ans;
  system ("pause");
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:18:12: error: expected ';' before 'for'
   18 |   cin>>n>>k
      |            ^
      |            ;
   19 |   for (int i=k;i<n;i++)
      |   ~~~       
a.cc:19:16: error: 'i' was not declared in this scope
   19 |   for (int i=k;i<n;i++)
      |                ^
a.cc:20:20: error: 'j' was not declared in this scope
   20 |     for (int j=i+1;j<=n;j++)
      |                    ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string.h>
#include <math.h>
typedef long long ll;
#define MAX(x, y)	(((x) > (y))? (x) : (y))
#define MIN(x, y)	(((x) < (y))? (x) : (y))
#define ABS(x)		(((x) < 0)? (-1*(x)) : (x))
#define REP(i,x,y)	for (int (i)=(x);(i)<(y);(i)++)
#define MEMCLR(X)	memset((X),0,sizeof((X)))

using namespace std;
typedef pair<int, int> Point;
typedef vector<vector<Point>> Graph;

int N,K,c;

int main() {
	cin >> N >> K;
	
	REP(i, K, N+1) {
		if (i != 0) 
			c += (N/i)*MAX(0,b-K) + MAX(0,N%i-K+1) - 1;
	}
	
	cout << c;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:42: error: 'b' was not declared in this scope
   25 |                         c += (N/i)*MAX(0,b-K) + MAX(0,N%i-K+1) - 1;
      |                                          ^
a.cc:8:34: note: in definition of macro 'MAX'
    8 | #define MAX(x, y)       (((x) > (y))? (x) : (y))
      |                                  ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string.h>
#include <math.h>
typedef long long ll;
#define MAX(x, y)	(((x) > (y))? (x) : (y))
#define MIN(x, y)	(((x) < (y))? (x) : (y))
#define ABS(x)		(((x) < 0)? (-1*(x)) : (x))
#define REP(i,x,y)	for (int (i)=(x);(i)<(y);(i)++)
#define MEMCLR(X)	memset((X),0,sizeof((X)))

using namespace std;
typedef pair<int, int> Point;
typedef vector<vector<Point>> Graph;

int N,K,c;

int main() {
	cin >> N >> K;
	
	REP(i, K, N+1) REP(j, K, N+1)
	if (j!= 0 && !(i/j)) c++;
	
	cout << c;

	return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string.h>
#include <math.h>
typedef long long ll;
#define MAX(x, y)	(((x) > (y))? (x) : (y))
#define MIN(x, y)	(((x) < (y))? (x) : (y))
#define ABS(x)		(((x) < 0)? (-1*(x)) : (x))
#define REP(i,x,y)	for (int (i)=(x);(i)<(y);(i)++)
#define MEMCLR(X)	memset((X),0,sizeof((X)))

using namespace std;
typedef pair<int, int> Point;
typedef vector<vector<Point>> Graph;

int N,K,c;

int main() {
	cin >> N >> K;
	
	REP(i, K, N+1) REP(j, K, N+1)
	if (j!= 0 && !(i/j)) c++;
	
	cout << c;

	return 0;
}


Compiler output:
a.cc:47:5: error: redefinition of 'int N'
   47 | int N,K,c;
      |     ^
a.cc:18:5: note: 'int N' previously declared here
   18 | int N,K,c;
      |     ^
a.cc:47:7: error: redefinition of 'int K'
   47 | int N,K,c;
      |       ^
a.cc:18:7: note: 'int K' previously declared here
   18 | int N,K,c;
      |       ^
a.cc:47:9: error: redefinition of 'int c'
   47 | int N,K,c;
      |         ^
a.cc:18:9: note: 'int c' previously declared here
   18 | int N,K,c;
      |         ^
a.cc:49:5: error: redefinition of 'int main()'
   49 | int main() {
      |     ^~~~
a.cc:20:5: note: 'int main()' previously defined here
   20 | int main() {
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

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

    ll int ans = 0;

    for(int b = K + 1; b <= N; ++b)
    {
        ans = ans + (N / b) * (b - K);
        if( (N % b - K + 1) > 0)
        {
            ans = ans + (N % b - K + 1);
            if(k == 0)
            {
                --ans;
            }
        }
    }

    cout << ans << endl;

    return 0;
}

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

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

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

    ll int ans = 0;

    for(int b = K + 1; b <= N; ++b)
    {
        ans = ans + (N / b) * (b - K);
        if( (N % b - K + 1) > 0)
        {
            ans = ans + (N % b - k + 1);
            if(k == 0)
            {
                --ans;
            }
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:34: error: 'k' was not declared in this scope
   32 |             ans = ans + (N % b - k + 1);
      |                                  ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

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

    ll int ans = 0;

    for(int b = K + 1; b <= N; ++b)
    {
        ans = ans + (N / b) * (b - K);
        if( (N % b - k + 1) > 0)
        {
            ans = ans + (N % b - k + 1);
            if(k == 0)
            {
                --ans;
            }
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:22: error: 'k' was not declared in this scope
   30 |         if( (N % b - k + 1) > 0)
      |                      ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

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

    ll int ans = 0;

    for(int b = K + 1: b <= N; ++b)
    {
        ans = ans + (N / b) * (b - K);
        if( (N % b - k + 1) > 0)
        {
            ans = ans + (N % b - k + 1);
            if(k == 0)
            {
                --ans;
            }
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:15: error: initializer in range-based 'for' loop
   27 |     for(int b = K + 1: b <= N; ++b)
      |               ^
a.cc:27:30: error: expected ')' before ';' token
   27 |     for(int b = K + 1: b <= N; ++b)
      |        ~                     ^
      |                              )
a.cc:27:34: error: 'b' was not declared in this scope
   27 |     for(int b = K + 1: b <= N; ++b)
      |                                  ^
Language: C++

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <sstream>  
#include <stack>
#include <time.h>
#include <vector>
#include <complex>
using namespace std;
int main(){
  long long n,k,lbj=0;
  cin>>n>>k;
  for (int i=k;i < n;i++)
  for (int j=k+1;j <= n;j++)
  for (int q=j;q <= n;q++)
  if ((q - i) % j >= k)
  lbj++l
  cout<<lbj;
  system ("pause");
  return 0;
  } 

Compiler output:
a.cc: In function 'int main()':
a.cc:23:8: error: expected ';' before 'l'
   23 |   lbj++l
      |        ^
      |        ;