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

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<ll> vl ;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;

#define rep(i,N) for(int i=0; i < (int)N; i++)
#define all(v) (v).begin(),(v).end()

const int INF = 100000002;
const int mod = 1000000007;
//const int mod = 998244353;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

mint modPow(int b, int p, int mod){
	mint ret = 1;
	rep(i, p){
		ret *= b;
	}
	return ret;
}


int main(){
	int n, k; cin >> n >> k;
	mint ans = 0;
	vector<ll> d(k+1);
	for(int i=k; i>0; i--){
		int cnt = k/i;
		d[i] = modPow(cnt, n, mod);
		int mult = 2;
		while(k>=mult*i){
			d[i] -= d[i*mult];
			//if(d[i]<0) d[i] += mod;
			mult++;
		}
		ans += d[i]*i;		
	}

	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:30: error: cannot convert 'mint' to '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} in assignment
   63 |                 d[i] = modPow(cnt, n, mod);
      |                        ~~~~~~^~~~~~~~~~~~~
      |                              |
      |                              mint
Language: C++

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<ll> vl ;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;

#define rep(i,N) for(int i=0; i < (int)N; i++)
#define all(v) (v).begin(),(v).end()

const int INF = 100000002;
const int mod = 1000000007;
//const int mod = 998244353;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

mint modPow(ll b, ll p, ll mod){
	mint ret = 1;
	rep(i, p){
		ret *= b;
	}
	return ret;
}


int main(){
	int n, k; cin >> n >> k;
	mint ans = 0;
	vector<ll> d(k+1);
	for(int i=k; i>0; i--){
		int cnt = k/i;
		d[i] = modPow(cnt, n, mod);
		int mult = 2;
		while(k>=mult*i){
			d[i] -= d[i*mult];
			//if(d[i]<0) d[i] += mod;
			mult++;
		}
		ans += d[i]*i;		
	}

	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:30: error: cannot convert 'mint' to '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} in assignment
   63 |                 d[i] = modPow(cnt, n, mod);
      |                        ~~~~~~^~~~~~~~~~~~~
      |                              |
      |                              mint
Language: C

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define Rep(i,m,n) for(int i=(m);i<(n);i++)
#define debug(a,b) cout << "debug : " << a << " , "<< b << endl
using ll=long long;
const ll INF=1LL<<60;
const ll mod=1E9+7;

ll power(ll a,ll b,ll mod){
  if(b==0)return 1;
  ll u=power(a,b/2,mod);
  u=(u*u)%mod;
  if(b%2)u=(a*u)%mod;
  return u;
}


int main(){
  ll n,k;
  cin >> n >> k;
  vector<ll>pcs(k+1,0);
  Rep(i,1,k+1)pcs[i]=power(k/i,n,mod);
  
  for(int i=k;i>=1;i--){
    for(int j=2*i;j<=k;j+=i){
      pcs[i]=(pcs[i]-pcs[j]+mod)%mod;
    }
  }
  ll ans=0;
  rep(i,k+1){
    ans+=(pcs[i]*(ll)i)%mod;
    ans%=mod;
  }
  cout << ans;

  return 0;

}







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

#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define all(v) v.begin(), v.end()
#define ll long long
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<long long>;
using vvll = vector<vll>;

const ll mod=1000000007;

ll modPow(long long a, long long n, long long p) {
  if (n == 1) return a % p;
  if (n % 2 == 1) return (a * modPow(a, n - 1, p)) % p;
  long long t = modPow(a, n / 2, p);
  return (t * t) % p;
}

int main(){
    ll n,k;
    cin>>n>>k;
    ll gcd=k;
    ll count=0;
    vll d(k);
    while(gcd>0){
        int c=k/gcd;
        d[gcd]=modPow(c,n,mod);
        count+=d[gcd]*gcd;
        while(c>1){
            count-=d[gcd*c]*gcd;
            c--;
        }
        count%=mod;
        gcd--;
    }
    if(count<0) count+=1000000007;
    cout<<count<<endl;
}


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

#include <bits/stdc++.h>
using namespace std;
long long  dp[100000001];
long long p=1000000007;
long long pow1(long long i,long long n){
  long long c; 
  if(n==1)
    return i;
  else{
    c=pow1(i,n/2);
    if(n%2==0){
      c*=c;
      c%=p;
    }
    else{
      c*=c;
      c%=p;
      c=c*i;
      c%=p;
    }
  }
  return c;
}
int main() {
  long long n,k,k1,k2;
  cin>>n>>k;
  for(long long i=k;i>=1;i--){
    dp[i]=pow1(k/i,n);
    dp[i]%=p;
    for(long long g=2*i;g<=k;g+=i)
      dp[i]-=dp[g];
    dp[i]%=p;
  }
  long long sum=0;
  for(long long i=1;i<=k;i++){
    sum+=i*dp[i];
    sum%=p;
  }
  cout<<sum;
}

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

import java.io.*;
import java.util.StringTokenizer;

public class SumOfTripletsHard {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
//        int t = in.nextInt();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {
        public void solve(int testNumber, InputReader in, PrintWriter out) throws IOException {
            int n = in.nextInt();
            int k = in.nextInt();
            long[] dp = new long[k+1];
            for (int i = k; i >= 1; i--) {
                dp[i] = (long) Math.pow(k/i, n);
                for (int j = i*2; j <= k; j+=i) {
                    dp[i] -= dp[j];
                }
            }
            long ans = 0;
            for (int i = 1; i <= k; i++) {
                ans += dp[i] * i;
            }
            ans = (long) (ans % (Math.pow(10, 9) + 7));
            out.println(ans);
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public char nextChar() {
            return next().charAt(0);
        }

        public String nextLine() throws IOException {
            return reader.readLine().trim();
        }
    }
}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define repr(i, n) for (int i = (int)n - 1; i >= 0; --i)
#define ALL(a) (a).begin(), (a).end()
using ll = long long;
using Graph = vector<vector<int>>;
const ll MOD = 1e9 + 7;
const ll INF = 1e9;
const ll LINF = 1LL << 60;

ll mod_pow(ll n, ll k, ll p) {
  if (k == 0) return 1;
  ll res = mod_pow(n * n % p, k / 2, p);
  if (k & 1) res = res * n % p;
  return res;
}

int main() {
  ll n, k;
  cin >> n >> k;
  vector<ll> a(k + 1);
  a[0] = 0;
  rep(i, k) a[i + 1] = mod_pow((ll)i + 1, n, MOD);
  vector<ll> ans(k + 1);
  vector<ll> tmp(k + 1);
  for (ll i = k; i > 0; --i) {
    ll num = k / i;
    tmp[i] = a[num];
    for (ll j = i + i; j <= k; j += i) {
      tmp[i] -= tmp[j];
      while (tmp[i] < 0) tmp[i] += MOD;
    }
    ans[i] = (tmp[i] * i) % MOD;
  }
  ll q = 0;
  rep(i, k) q = (q + ans[i + 1]) % MOD;
  cout << q << endl;
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
						
#define fast_cin() ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define endl '\n'
#define int long long

const int N = 1e5, mod = 1e9 + 7;

int cnt[N + 1];

int binpow(int x, int y) {
    int res = 1LL;
    x %= mod;
    while (y) {
        if (y & 1) res = (res * x) % mod;
        y >>= 1;
        x = (x * x) % mod;
    }
    return res;
}

int mod_inv(int x) {
    return binpow(x, mod - 2);
}
				
int32_t main() {
	fast_cin();  
	int n, k;
	cin >> n >> k;
	for (int gd = k; gd >= 1; gd--) {
		int total = binpow(k / gd, n);
		int less = 0;
		for (int j = 2 * gd; j <= k; j += gd) {
			less +=  cnt[j];
			less %= mod;
		}
		cnt[gd] = total - less;
		cnt[gd] += mod;
		cnt[gd] %= mod;
	}
	int ans = 0;
	for (int gd = 1; gd <= k; gd++) {
		ans += gd * cnt[gd];
		ans %= mod;
	}
	cout << ans << endl;
	return 0;
}

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

#include <vector>
#include <iostream>
using namespace std;
const int M = 1000000007;

long long modexp(int x, long long e, int m) {
    long long ans = 1, p = x % m;
    while (e > 0) {
        if (e % 2 != 0) ans = (ans * p) % m;
        p = (p * p) % m;
        e >>= 1;
    }
    return ans;
}

int main() {
    int n, k; cin >> n >> k;
    vector<int> mu(k+1, 1);
    vector<bool> b(k+1, true);
    for (int p = 2; p <= k; p++) {
        if (b[p]) {
            for (int q = 2*p; q <= k; q += p) b[q] = false;
            for (int q = p; q <= k; q += p) mu[q] *= -1;
            if ((long long)p*p <= k)
                for (int q = p*p; q <= k; q += p*p) mu[q] = 0;
        }
    }
    long long ans = 0;
    for (int a = 1; a <= k; a++)
        for (int b = 1; a*b <= k; b++)
            ans += mu[b] * modexp(k / a / b, n, M) * a % M;
    cout << (ans % M + M) % M << endl;
}


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

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <algorithm>
#include <cmath>
#include <ios>
#include <ctype.h>
#include <stack>
#include <istream>
#include <stdio.h>
#include <map>
#include <set>
#include <queue>
#include <unordered_map>
#include <functional>
#include <bitset>
#include <list>
#include <deque>
#include <time.h>
#include <random>
#include <iomanip>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,a,b) for (int i = a; i < (b); ++i)
#define all(x) (x).begin(),(x).end()
#define pint pair<int,int>
const int INF = 1000000007;
const long double EPS = 1e-15;
const long double PI = acos(-1);
typedef long long ll;
using namespace std;
using Graph = vector<vector<int>>;
using Graph_weighted = vector<vector<pair<int,int>>>;
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a,b); }
ll ceil(const ll a, const ll b) { return (a + b - 1) / b; }
ll modpow(ll N, ll P, ll M){
    if(P==0) return 1;
    if(P%2==0){
        ll t = modpow(N, P/2, M);
        return t*t % M;
    }
    return N * modpow(N, P-1, M);
}
int main(){
  ll n,k;
  cin >> n >> k;
  vector<ll>ans(k + 1);
  for(int i = k; i > 0; i--){
    if(k / i == 1)ans[i] = 1;
    else{
      ans[i] = modpow(k / i,n,INF);
      ans[i] %= INF;
      for(int j = 2; i * j <= k; j++){
        if(ans[i] - ans[i * j] >= 0)ans [i] -= ans[i * j] % INF;
        else ans[i] = ans[i] - ans[i * j] + INF;
        ans[i] %= INF;
      }
    }
  }
  ll sum = 0;
  REP(i,1,k + 1){
    sum += (ans[i] % INF) * i;
    sum %= INF;
  }
  cout << sum << endl;
  return 0;
}


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

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <algorithm>
#include <cmath>
#include <ios>
#include <ctype.h>
#include <stack>
#include <istream>
#include <stdio.h>
#include <map>
#include <set>
#include <queue>
#include <unordered_map>
#include <functional>
#include <bitset>
#include <list>
#include <deque>
#include <time.h>
#include <random>
#include <iomanip>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,a,b) for (int i = a; i < (b); ++i)
#define all(x) (x).begin(),(x).end()
#define pint pair<int,int>
const int INF = 1000000007;
const long double EPS = 1e-15;
const long double PI = acos(-1);
typedef long long ll;
using namespace std;
using Graph = vector<vector<int>>;
using Graph_weighted = vector<vector<pair<int,int>>>;
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a,b); }
ll ceil(const ll a, const ll b) { return (a + b - 1) / b; }
ll modpow(ll N, ll P, ll M){
    if(P==0) return 1;
    if(P%2==0){
        ll t = modpow(N, P/2, M);
        return t*t % M;
    }
    return N * modpow(N, P-1, M);
}
int main(){
  ll n,k;
  cin >> n >> k;
  vector<ll>ans(k + 1);
  for(int i = k; i > 0; i--){
    if(k / i == 1)ans[i] = 1;
    else{
      ans[i] = modpow(k / i,n,INF);
      for(int j = 2; i * j <= k; j++){
        if(ans[i] - ans[i * j] >= 0)ans [i] -= ans[i * j] % INF;
        else ans[i] = ans[i] - ans[i * j] + INF;
      }
    }
  }
  ll sum = 0;
  REP(i,1,k + 1){
    sum += (ans[i] % INF) * i;
    sum %= INF;
  }
  cout << sum << endl;
  return 0;
}


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


#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
using namespace std;
#define testing 1
#define FOR(i,s,e) for(ll i = s; i <= (ll)e; ++i)
#define DEC(i,s,e) for(ll i = s; i >= (ll)e; --i)
#define IAMSPEED ios_base::sync_with_stdio(false); cin.tie(0);
#define db(x) cerr << #x << "=" << x << "\n"
#define db2(x, y) cerr << #x << "=" << x << " , " << #y << "=" << y << "\n"
#define db3(a,b,c) cerr<<#a<<"="<<a<<","<<#b<<"="<<b<<","<<#c<<"="<<c<<"\n"
#define dbv(v) cerr << #v << ":"; for (auto ite : v) cerr << ite << ' '; cerr <<"\n"
#define dbvp(v) cerr << #v << ":"; for (auto ite : v) cerr << "{"  << ite.f << ',' << ite.s << "} "; cerr << "\n"
#define dba(a,ss,ee) cerr << #a << ":"; FOR(ite,ss,ee) cerr << a[ite] << ' '; cerr << "\n"
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define ll long long 
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define f first
#define s second
#define reach cerr << "LINE: " << __LINE__ << "\n";
typedef pair <int, int> pi;
typedef tuple<int,int,int> ti3;
string cts(char x) {string t(1,x); return t;}
ll rand(ll a, ll b) { return a + rng() % (b-a+1); }
const int MOD = 1e9 + 7;
const int inf = (int)1e9 + 500;
const long long oo = (ll)1e18 + 500;
template <typename T> void chmax(T& a, T b) { a = max(a, b); }
template <typename T> void chmin(T& a, T b) { a = min(a, b); }
const int MAXN = 1e5+5;
#if !testing
#define cerr if(0)cout
#endif
ll dp[MAXN];

ll qexp(ll a, ll b, ll mod) {
	ll res = 1;
	a%=mod;
	while(b) {
		if(b&1)res=res*a%mod;
		a=a*a%mod;
		b>>=1;
	}
	return res;
}
int32_t main() 
{
	IAMSPEED
	ll n,k; cin >> n >> k;
	ll ans = 0;
	DEC(i,k,1) {
		dp[i] += qexp((k/i),n,MOD);
		for(int j=i*2;j<MAXN;j+=i) {
			dp[i] = (dp[i] + MOD - dp[j]) % MOD;
		}
		dp[i]%=MOD;
		ans += dp[i]*i;
		ans %=MOD;
	}
	cout << ans;
}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, n) for (int i = 1; i <= (int)(n); i++)
#define ll long long
int in() {int x; cin>>x; return x;}
ll lin() {ll x; cin>>x; return x;}
string sin() {string x;cin>>x;return x;}
using graph = vector<vector<int>>;
using graph2 = vector<vector<pair<int, int>>>;

bool ifprime(int x){
    if(x==1)return false;
    if(x==2)return true;
    if(x%2==0)return false;
    for(int i=2;i*i<=x;i++){if(x%i==0)return false;}
    return true;
}
ll mod(ll x, ll y){if(x>=0||x%y==0) return x%y;return y+x%y;} //mod including minus
ll dv0(ll x, ll y){if(x>=0||x%y==0)return x/y;return x/y-1;} //rnd down
ll dv1(ll x, ll y){if(x%y==0) return dv0(x,y);return dv0(x,y)+1;} //rnd up

//Start from Here
int main(){
    ll N, K;
    cin>>N>>K;
    ll M=1e09+7;
    ll a[K+1];
    ll r;
    for(ll i=K;i>0;i--){
        rep2(j, K/i){
            if(j==1){
                r=K/i;
                rep(k, N-1){
                    r*=K/i;
                    r%=M;
                }
                a[i]=r;
            }
            else{
                a[i]-=a[j*i];
                a[i]=mod(a[i],M);
            }
        }
    }

    ll sum=0;
    rep2(i, K){
        sum+=a[i]*i;
        sum%=M;
    }
    
    cout<<sum<<endl;
}

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

n, k = map(int, input().split())
mod = 10**9+7
ans = 0
li = [None]*(k+1)
for i in range(k, 0, -1):
    tmp = pow(k//i, n, mod)
    for j in range(2*i, k+1, i):
        tmp -= li[j]
    li[i] = tmp
    ans += tmp*i
print(ans%mod)

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n, k = map(int, input().split())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:4: error: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
    1 | n, k = map(int, input().split())
      |    ^
main.c:1:8: error: implicit declaration of function 'map' [-Wimplicit-function-declaration]
    1 | n, k = map(int, input().split())
      |        ^~~
main.c:1:12: error: expected expression before 'int'
    1 | n, k = map(int, input().split())
      |            ^~~
main.c:2:1: error: expected ',' or ';' before 'mod'
    2 | mod = 10**9+7
      | ^~~
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n); for(long long i = 0;i < (n);i++)
using ll = long long;
using vl = vector<long long>;
using P = pair<long long,long long>;
const int mod = 1000000007;

ll ruijo(ll x, ll n){
	if(n == 0)return 1;
    if(n%2 == 0)return ruijo(x*x%mod ,n/2)%mod;
	return x * ruijo(x*x%mod ,n/2)%mod;
}

int main(){
	ll n,k; cin >> n >> k;
	vl ans(k);
	for(ll i = k-1;i>=0;i--){
		ans[i] = ruijo(k/(i+1),n);
		for(ll j = 2*i+1;j<k;j += (i+1)){
			ans[i] -= ans[j];
		}
	}
	ll sum = 0;
	rep(i,k){
		sum += ans[i]*(i+1);
		sum %= mod;
	}
	if(sum < 0)sum += mod;
	cout << sum << endl;
} 

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

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

long long modpow(long long a,long long n,long long p = 1e9+7){
    long long result = 1;
    while(n > 0){
        if(n & 1) (result *= a) %= p;
        (a*=a) %= p;
        n >>= 1;
    }
    return result;
}
#define ll long long
#define rep(i,x,y) for(ll i=x;i<y;i++)
#define rel(i,x,y) for(ll i=x-1;i>=y;i--)
#define all(x) x.begin(),x.end()
ll mod = 1e9+7;
ll dp[100010]; //kで割れる個数
int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    ll n,k; cin >> n >> k;
    ll ans=0;
    rel(i,k+1,1){
        dp[i] = modpow(k/i,n);
        for(ll j=2*i;j<=k;j+=i){
            dp[i] -= dp[j];
            if(dp[i]<0) dp[i] += mod;
        }
        ans = (ans+(dp[i] * i)%mod)%mod;
    }
    cout << ans << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll,ll> pll;
const ll mod=1e9+7;
//const ll mod=998244353;
const ll inf=5e18;

ll n,k;
vec cnt(1e5+10,-1);
vec ans(1e5+10,-1);

ll mpow(ll x, ll n) {
  ll ans=1;
  while(n>0) {
    if(n&1) {
      ans=ans*x%mod;
    }
    x=x*x%mod;
    n>>=1;
  }
  return ans;
}

ll dfs(ll t) {
  if(cnt[t]>0) return cnt[t];
  cnt[t]=mpow(k/t,n);
  ans[t]=0;
  for(ll i=2;i*t<=k;i++) {
    (cnt[t]+=mod-dfs(i*t))%mod;
  }
  ans[t]=cnt[t]*t%mod;
  return cnt[t];
}

int main() {
  cin >> n >> k;
  ll sum=0;
  dfs(1);
  for(ll i=1;i<=k;i++) {
    (sum+=ans[i])%=mod;
  }
  cout << sum << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
typedef long long ll;
#define rep(i,a,n) for(int i=a;i<n;i++)
#define rrep(i,n,a) for(int i=n;i>=a;i--)
#define FOR(i,n) for(int i=0;i<n;i++)
#define all(s) s.begin(),s.end()
#define lla(s) s.rbegin(),s.rend()
#define pcnt(b) __builtin_popcount(b)
#define vi vector<int>
#define vvi vector<vector<int>>
const int MOD = 1e9 + 7;
//const int MOD = 998244353;
const ll INF = 1e18;

int G[100010]={};


int pw(int a, int st) {
    if (st == 0) return 1;
    int b = pw(a, st / 2);
    b = (b * b) % MOD;
    if (st % 2)
        return (a * b) % MOD;
    return b;
}

signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n,k;
    cin>>n>>k;
    rrep(i,k,1){
        int tmp = pw(k/i,n)%MOD;
        for(int j = i + i;j <= k;j+=i){
            tmp = (tmp-G[j])%MOD;
        }
        G[i] = tmp%MOD;
    }
    int ans = 0;
    rep(i,1,k+1){
        ans += i*G[i]%MOD;
        ans%=MOD;
    }
    cout<<ans<<endl;
}

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

#include<stdio.h>
#define mod 1000000007
#define ll long long
ll n,k;
ll ans[100010];
ll quickpow(ll a,ll b){
	ll ans=1;
	while(b!=0){
		if(b%2==1)ans=(ans%mod*a%mod)%mod;
		b=b/2;
		a=(a%mod*a%mod)%mod;
	} 
	return ans;
}
int main(){
	scanf("%lld %lld",&n,&k);
	for(ll i=k;i>=1;i--){
		ans[i]=quickpow(k/i,n);
		for(ll j=(ll)2*i;j<=k;j=j+i){
			ans[i]=(ans[i]-ans[j]+mod)%mod;
		}
	}
	ll res=0;
	for(ll i=1;i<=k;i++){
		res=(res+i*ans[i])%mod;
	}
	printf("%lld\n",res);
}
#include<stdio.h>
#define mod 1000000007
#define ll long long
ll n,k;
ll ans[100010];
ll quickpow(ll a,ll b){
	ll ans=1;
	while(b!=0){
		if(b%2==1)ans=(ans%mod*a%mod)%mod;
		b=b/2;
		a=(a%mod*a%mod)%mod;
	} 
	return ans;
}
int main(){
	scanf("%lld %lld",&n,&k);
	for(ll i=k;i>=1;i--){
		ans[i]=quickpow(k/i,n);
		for(ll j=(ll)2*i;j<=k;j=j+i){
			ans[i]=(ans[i]-ans[j]+mod)%mod;
		}
	}
	ll res=0;
	for(ll i=1;i<=k;i++){
		res=(res+i*ans[i])%mod;
	}
	printf("%lld\n",res);
}

Compiler output:
main.c:34:4: error: redefinition of 'quickpow'
   34 | ll quickpow(ll a,ll b){
      |    ^~~~~~~~
main.c:6:4: note: previous definition of 'quickpow' with type 'long long int(long long int,  long long int)'
    6 | ll quickpow(ll a,ll b){
      |    ^~~~~~~~
main.c:43:5: error: redefinition of 'main'
   43 | int main(){
      |     ^~~~
main.c:15:5: note: previous definition of 'main' with type 'int()'
   15 | int main(){
      |     ^~~~
Language: C

include <stdio.h>

#define mod 1000000007
#define ll long long


ll n,k;
ll ans[100010];


ll quickpow(ll a,ll b){ 
        ll ans = 1;
        while(b != 0){ 
                if(b%2 == 1){ 
                        ans = (ans%mod*a%mod)%mod;
                }   
                b = b/2;
                a = (a%mod*a%mod)%mod;
        }   
        return ans;
}


int main(void){

        scanf("%lld %lld",&n,&k);
        for(ll i=k;i>=1;i--){
                ans[i] = quickpow(k/i,n);

                for(ll j=(ll)2*i;j<=k;j=j+i){
                        ans[i] = (ans[i]-ans[j]+mod)%mod;
                }   
        }   

        ll res = 0;
        for(ll i=1;i<=k;i++){
                res = (res+i*ans[i])%mod;
        }   
        printf("%lld\n",res);
return 0;
}


Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:26:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   26 |         scanf("%lld %lld",&n,&k);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:26:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   26 |         scanf("%lld %lld",&n,&k);
      |         ^~~~~
main.c:26:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:26:28: error: 'n' undeclared (first use in this function)
   26 |         scanf("%lld %lld",&n,&k);
      |                            ^
main.c:26:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:31: error: 'k' undeclared (first use in this function)
   26 |         scanf("%lld %lld",&n,&k);
      |                               ^
main.c:39:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   39 |         printf("%lld\n",res);
      |         ^~~~~~
main.c:39:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:39:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:39:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

include <stdio.h>

#define mod 1000000007
#define ll long long


ll n,k;
ll ans[100010];


ll quickpow(ll a,ll b){ 
        ll ans = 1;
        while(b != 0){ 
                if(b%2 == 1){ 
                        ans = (ans%mod*a%mod)%mod;
                }   
                b = b/2;
                a = (a%mod*a%mod)%mod;
        }   
        return ans;
}


int main(void){

        scanf("%lld %lld",&n,&k);
        for(ll i=k;i>=1;i--){
                ans[i] = quickpow(k/i,n);

                for(ll j=(ll)2*i;j<=k;j+=i){
                        ans[i] = (ans[i]-ans[j]+mod)%mod;
                }   
        }   

        ll res = 0;
        for(ll i=1;i<=k;i++){
                res = (res+i*ans[i])%mod;
        }   
        printf("%lld\n",res);
return 0;
}


Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
main.c: In function 'main':
main.c:26:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   26 |         scanf("%lld %lld",&n,&k);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include <stdio.h>
main.c:26:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   26 |         scanf("%lld %lld",&n,&k);
      |         ^~~~~
main.c:26:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:26:28: error: 'n' undeclared (first use in this function)
   26 |         scanf("%lld %lld",&n,&k);
      |                            ^
main.c:26:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:31: error: 'k' undeclared (first use in this function)
   26 |         scanf("%lld %lld",&n,&k);
      |                               ^
main.c:39:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   39 |         printf("%lld\n",res);
      |         ^~~~~~
main.c:39:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:39:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:39:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <bits/stdc++.h>
using namespace std;
typedef int ll;
const ll N=2e5+5,mod=1e9+7;
ll power(ll n,ll p){
    ll ans=1;
    while(p){
        if(p&1)ans*=n,ans%=mod;
        p>>=1;
        n*=n;
        n%=mod;
    }
    return ans;
}
ll sum[N],ans;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n,k;cin>>n>>k;
    for(ll i=k;i>=1;i--){
        ll cnt=k/i;
        sum[i] = power(cnt,n);
        for(ll j=2*i;j<=k;j+=i)sum[i]=sum[i]-sum[j]+mod,sum[i]%=mod;
        ans+=(sum[i]*i)%mod;
        ans%=mod;
    }
    cout<<ans;
}


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

#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N=1e5+5;
const int MD=1e9+7;
int f[N];
int quick_pow(int x,int y) {
    int ans=1;
    while(y) {
        if(y&1) ans=1LL*ans*x%MD;
        y>>=1;
        x=1LL*x*x%MD;
    }
    return ans;
}
void add(int &x,int y) {
    x+=y;
    if(x>=MD) x-=MD;
    if(x<0) x+=MD;
}
int main() {
    int n,k;
    scanf("%d%d",&n,&k);
    for(int i=k;i>=1;i--) {
        f[i]=quick_pow(k/i,n);
        for(int j=2*i;j<=k;j+=i) {
            add(f[i],-f[j]);
        }
    }
    int ans=0;
    for(int i=1;i<=k;i++) {
        add(ans,1LL*f[i]*i%MD);
    }
    printf("%d\n",ans);
    return 0;
}

E.cpp_1

Compiler output:
a.cc:38:1: error: 'E' does not name a type
   38 | E.cpp_1
      | ^
Language: C

#include <bits/stdc++.h>

using ll = long long;
using namespace std;
const int INFint = 2e9+1;
const ll INFll = 2e18+1;


// modint: mod 計算を int を扱うように扱える構造体
template<int MOD> struct Fp {
    long long val;
    constexpr Fp(long long v = 0) noexcept : val(v % MOD) {
        if (val < 0) val += MOD;
    }
    constexpr int getmod() { return MOD; }
    constexpr Fp operator - () const noexcept {
        return val ? MOD - val : 0;
    }
    constexpr Fp operator + (const Fp& r) const noexcept { return Fp(*this) += r; }
    constexpr Fp operator - (const Fp& r) const noexcept { return Fp(*this) -= r; }
    constexpr Fp operator * (const Fp& r) const noexcept { return Fp(*this) *= r; }
    constexpr Fp operator / (const Fp& r) const noexcept { return Fp(*this) /= r; }
    constexpr Fp& operator += (const Fp& r) noexcept {
        val += r.val;
        if (val >= MOD) val -= MOD;
        return *this;
    }
    constexpr Fp& operator -= (const Fp& r) noexcept {
        val -= r.val;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr Fp& operator *= (const Fp& r) noexcept {
        val = val * r.val % MOD;
        return *this;
    }
    constexpr Fp& operator /= (const Fp& r) noexcept {
        long long a = r.val, b = MOD, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        val = val * u % MOD;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr bool operator == (const Fp& r) const noexcept {
        return this->val == r.val;
    }
    constexpr bool operator != (const Fp& r) const noexcept {
        return this->val != r.val;
    }
    friend constexpr ostream& operator << (ostream &os, const Fp<MOD>& x) noexcept {
        return os << x.val;
    }
    friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, long long n) noexcept {
        if (n == 0) return 1;
        auto t = modpow(a, n / 2);
        t = t * t;
        if (n & 1) t = t * a;
        return t;
    }
};
const int MOD = 1e9+7;
using mint = Fp<MOD>;
int main(){
  int N,K;
  cin>>N>>K;
  mint ans = modpow((mint)K,N);
  mint cnt[100001] = {0};
  for(int i(K);i>=2;i--){
    mint kosuu = K/i;
    mint pa = modpow(kosuu,N);
    int tmp = i;
    while(tmp+i <= K){
      pa -= cnt[tmp+i];      
      tmp += i;
    }
    cnt[i] = pa;
    ans += pa*(i-1);
  }
  cout << ans << endl;
  return 0;
}


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

#include<bits/stdc++.h>
#define enld '\n'
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("Ofast")
constexpr ll INF = 1e18;
constexpr int inf = 1e9;
constexpr double INFD = 1e100;
constexpr ll mod = 1000000007;
constexpr ll mod2 = 998244353;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
// ios::sync_with_stdio(false);
// cin.tie(nullptr);
// ---------------------------------------------------------------------------

// snukeさんのmodint
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const {
    return pow(mod-2);
  }
  mint& operator/=(const mint a) {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const {
    mint res(*this);
    return res/=a;
  }
};

// mint N;
//cout << N.x << endl;


int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll N,K;
    cin >> N >> K;
    vector<mint> cnt(K+1);
    for(int i=K; i>=1; i--){
        cnt[i] = K/i;
        cnt[i] = cnt[i].pow(N);
        ll temp = i*2;
        while(temp <= K){
            cnt[i] -= cnt[temp];
            temp += i;
        }
    }
    mint ans = 0;
    for(int i=1; i<=K; i++){
        ans += cnt[i] * mint(i);
    }
    cout << ans.x << enld;
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define repp(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define repm(i,n) for(int (i)=(n-1);(i)>=0;(i)--)
#define INF (1ll<<60)
#define all(x) (x).begin(),(x).end()
typedef long long lint;
const lint MOD =1000000007;
const lint MAX = 1000000;
using Graph =vector<vector<lint>>;
typedef pair<lint,lint> P;
 
 
lint fac[MAX], finv[MAX], inv[MAX];
 
void COMinit() 
{
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (lint i = 2; i < MAX; i++)
    {
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
long long COM(lint n, lint k)
{
    if (n < k)
        return 0;
    if (n < 0 || k < 0)
        return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
lint primary(lint num)
{
    if (num < 2) return 0;
    else if (num == 2) return 1;
    else if (num % 2 == 0) return 0;
 
    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return 0;
        }
    }
 
    return 1;
}
   long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
    lint lcm(lint a,lint b){
        return a/__gcd(a,b)*b;
    }
     lint gcd(lint a,lint b){
        return __gcd(a,b);
    }    
//解説AC
  int main(){
   lint n,k;
   cin>>n>>k;
   lint ans=0;
    lint tot[k];
    repm(i,k){
        lint f=k/(i+1);
        lint g=modpow(f,n,MOD);
        lint h=i+1;
        while(1){
            h+=i+1;
            if(h>k)break;
            g-=tot[h-1];
            g+=MOD;
            g%=MOD;
        }
        tot[i]=g;
        ans+=g*(i+1);
        ans%=MOD;
    }
    cout<<ans;
  }
  
     


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

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


int* g;

long long int_pow(long long a, long long b, const int& mod) {
    long long ans(1);
    while (b) {
        if (b % 2) ans = ans * a % mod;
        a = a * a % mod;
        b /= 2;
    }
    return ans;
}

void pre_calc(const int& n) {
    bool* is_c = new bool[n + 1];
    vector<int> p;
    //vector<int> g(n + 1);
    g = new int[n + 1];
    g[1] = 1;

    for (int i = 2; i <= n; ++i) {
        if (!is_c[i]) {
            p.push_back(i);
            // phi: i-1, mu: -1, lcm: i - i * i
            g[i] = i - 1;
        }
        
        for (int j = 0; j < p.size() && p[j] * i <= n; ++j) {
            is_c[i * p[j]] = true;
            // for mobius function: 
            // g[i] * (i % p[j] ? g[p[j]] : 0)
            g[i * p[j]] = g[i] * (i % p[j] ? g[p[j]] : p[j]);
            if (i % p[j] == 0) break;
        }
    }

    delete[] is_c;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;

#define ll long long
#define ld long double
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define gcd __gcd
#define lcm(a, b) ((a) * (b) / gcd((a), b))
#define all(x) x.begin(), x.end()
#define rep(i, x, n) for (ll i = x; i < n; i++)
#define fastio() ios_base::sync_with_stdio(NULL); cin.tie(0); cout.tie(0)
#define endl '\n'

typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef pair<int, int> ii;
typedef vector<pair<int, int> > vii;

template <class T> inline T RD(T &a) {T x; cin >> x; return a = x;}

//OJ freopen Template
void OJF(const char* inp, const char* out) {
	if (strlen(inp) > 0) freopen(inp, "r", stdin);
	if (strlen(out) > 0) freopen(out, "w", stdout);
}

const int mod = 1e9 + 7, maxn = 100005;

ll binpow(ll a, ll b) {
	int ans = 1, exp = a;
	while(b){
		if(b & 1){
			ans = 1LL * ans * exp % mod;
		}
		exp = 1LL * exp * exp % mod;
		b /= 2;
	}
	return ans;
}

int main(){
    ll n, k;
	cin >> n >> k;
	vector<bool> check(maxn);
	vector<ll> m(maxn), h(maxn);
	for(int i = 1; i <= k; i++){
		m[i] = 1;
		check[i] = true;
	}
	for(int i = 2; i <= k; i++){
		if(check[i]){
			for(int j = i; j <= k; j += i){
				check[j] = false;
				if((j / i) % i == 0){
					m[j] = 0;
				}else{
					m[j] *= -1;
				}
			}
		}
	}
	for(int i = 1; i <= k; i++){
		h[i] = binpow(k / i, n);
	}
	ll ans = 0;
	for(int j = 1; j <= k; j++){
		int f = 0;
		for(int i = j; i <= k; i += j){
			f = (f + 1ll * h[i] * m[i / j]) % mod;
		}
		ans = (ans + 1ll * j * f) % mod;
	}
	cout << (ans + mod) % mod;
	return 0;
}


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


// E - Sum of gcd of Tuples (Hard)

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// const int INF = 2147483647;
// const ll INF = 9223372036854775807;
const ll MOD = 1e9 + 7;

ll cnt[100001]; // cnt[i]: GCDがiとなる場合の数

ll mod_pow(ll a, ll n, ll mod) {
	ll result = 1;
	while (n > 0) {
		if (n & 1) result = result * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return result;
}

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

	// GCDがiの倍数となる場合の数（数列のそれぞれの数がiの倍数であればよい）で初期化
	for (int i=1; i<=K; i++) {
		cnt[i] = mod_pow(K/i, N, MOD);
	}

	for (int i=K; i>=1; i--) {
		for (int j=2; i*j<=K; j++) {
			cnt[i] = (cnt[i] - cnt[i*j] + MOD) % MOD;
		}
	}

	ll ans = 0;
	for (int i=1; i<=K; i++) {
		ans = (ans + (cnt[i] * i % MOD)) % MOD;
	}

	cout << ans << endl;

	return 0;
}

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

//https://blog.csdn.net/qq_43765333/article/details/105489635

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define chmax(x,y) x = max(x,y)
#define chmin(x,y) x = min(x,y)

const int mod = 1000000007;
struct mint {
ll x; 
mint(ll x=0):x((x%mod+mod)%mod){}
mint operator-() const { return mint(-x);}
mint& operator+=(const mint a) {
if ((x += a.x) >= mod) x -= mod;
return *this;
 }
mint& operator-=(const mint a) {
if ((x += mod-a.x) >= mod) x -= mod;
return *this;
 }
 mint& operator*=(const mint a) {
(x *= a.x) %= mod;
return *this;
}
mint operator+(const mint a) const {
mint res(*this);
return res+=a;
}
mint operator-(const mint a) const {
mint res(*this);
return res-=a;
}
 mint operator*(const mint a) const {
mint res(*this);
return res*=a;
}
mint pow(ll t) const {
if (!t) return 1;
mint a = pow(t>>1);
a *= a;
if (t&1) a *= *this;
return a;
}
 mint inv() const {
return pow(mod-2);
 }
  mint& operator/=(const mint a) {
return (*this) *= a.inv();
 }
mint operator/(const mint a) const {
mint res(*this);
return res/=a;
 }
};

int main() {
ios::sync_with_stdio(false);
cin.tie(0);

ll n,k;
cin>>n>>k;

//dp[i]表示最大公约数为i的gcd(k1,k2,..,kn)的数量
mint dp[k+1],ans=0;
for(ll i=k;i>=1;i--){
    dp[i]=mint(k/i).pow(n);
    //消除重复的情况
    for(ll j=2*i;j<=k;j+=i)d[i]-=dp[j];
    ans+=dp[i];
}
cout<<ans.x<<endl;
return 0;
}

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

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
  
using namespace std;
using namespace __gnu_pbds;
 
#define ll long long
#define uint unsigned int
#define ull  unsigned long long
#define pb push_back
#define mk make_pair
#define ins insert
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define X first
#define Y second
#define umap unordered_map
#define speed() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define setvalue(d,s,e,n) for(int qwe = s; qwe < e; ++qwe) d[qwe] = n
#define mset multiset
#define pqueue priority_queue
   
template<class T> using oset=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
        
const int  N = 2e5 + 314;
const int INF = 1e9;
const double PI = acos(-1);
const int MOD = 1e9 + 7;
const double eps = 1e-9;
ll a[N];
 
ll bp(ll a, ll n) {
    ll res = 1;
    while(n) {
        if(n % 2)
            res = (res * a ) % MOD;
        a = (a * a) % MOD; 
        n /= 2;
    }
    return res;
}

void solve(){
    ll n, k;
    cin >> n >> k;
    ll ans = 0;
    for(int i = k; i >= 1; --i) {
        ll p = bp(k / i, n); 
        for(int j = 2 * i; j <= k; j += i) {
            p -= a[j];
            p += MOD;
            p %= MOD;
        }
        a[i] = p;
        ans += 1ll * p * i;
        ans %= MOD;
    }    
    cout << ans;
}

 
int main(){
    speed();
    int t = 1;
    // cin >> t;
    while(t--)solve();
}

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

#include <bits/stdc++.h>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  const int mod = 1000 * 1000 * 1000 + 7;

  auto power = [&](int x, int n) {
    int y = 1;
    while (n > 0) {
      if (n & 1) {
        y = (long long)y * x % mod;
      }
      x = (long long)x * x % mod;
      n >>= 1;
    }
    return y;
  };

  int n, k;
  cin >> n >> k;

  vector<int> cnt(k + 1);

  for (int i = k; i > 0; i--) {
    cnt[i] = power(k / i, n);
    for (int j = i + i; j <= k; j += i) {
      cnt[i] -= cnt[j];
      if (cnt[i] < 0) {
        cnt[i] += mod;
      }
    }
  }

  int ans = 0;
  for (int i = 1; i <= k; i++) {
    ans += (long long)i * cnt[i] % mod;
    if (ans >= mod) {
      ans -= mod;
    }
  }

  cout << ans << "\n";
}

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

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

typedef long long ll;
#define REP(i,n) for(int(i)=0;(i)<(n);++(i))

const ll MOD = 1e9 + 7;

// a^n mod
ll modpow (int a, int n) {
  int res = 1;
  while (n > 0) {
    if (n % 2 == 1) res = a % MOD;
    a = a*a % MOD;
    n = n/2;
  }
  return res;
}
  

int main () {
  int n, k;
  cin >> n >> k;
  
  ll sum = 0;
  
  for (int i = 1; i <= k; ++i) {
    sum += i * (powmod(k/i, n) - powmod(k/i - 1, n));
  }
  cout << sum << endl;  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:17: error: 'powmod' was not declared in this scope
   28 |     sum += i * (powmod(k/i, n) - powmod(k/i - 1, n));
      |                 ^~~~~~