Language: C++

#include <iostream> // cin, cout, cerr, clog
#include <algorithm> // minmax, sort, swap
#include <numeric> // iota, accumulate, inner_product
#include <cstdio> // printf, scanf
#include <climits> // INT_MIN, LLONG_MIN
#include <cmath> // long, trig, pow
#include <string> // string, stoi, to_string
#include <vector> // vector
#include <queue> // queue, priority_queue
#include <stack> // stack
#include <map> // key-value pairs sorted by keys
#include <set> // set
#include <unordered_map> // hashed by keys
#include <unordered_set> // hashed by keys
#include <iomanip> // cout<<setprecision(n)

#define rep(i,n) for(int i = 0; i < n; i++)
#define ENDL "\n"
#define print(i) std::cout << (i) << "\n"

#define int long long // at least int64 > 9*10^18
#define all(v) v.begin(), v.end()
#define MOD 1000000007
template<typename T,T MOD = 1000000007>
struct Mint{
  T v;
  Mint():v(0){}
  Mint(signed v):v(v){}
  Mint(long long t){v=t%MOD;if(v<0) v+=MOD;}

  Mint pow(long long k){
    Mint res(1),tmp(v);
    while(k){
      if(k&1) res*=tmp;
      tmp*=tmp;
      k>>=1;
    }
    return res;
  }
  
  static Mint add_identity(){return Mint(0);}
  static Mint mul_identity(){return Mint(1);}
  
  Mint inv(){return pow(MOD-2);}
  
  Mint& operator+=(Mint a){v+=a.v;if(v>=MOD)v-=MOD;return *this;}
  Mint& operator-=(Mint a){v+=MOD-a.v;if(v>=MOD)v-=MOD;return *this;}
  Mint& operator*=(Mint a){v=1LL*v*a.v%MOD;return *this;}
  Mint& operator/=(Mint a){return (*this)*=a.inv();}
  
  Mint operator+(Mint a) const{return Mint(v)+=a;};
  Mint operator-(Mint a) const{return Mint(v)-=a;};
  Mint operator*(Mint a) const{return Mint(v)*=a;};
  Mint operator/(Mint a) const{return Mint(v)/=a;};

  Mint operator-() const{return v?Mint(MOD-v):Mint(v);}

  bool operator==(const Mint a)const{return v==a.v;}
  bool operator!=(const Mint a)const{return v!=a.v;}
  bool operator <(const Mint a)const{return v <a.v;}

  // find x s.t. a^x = b
  static T log(T a,T b){
    const T sq=40000;
	std::unordered_map<T, T> dp;
    dp.reserve(sq);
    Mint res(1);
    for(int r=0;r<sq;r++){
      if(!dp.count(res.v)) dp[res.v]=r;
      res*=a;
    }
    Mint p=Mint(a).inv().pow(sq);
    res=b;
    for(int q=0;q<=MOD/sq+1;q++){
      if(dp.count(res.v)){
        T idx=q*sq+dp[res.v];
        if(idx>0) return idx;
      }
      res*=p;
    }
    return T(-1);
  }
  
  static Mint comb(long long n,int k){
    Mint num(1),dom(1);
    for(int i=0;i<k;i++){
      num*=Mint(n-i);
      dom*=Mint(i+1);
    }
    return num/dom;
  }
};

signed main() {
	int n,k;
	std::cin >> n >> k;
	Mint<int> a(n);
	Mint<int> b(0);
	for(int i=1;i<=n;i++) b += Mint<int>(n/i);
	print((b.pow(k-1)).v);
	return 0;
}


Compiler output:
a.cc:23:13: error: expected '>' before numeric constant
   23 | #define MOD 1000000007
      |             ^~~~~~~~~~
a.cc:24:23: note: in expansion of macro 'MOD'
   24 | template<typename T,T MOD = 1000000007>
      |                       ^~~
a.cc: In function 'int main()':
a.cc:97:17: error: wrong number of template arguments (1, should be 2)
   97 |         Mint<int> a(n);
      |                 ^
a.cc:25:8: note: provided for 'template<class T, T <anonymous> > struct Mint'
   25 | struct Mint{
      |        ^~~~
a.cc:98:17: error: wrong number of template arguments (1, should be 2)
   98 |         Mint<int> b(0);
      |                 ^
a.cc:25:8: note: provided for 'template<class T, T <anonymous> > struct Mint'
   25 | struct Mint{
      |        ^~~~
a.cc:99:44: error: wrong number of template arguments (1, should be 2)
   99 |         for(int i=1;i<=n;i++) b += Mint<int>(n/i);
      |                                            ^
a.cc:25:8: note: provided for 'template<class T, T <anonymous> > struct Mint'
   25 | struct Mint{
      |        ^~~~
a.cc:100:18: error: request for member 'pow' in 'b', which is of non-class type 'int'
  100 |         print((b.pow(k-1)).v);
      |                  ^~~
a.cc:19:32: note: in definition of macro 'print'
   19 | #define print(i) std::cout << (i) << "\n"
      |                                ^