criyle/codenet-compile-errors huggingface dataset:
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,,de=0;
  cin>>n>>k;
  if (k == 0){
  cout<<n * n;
  system ("pause");
  return 0;
  }
  for (int j=k+1;j<=n;j++)
  for (int i=1;i<=n;j++){
  if (i % j >= k)
  de++;
  }
  cout<<de;
  system ("pause");
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: expected unqualified-id before ',' token
   17 |   long long n,k,,de=0;
      |                 ^
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;
  if (k == 0){
  cout<<n * n;
  system ("pause");
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:22:4: error: expected '}' at end of input
   22 |   }
      |    ^
a.cc:16:11: note: to match this '{'
   16 | int main(){
      |           ^
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>
#difine LL long long
#difine rt return 0
#difine sp system ("pause")
using namespace std;
int main(){
  LL n,k,fc=0;
  for (int j=1;j<=n;j++)
  for (int i=1;i <= n;j++)
  if (i % j >= k)
    fc++;
  cout<<fc;
  system ("pause");
  return 0;
  }

Compiler output:
a.cc:15:2: error: invalid preprocessing directive #difine; did you mean #define?
   15 | #difine LL long long
      |  ^~~~~~
      |  define
a.cc:16:2: error: invalid preprocessing directive #difine; did you mean #define?
   16 | #difine rt return 0
      |  ^~~~~~
      |  define
a.cc:17:2: error: invalid preprocessing directive #difine; did you mean #define?
   17 | #difine sp system ("pause")
      |  ^~~~~~
      |  define
a.cc: In function 'int main()':
a.cc:20:3: error: 'LL' was not declared in this scope
   20 |   LL n,k,fc=0;
      |   ^~
a.cc:21:19: error: 'n' was not declared in this scope
   21 |   for (int j=1;j<=n;j++)
      |                   ^
a.cc:23:16: error: 'k' was not declared in this scope
   23 |   if (i % j >= k)
      |                ^
a.cc:24:5: error: 'fc' was not declared in this scope
   24 |     fc++;
      |     ^~
a.cc:25:9: error: 'fc' was not declared in this scope
   25 |   cout<<fc;
      |         ^~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
typedef longlong ll;

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

    for(b=K+1;b<=N;b++){
        cunt+=(N/b)*max(0ll,b-K)+max(0ll,N%b+1-K);               
    }
    cout<<cunt<<"\n";
    return 0;
}


Compiler output:
a.cc:4:9: error: 'longlong' does not name a type
    4 | typedef longlong ll;
      |         ^~~~~~~~
a.cc:7:1: error: expected initializer before 'll'
    7 | ll cunt;
      | ^~
a.cc: In function 'int main()':
a.cc:9:13: error: 'K' was not declared in this scope
    9 |     cin>>N>>K;
      |             ^
a.cc:12:9: error: 'cunt' was not declared in this scope
   12 |         cunt+=(N/b)*max(0ll,b-K)+max(0ll,N%b+1-K);
      |         ^~~~
a.cc:14:11: error: 'cunt' was not declared in this scope
   14 |     cout<<cunt<<"\n";
      |           ^~~~
Language: Java

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();
        int[][] a = new int[n][m];
        for (int i = 0; i < n; i++)
            for (int j = 0; j < m; j++)
                a[i][j] = 1;
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                a[i][j] *= -1;
                if (j + 1 < m)
                    a[i][j + 1] *= -1;
                if (j - 1 >= 0)
                    a[i][j - 1] *= -1;
                if (i - 1 >= 0)
                    a[i - 1][j] *= -1;
                    if (j - 1 >= 0) {
                        a[i - 1][j - 1] *= -1;
                    }
                    if (j + 1 < m) {
                        a[i - 1][j + 1] *= -1;
                    }

                }
                if (i + 1 < n) {
                    a[i + 1][j] *= -1;
                    if (j + 1 < m) {
                        a[i + 1][j + 1] *= -1;
                    }
                    if (j - 1 >= 0) {
                        a[i + 1][j - 1] *= -1;
                    }
                }
            }
            int count = 0;
            for (int i = 0; i < n; i++)
                for (int j = 0; j < m; j++)
                    if (a[i][j] == -1)
                        count++;
            System.out.println(count);
            input.close();
        }
    }
}

Compiler output:
Main.java:48: error: class, interface, enum, or record expected
}
^
1 error
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main() {
    long long  n, k;
    cin >> n >>k;
    long long ans = 0;
    if(k == 0) ans = n*n;
    else {
        for (int b = k+1; b <= n; b++){
            ans += n/b*(b-k);
            ans += max(0, n%b-k+1);
        }
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: no matching function for call to 'max(int, long long int)'
   14 |             ans += 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:14:23: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   14 |             ans += 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
Language: Java

public class Main implements Runnable {

    private static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        new Thread(null, new Main(), "", 128 * 1024 * 1024).start();
    }

    public void run() {
        int n = sc.nextInt(), k = sc.nextInt();
        long count = 0L;
        if (k == 0) {
            System.out.println(n * n);
            return;
        }
        for (int b = 1; b <= n; b++) {
            long rep = n / b;
            long repK = rep * Math.max(b - k, 0);
            long mod = n % b;
            long modK = Math.max(mod - k + 1, 0);
            count += repK + modK;
        }
        System.out.println(count);
    }
}

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

#include<bits/stdc++.h>
#define ll long long
using namespace std;
template<typename T>inline void read(T &x){
	int p=1;x=0;char c=getchar();
	while(!isdigit(c)){
		if(c=='-')p=-1;
		c=getchar();
	}
	while(isdigit(c)){
		x=(x<<1)+(x<<3)+(c^'0');
		c=getchar();
	}
	x*=p;
}
int n,k;
ll ans=0;
int main(){
	read(n),read(k);
	if(k==0){
		cout<<n*n<<endl;
		return 0;
	}
	for(register t i=k+1;i<=n;++i){
		ll leiluo=n/i;
		ans+=(leiluo)*(i-k);
		if(n%i>=k)
			ans+=(n%i-k+1);
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: 't' does not name a type; did you mean 'tm'?
   24 |         for(register t i=k+1;i<=n;++i){
      |                      ^
      |                      tm
a.cc:24:30: error: expected ';' before 'i'
   24 |         for(register t i=k+1;i<=n;++i){
      |                              ^
      |                              ;
a.cc:24:30: error: 'i' was not declared in this scope
Language: C++

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

int main(){
    int N,K;
    cin >> N >> K;
    long long int count = 0;

    for(int b=1; b<=N; b++){
        int p = N / b;
        int r = N % b;
        count += p * max(0, b - K) + max(0, r - k - 1);
    }

    if(K == 0) count -= N;

    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:49: error: 'k' was not declared in this scope
   12 |         count += p * max(0, b - K) + max(0, r - k - 1);
      |                                                 ^
Language: C++

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

int main(){
    long long int N,K;
    cin >> N >> K;
    long long int count = 0;

    for(int b=1; b<=N; b++){
        int p = N / b;
        int r = N % b;
        count += p * max(0, b - K) + max(0, r - k - 1);
    }

    if(K == 0) count -= N;
    
    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: no matching function for call to 'max(int, long long int)'
   12 |         count += p * max(0, b - K) + max(0, r - 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:12:25: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   12 |         count += p * max(0, b - K) + 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
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:12:25: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   12 |         count += p * max(0, b - K) + max(0, r - k - 1);
      |                      ~~~^~~~~~~~~~
a.cc:12:49: error: 'k' was not declared in this scope
   12 |         count += p * max(0, b - K) + max(0, r - k - 1);
      |                                                 ^
Language: C++

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

int main()
{
    int n, k;
    cin >> n >>k;
    int count=0;
    for(int b=k;b<=n;b++)
     {
        int r=n%b;
        int q=n/b;
        count+=q*(b-k)+max(r-k+1,0);


    }
    std::cout << count << endl;
    return 0;
}s

Compiler output:
a.cc:20:2: error: 's' does not name a type
   20 | }s
      |  ^
Language: C++

#include <iostream>

using namespace std;

int main(){
	int N, K, p, r, count = 0;
	cin >> N >> K;
	if(K == 0){
		cout << N * N << endl;
		return 0;
	}
	for(int b = K + 1; b <= N; ++b){
		//N = pb + r
		p = N / b;
		r = N % b;
		//余りは周期bの列(0,1,...b-1)がp回繰り返された後に長さb未満の列(0,1,...r)が1つ加わる
		//周期列のうち余りがK以上なのはmax(0,b-K)個, 最後の列のうち余りがK以上なのはmax(0,r-K+1)個
		count += p * (b-K) + (r-K+1 >= 0) ? r-k+1 : 0;
	}
	cout << count << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:55: error: 'k' was not declared in this scope
   18 |                 count += p * (b-K) + (r-K+1 >= 0) ? r-k+1 : 0;
      |                                                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long i,j,ans;
int main(){
    scanf("%lld%lld",&i,&j);
    if(j==0)cout<<i*i<<endl;
    else{
    for(long long k=j+1;k<=i;k++)
    {
		for(long long hh=j,h=j,hhh=k;hh<=i;h+=k,hh=h,hhh+=k)
		{
	//	cout<<hh<<' '<<hhh<<' ';
		if(hhh>=i)ans=ans-hh+i+1;
		else ans=ans-hh+hhh;
		//cout<<ans<<endl;
		}
	}
    cout<<max(ans-1,0);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: no matching function for call to 'max(long long int, int)'
   18 |     cout<<max(ans-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:18:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   18 |     cout<<max(ans-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:18:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   18 |     cout<<max(ans-1,0);
      |           ~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int N = 1e5+7 , mz = 1e9+7;
int c[N],d[N];

int main(){
    int n,k;
    cin>>n>>k;
    if( k == 0 )    cout<<1LL*n*n<<endl;
    else{
        long long ans = 0；
        for(int i = k+1 ; i <= n ;i++){
            ans += (n/i)*(i-k);
            if( n%i>=k )    ans+=n%b-k+1;
        }
        cout<<ans<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: unable to find numeric literal operator 'operator""\U0000ff1b'
   11 |         long long ans = 0；
      |                         ^~~
a.cc:12:27: error: 'i' was not declared in this scope
   12 |         for(int i = k+1 ; i <= n ;i++){
      |                           ^
Language: C++

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

using namespace std;

int main(void){
	long long int n, k;

	cin >> n >> k;


	long long int num = 0;

	for (long long int b = k+1; b <= n; b++){
		num += (b-k)*((n+1)/b);

//		if (b != 1)
			num = num + max(0, (n - b*((n+1)/b) - k + 1));
//		else 
//			num += (n - b*((n+1)/b) - k + 1);
	}

	if (k == 0)
		num -= n;


	cout << num << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:40: error: no matching function for call to 'max(int, long long int)'
   20 |                         num = num + max(0, (n - b*((n+1)/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:20:40: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   20 |                         num = num + max(0, (n - b*((n+1)/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:4:
/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:20:40: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 |                         num = num + max(0, (n - b*((n+1)/b) - k + 1));
      |                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: Java

import java.util.*;
import java.*;
class Main {
   public static void main(String[] args)
   {
      Scanner scan = new Scanner(System.in);



      long N = Long.parseLong(sc.next());
      long K = Long.parseLong(sc.next());



      long count = 0;

      for(long i = K + 1; i <= N; i++){
          long p = N / i;
          long r = N % i;
          count += (i - K) * p + Math.max(r - K + 1, 0);
          }

      if(K == 0){
         count = N * N;
         }
      System.out.println(count);
   }
}


Compiler output:
Main.java:2: error: package java does not exist
import java.*;
^
Main.java:10: error: cannot find symbol
      long N = Long.parseLong(sc.next());
                              ^
  symbol:   variable sc
  location: class Main
Main.java:11: error: cannot find symbol
      long K = Long.parseLong(sc.next());
                              ^
  symbol:   variable sc
  location: class Main
3 errors
Language: C

#include <stdio.h>
int abs(int n){
		if(n<0){
		return -1*n;}else
		return n;}
int main(void)
{int A,B,C,K,x,i,a,b,l,r,g,m,tmp;
	long long int N,K,sum;
	scanf("%lld%lld",&N,&K);
	sum=0;
	if(K==0){
		printf("%lld",N*N);}
		else if(N==1)
		printf("0");
		else
			{
		for(b=K+1;b<=N;b++){
			if(N%b<=K-1)
			sum+=(b-K)*(N/b);
			else
			sum+=(b-K)*(N/b)+(N%b)-K+1;}
			printf("%lld",sum);}
			

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:25: error: conflicting types for 'K'; have 'long long int'
    8 |         long long int N,K,sum;
      |                         ^
main.c:7:12: note: previous declaration of 'K' with type 'int'
    7 | {int A,B,C,K,x,i,a,b,l,r,g,m,tmp;
      |            ^
Language: C++

#include<iostream>
using namespace std;

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

  long long cnt = 0;

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

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

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

  cout << cnt << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: expected ';' before 'cout'
   11 |     cnt = N*N
      |              ^
      |              ;
   12 |     cout << cnt << endl;
      |     ~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
long long i,N,K,n;
cin >> N >> K;
n==0;
for (long long i=K+1; i<=N; i=i+1 ){
n=n+(N-N%i)*(i-K)/i;
if(N%i-K>=0){n=n+N%i-K+1
if(K==0){n=n+1;}
;}
;}
printf("%lld",n)
;}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: expected ';' before 'if'
   10 | if(N%i-K>=0){n=n+N%i-K+1
      |                         ^
      |                         ;
   11 | if(K==0){n=n+1;}
      | ~~
Language: C++

#include <iostream>
#include <cstdint>
using namespace std;
using i64 = int64_t;

int main()
{
  i64 n,k;
  i64 cnt = 0;
  
  cin >> n >> k;
  for(i64 b = 1; b <= n; b++){
    // a % b >= k, a <= n, b <= n
    cnt += max((b - k),0) * (n / b) + max((n % b) - k +1, 0);
  }
  if (k == 0) cnt -= n;
  
  cout << cnt << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: no matching function for call to 'max(i64, int)'
   14 |     cnt += max((b - k),0) * (n / b) + max((n % b) - k +1, 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:14:15: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   14 |     cnt += max((b - k),0) * (n / b) + max((n % b) - 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
a.cc:14:42: error: no matching function for call to 'max(i64, int)'
   14 |     cnt += max((b - k),0) * (n / b) + max((n % b) - 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:14:42: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   14 |     cnt += max((b - k),0) * (n / b) + max((n % b) - 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 <iostream>
#include <cstdint>
using namespace std;
using i64;

int main()
{
  i64 n,k;
  i64 cnt = 0;
  
  cin >> n >> k;
  for(i64 b = 1; b <= n; b++){
    // a % b >= k, a <= n, b <= n
    cnt += max((b - k),0) * (n / b) + max((n % b) - k +1, 0);
  }
  if (k == 0) cnt -= n;
  
  cout << cnt << endl;
  
}


Compiler output:
a.cc:4:7: error: expected nested-name-specifier before 'i64'
    4 | using i64;
      |       ^~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'i64' was not declared in this scope
    8 |   i64 n,k;
      |   ^~~
a.cc:9:6: error: expected ';' before 'cnt'
    9 |   i64 cnt = 0;
      |      ^~~~
      |      ;
a.cc:11:10: error: 'n' was not declared in this scope
   11 |   cin >> n >> k;
      |          ^
a.cc:11:15: error: 'k' was not declared in this scope
   11 |   cin >> n >> k;
      |               ^
a.cc:12:10: error: expected ';' before 'b'
   12 |   for(i64 b = 1; b <= n; b++){
      |          ^~
      |          ;
a.cc:12:18: error: 'b' was not declared in this scope
   12 |   for(i64 b = 1; b <= n; b++){
      |                  ^
a.cc:14:5: error: 'cnt' was not declared in this scope; did you mean 'int'?
   14 |     cnt += max((b - k),0) * (n / b) + max((n % b) - k +1, 0);
      |     ^~~
      |     int
a.cc:16:15: error: 'cnt' was not declared in this scope; did you mean 'int'?
   16 |   if (k == 0) cnt -= n;
      |               ^~~
      |               int
a.cc:18:11: error: 'cnt' was not declared in this scope; did you mean 'int'?
   18 |   cout << cnt << endl;
      |           ^~~
      |           int
Language: C++

#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
	int N, K;
	long long count = 0;

	cin >> N >> K;

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

	cout << count << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: expected primary-expression before 'long'
   14 |                         count = long long(N * N);
      |                                 ^~~~
a.cc:17:26: error: expected primary-expression before 'long'
   17 |                 count += long long(N / b) * (b - K);
      |                          ^~~~
a.cc:19:34: error: expected primary-expression before 'long'
   19 |                         count += long long(N % b) - K + 1;
      |                                  ^~~~
Language: C++

#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
	int N, K;
	long long count = 0;

	cin >> N >> K;

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

	cout << count << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: expected primary-expression before 'long'
   14 |                         count = long long(N * N);
      |                                 ^~~~
a.cc:17:26: error: expected primary-expression before 'long'
   17 |                 count += long long((N / b) * (b - K));
      |                          ^~~~
a.cc:19:34: error: expected primary-expression before 'long'
   19 |                         count += long long((N % b) - K + 1);
      |                                  ^~~~
Language: Java

import java.io.*;

public class Main{
  public static void main(String[] args) {
    try {
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
      int n, k, ind, i, j, count;
      String str;

      str = reader.readLine();
      ind = str.indexOf(" ");
      n = Integer.parseInt(str.substring(0, ind));
      k = Integer.parseInt(str.substring(ind+1));

      int a[][] = new int[n][n]

      for(i=0; i<=n-1; i++){
        for(j=0; j<=n-1; j++){
          a[i][j]=(i+1)%(j+1);
        }
      }

      for(i=0; i<=n-1; i++){
        for(j=0; j<=n-1; j++){
          if(a[i][j]>=k){
            count = ++count;
          }
        }
      }

      System.out.println(count);

    }
    catch (Exception e) {

    }
  }
}


Compiler output:
Main.java:15: error: ';' expected
      int a[][] = new int[n][n]
                               ^
1 error
Language: C++

 #include<iostream>
 #include<string>
 #include<algorithm>
 using namespace std;
 
 
 int main()
 {
 	long long int n,k;
 	while(cin>>n>>k)
 	{
 	    long long int cnt=0;
 	    for(long long int b=1;b<=n;b++)
 	    {
 	    	 long long int r=n%b;
 	    	 long long int p=n/b;
 	    	 cnt=cnt+max(0,v-k)*p+max(0,r-k+1);
		 }
		 cout<<cnt<<endl;
 	}
	 
 	return 0;
 }
 
 

Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: 'v' was not declared in this scope
   17 |                  cnt=cnt+max(0,v-k)*p+max(0,r-k+1);
      |                                ^
a.cc:17:42: error: no matching function for call to 'max(int, long long int)'
   17 |                  cnt=cnt+max(0,v-k)*p+max(0,r-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:17:42: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   17 |                  cnt=cnt+max(0,v-k)*p+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
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/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:17:42: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   17 |                  cnt=cnt+max(0,v-k)*p+max(0,r-k+1);
      |                                       ~~~^~~~~~~~~
Language: C++

//#include <algorithm>
//#include <cstdio>
//#include <functional>
#include <iostream>
//#include <cfloat>
//#include <climits>
//#include <cstdlib>
//#include <cstring>
//#include <cmath>
//#include <map>
//#include <queue>
//#include <set>
//#include <sstream>
//#include <stack>
//#include <string>
//#include <time.h>
//#include <vector>
//#include <random>
//#include <unordered_set>
//#include <complex>
#define WAIT system ("pause")
#define rt0 return 0
using namespace std;
int main()
{
 //   WAIT; 

 long long N,K;
 long long  count=0;
 cin>>N>>K;

if(K==0) {
	cout<<N*N;
	rt0;
}
for(int j=K+1; j<=N;j++)
{
	count+=((N/j)*(j-K));
	int t=N%j;
	if(t>0)	count+=max(0,t-K+1);
}

cout<<count;
    rt0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:27: error: no matching function for call to 'max(int, long long int)'
   40 |         if(t>0) count+=max(0,t-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:4:
/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:40:27: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   40 |         if(t>0) count+=max(0,t-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<algorithm>
#include<math.h>
using namespace std;

int main(){
    long int n, k, cnt = 0;
    cin >> n >> k;
    for(int i = 1; i < n + 1; i++){
        for(int j = 1; j < n + 1; j++){
            if(i % j >= k) cnt++;
        }
    }
    cout << cnt
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before 'return'
   14 |     cout << cnt
      |                ^
      |                ;
   15 | 
   16 |     return 0;
      |     ~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

  long long ret=0;  
  for(int i=K+1;i<=N;i++)
  {
    ret+=(K?(N/i)*(i-K)+max(N%i-K+1,0):N);
    cerr<< i<< ": "<< ret<< "+="<< (N/i)*(i-K)<< endl;
  }
  cout<< ret<< endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: no matching function for call to 'max(long long int, int)'
   13 |     ret+=(K?(N/i)*(i-K)+max(N%i-K+1,0):N);
      |                         ~~~^~~~~~~~~~~
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:28: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   13 |     ret+=(K?(N/i)*(i-K)+max(N%i-K+1,0):N);
      |                         ~~~^~~~~~~~~~~
/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:28: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   13 |     ret+=(K?(N/i)*(i-K)+max(N%i-K+1,0):N);
      |                         ~~~^~~~~~~~~~~
Language: C++

 #include<iostream>
 #include<string>
 using namespace std;
 
 
 int main()
 {
 	long long int n,k;
 	while(cin>>n>>k)
 	{
 	    long long int cnt=0;
 	    cnt=cnt+(n-k)*(n-k+1)/2;
 	    for(long long int b=k+1;b<=n;b++)
 	    {		 
 	    long long int s=(n-b+1)/b;
 	    cnt=cnt+s*(b-k);
 	    for(long long int i=(s+1)*b+k;i<=n;i++)
		 {
		   
		   if(i%b>=k) cnt++;
		   else break;
	     }
		 cout<<cnt<<endl;
	    }
	   }
	 }
 	return 0;
 }

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

#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<unordered_set>
#include<bitset>
using namespace std;
//#define MODE 1
#ifdef MODE
#define DEB(X) cout<< #X <<": "<<X<<" ";
#define ARDEB(i,X) cout<< #X <<"["<<i<<"]: "<<X[i]<<" ";
#define END cout<<endl;
#else
#define DEB(X) {}
#define ARDEB(i,X) {}
#define END {}
#endif
typedef long long int ll;
typedef pair<int,int> P;
struct edge{int to,cost;};
#define REP(i,n) for(int i=0;i<(n);i++)
const int INF=100000000;

int main(){
	int n,m;
	cin>>n>>m;
	if(m==0){
		cout<<n*m<<endl;
		return 0;
	}
	REP(i,n+1){
		if(i<=m)continue;
		ans+=((n+1)/i)*(i-m);
		if((n+1)+i>m){
			ans+=(n+1)%i-m;
		}
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   41 |                 ans+=((n+1)/i)*(i-m);
      |                 ^~~
      |                 abs
a.cc:46:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   46 |         cout<<ans<<endl;
      |               ^~~
      |               abs
Language: Java

import java.io.*;

public class Main{
  public static void main(String[] args) {
    try {
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
      int n, k, ind, i, j, count = 0;
      String str;

      str = reader.readLine();
      ind = str.indexOf(" ");
      n = Integer.parseInt(str.substring(0, ind));
      k = Integer.parseInt(str.substring(ind+1));

      for(i = k; i <= n; i++ ){
        for(j = 1; j<= n; j++){
          if(i%j >= k){
            count = ++count;
          }
        }
      }

      System.out.println(count*2 - subcount);
      
    }
    catch (Exception e) {
      
    }
  }
}

Compiler output:
Main.java:23: error: cannot find symbol
      System.out.println(count*2 - subcount);
                                   ^
  symbol:   variable subcount
  location: class Main
1 error
Language: C++

#include<iostream>
using namespace std;
int main (){
long N,K,po=0;
int i,j,;
cin>>N>>K;
for(i=1;i<=N;i++){
for(j=1;j<=N;j++){
if(i%j>=K)po++;
}

}
cout<<po;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 | int i,j,;
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
int main(void){
    ll n,k,ans=0;
    cin>>n>>k;
    for(int i=k+1;i<=n;i++){
        //cout<<((n/i)*(i-k)+max(0,n-(n/i)*i-k+1))<<endl;
        //cout<<i<<" "<<((n%i?n-(n/i)*i-k+1:0)-(k==0&&(n%i!=0)?1:0))<<" "<<(n/i)*(i-k)<<endl;
        //ans+=(n/i)*(i-k)+((n%i?n-(n/i)*i-k+1:0)-(k==0&&(n%i!=0)?1:0));
        //ans+=(n/i)*(i-k)+(n%i?n-(n/i)*i-k:0);
        // ans+=(n/i)*(i-k)
        // for(int j=(n/i)*i+1;j<=n;j++){
            
        // }
        //ans+=((n%i?max(n-n/i*i-k+1,0):0)+(k==0&&(n%i?max(n-n/i*i-k+1,0):0)!=0?-1:0))+(n/i)*(i-k);
        //cout<<i<<" "<<((n%i?max(n-n/i*i-k+1,0):0)+(k==0&&(n%i?max(n-n/i*i-k+1,0):0)!=0?-1:0))<<endl;
        ans+=(n/i)*(i-k)+max(n-n/i*i-(k?k-1:k),0);
        //cout<<i<<" "<<max(n-n/i*i-(k?k-1:k),0)<<endl;
    }
    cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:29: error: no matching function for call to 'max(long long int, int)'
   18 |         ans+=(n/i)*(i-k)+max(n-n/i*i-(k?k-1:k),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:18:29: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   18 |         ans+=(n/i)*(i-k)+max(n-n/i*i-(k?k-1: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
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:18:29: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   18 |         ans+=(n/i)*(i-k)+max(n-n/i*i-(k?k-1:k),0);
      |                          ~~~^~~~~~~~~~~~~~~~~~~~~
Language: C++

	long long int n,k;
 	while(cin>>n>>k)
 	{
 	    long long int cnt=0;
 	    cnt=cnt+(n-k)*(n-k+1)/2;
 	    long long int s=(n-b+1)/b;
 	    cnt=cnt+s*(b-k);
 	    cnt=cnt+n-(s+1)*b-k+1;
		 cout<<cnt<<endl;
	 }
 	return 0;
 }

Compiler output:
a.cc:2:9: error: expected unqualified-id before 'while'
    2 |         while(cin>>n>>k)
      |         ^~~~~
a.cc:11:9: error: expected unqualified-id before 'return'
   11 |         return 0;
      |         ^~~~~~
a.cc:12:2: error: expected declaration before '}' token
   12 |  }
      |  ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    long long n,k;
    while(cin >> n >> k) {
        long long sum1=(n-k)*(1+n-k)/2;
        long long sum2=0;
        for(long long i=k+1; i<=n; i++) {
            long long su=n-i+1;
            long long sum=(su/i)*(i-k);
            long long ssum = su%i-k;
            if(ssum<0)
                sum2+=sum;
            else
                sum2=(sum2+sum+ssum);
        }
        if(k==0)
            prlong longf("%lld\n",sum1+sum2-n);
        else
            prlong longf("%lld\n",sum1+sum2);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: 'prlong' was not declared in this scope; did you mean 'ulong'?
   20 |             prlong longf("%lld\n",sum1+sum2-n);
      |             ^~~~~~
      |             ulong
a.cc:22:13: error: 'prlong' was not declared in this scope; did you mean 'ulong'?
   22 |             prlong longf("%lld\n",sum1+sum2);
      |             ^~~~~~
      |             ulong
Language: C++

/**
	Template by Akikaze (秋風) - formerly proptit_4t41.
	Code written by a random fan of momocashew and Chiho.
**/

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

/** -----BASIC MACROES----- **/
#define endl '\n'
#define i64 long long
#define ld long double
#define pub push_back
#define mp make_pair
#define fi first
#define se second
const long long MOD = 1000000007LL, INF = 1e9, LINF = 1e18;
const long double PI = 3.141592653589793116, EPS = 1e-9, GOLD = ((1+sqrt(5))/2);
typedef vector<i64> vi;
typedef vector<ld> vd;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef pair<i64, i64> pii;
typedef pair<i64, pii> pip;
typedef pair<pii, i64> ppi;

/** -----BIT CONTROLS----- **/
template<class T> int getbit(T s, int i) { return (s >> 1) & 1; }
template<class T> T onbit(T s, int i) { return s | (T(1) << i); }
template<class T> T offbit(T s, int i) { return s & (~(T(1) << i)); }
template<class T> int cntbit(T s) { return __builtin_popcount(s); }

int main() {
	i64 N, K, ans = 0; cin >> N >> K;
	for (i64 i=1; i<=N; i++) {
		if (i * K > N) break;
		ans += (N - i*k + 1);
	}
	cout << ans;
	return 0;
}

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

 #include <iostream>
     
    using namespace std;
     
    int main()
    {
      
        long long n,k;
        cin>>n>>k
        
            long long cnt = 0;
     
            for(int i = 1;i<=n;i++)
            {
                for(int j = 1;j<=n;j++)
                {
                    if(i%j>=k)
                        cnt++;
                }
            }
            cout<<cnt<<endl;
        return 0;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before 'long'
    9 |         cin>>n>>k
      |                  ^
      |                  ;
   10 | 
   11 |             long long cnt = 0;
      |             ~~~~  
a.cc:18:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
   18 |                         cnt++;
      |                         ^~~
      |                         int
a.cc:21:19: error: 'cnt' was not declared in this scope; did you mean 'int'?
   21 |             cout<<cnt<<endl;
      |                   ^~~
      |                   int
Language: C

#include<stdio.h>
#include<iostream>
using namespace std;
int main(){

    int n;
    int k;
    int count=0;
    int i,j;
    cin >> n >> k;

    i=k;
    if(k==0)i=1;

    for(i;i<=n;i++){
        for(int j=k+1;j<=n;j++){
            if((i%j)>=k){
                count++;
            }
        }
    }
    printf("%d\n",count);

    return 0;
}

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

using namespace std;
int main()
{
	int i, j;
	int n, k;
	long long ans = 0;
	scanf("%d %d", &n, &k);
	ans = (n - k + 1) * (n - k) / 2;
	for(i = n ; i >= k ; i--)
	{
		for(j = 1 ; j <= i ; j++)
		{
			if(i % j >= k)ans++;
		}
	}
	printf("%lld\n",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf' was not declared in this scope
    7 |         scanf("%d %d", &n, &k);
      |         ^~~~~
a.cc:16:9: error: 'printf' was not declared in this scope
   16 |         printf("%lld\n",ans);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | using namespace std;