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

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

const long long int mod=1e9+7;
long long int modpow(long long int x, long long int n){
    long res=1;
    for(; n>0; n>>=1) {
        if (n&1) res=res*x%mod;
        x=x*x%mod;
    }
    return res;
}
long long modinv(long long a) {
    return modpow(a, mod - 2, mod);
}

long long int nCr(long long int n, long long int r){
    long res=1;
    for(long int i=0; i<r; ++i) res=res*(n-i)%mod;
    for(long int i=1; i<=r; ++i) res=res*modpow(i, mod-2)%mod;
    return res;
}
int main(){
    long long int k;
    cin >> k;
    string s;
    cin >> s;
    long long int n=s.length();
    long long int def=modpow(25LL,k);
    long long int tmp = (def*nCr(k+n-1LL,n-1LL))%mod;
    long long int ans = tmp;
    long long int inv=modinv(25LL,mod);
    for(long long int i=1;i<=k;i++){
        tmp *= 26LL;
        tmp %= mod;
        tmp *= inv;
        tmp %= mod;       
        tmp *= modinv(k+n-i,mod);
        tmp %= mod;
        if(i<k)tmp *= (k-i);
        tmp %= mod;
        ans += tmp;
        ans %= mod;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'long long int modinv(long long int)':
a.cc:14:18: error: too many arguments to function 'long long int modpow(long long int, long long int)'
   14 |     return modpow(a, mod - 2, mod);
      |            ~~~~~~^~~~~~~~~~~~~~~~~
a.cc:5:15: note: declared here
    5 | long long int modpow(long long int x, long long int n){
      |               ^~~~~~
a.cc: In function 'int main()':
a.cc:32:29: error: too many arguments to function 'long long int modinv(long long int)'
   32 |     long long int inv=modinv(25LL,mod);
      |                       ~~~~~~^~~~~~~~~~
a.cc:13:11: note: declared here
   13 | long long modinv(long long a) {
      |           ^~~~~~
a.cc:38:22: error: too many arguments to function 'long long int modinv(long long int)'
   38 |         tmp *= modinv(k+n-i,mod);
      |                ~~~~~~^~~~~~~~~~~
a.cc:13:11: note: declared here
   13 | long long modinv(long long a) {
      |           ^~~~~~
Language: C++

#include <iostream>
#include <functional>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <queue>
#include <map>
#include <iomanip>
#include <complex>
#include <random>
#include <bitset>
// #include <prettyprint.hpp>
using namespace std;
#define repi(i,n) for(int i=0;i<n;++i)
#define rep(i,n) for(ll i=0;i<n;++i)
#define repinvi(i,n) for(int i=n-1;i>=0;--i)
#define sll(n) scanf("%lld", &n);
#define sii(n) scanf("%d", &n);
#define slf(n) scanf("%lf", &n);
#define pll pair<ll,ll>
#define pii pair<int,int>
#define psi pair<si,si>
typedef long long ll;
typedef double lf;
typedef short int si;
// static const ll 1000000007;

// typedef long long ll;
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;}

struct combination {
  vector<mint> fact, ifact;
  combination(int n):fact(n+1),ifact(n+1) {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
  }
  mint operator()(int n, int k) {
    if (k < 0 || k > n) return 0;
    return fact[n]*ifact[k]*ifact[n-k];
  }
};

void Main(){
    ll K;
    string S;
    sll(K);
    cin >> S;
    ll N = S.size();

    combination comb = combination(N+K);
    mint comb_n = comb(N+K, N);
    mint ans = 0;
    rep(i, K){
        mint now = mint(26).pow(K-i) * mint(25).pow(i) * comb(i+(N-1), N-1);
        ans += now;
    }

    cout << ans <<endl;


}

int main(){
    Main();
}

Compiler output:
a.cc: In constructor 'combination::combination(int)':
a.cc:68:5: error: 'assert' was not declared in this scope
   68 |     assert(n < mod);
      |     ^~~~~~
a.cc:15:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
   14 | #include <bitset>
  +++ |+#include <cassert>
   15 | // #include <prettyprint.hpp>
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Comparator;
import java.util.Scanner;
import java.util.TreeMap;

public class Main {
    private long fac[];
    private long finv[];
    private long inv[];
    private static int MAX_LEN = 2100000;
    private static long MOD = 1000000007;
    public static void main(String[] args) throws Exception {
        Main main = new Main();
        main.COMinit();
        main.solve();
    }

    private long pow(int base, int count, long MOD) {
        if (count == 0) {
            return 1;
        }
        if (count % 2 == 1) {
            long t = ((long) base) * pow(base, count - 1, MOD);
            t %= MOD;
            return t;
        }
        long t = pow(base, count / 2, MOD);
        t %= MOD;
        t *= t;
        t %= MOD;
        return t;
    }
    public void solve() throws Exception {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int K = scan.nextInt();
        String S = scan.next();
        int N = S.length();
        long ans = 0;
        for (int i = 0; i <= K; i++) {
            long t1 = COM(i + N - 1, i);
            long t2 = pow(25, i, MOD);
            long t3 = pow(26, K - i, MOD);
            long t = t1 * t2;
            t %= MOD;
            t *= t3;
            t %= MOD;
            ans += t;
            ans %= MOD;
        }
        System.out.println(ans);
    }
    void COMinit() {
        this.fac = new long[MAX_LEN];
        this.finv = new long[MAX_LEN];
        this.inv = new long[MAX_LEN];
        this.fac[0] = this.fac[1] = 1;
        this.finv[0] = this.finv[1] = 1;
        this.inv[1] = 1;
        for (int i = 2; i < MAX_LEN; 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 COM(int n, int k) {
        if (n < k) {
            return 0;
        };
        if (n <0 || k < 0) {
            return 0;
        }
        return fac[n] * (finv[k] * finv[n - k]%MOD)%MOD;
    }
}


Compiler output:
Main.java:62: error: incompatible types: possible lossy conversion from long to int
            inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
                                  ^
1 error
Language: C++

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

const ll mo=1000000007;	

ll comb(ll N_, ll C_) {
	const int NUM_=2400001;
	static ll fact[NUM_+1],factr[NUM_+1],inv[NUM_+1];
	if (fact[0]==0) {
		inv[1]=fact[0]=factr[0]=1;
		for (int i=2;i<=NUM_;++i) inv[i] = inv[mo % i] * (mo - mo / i) % mo;
		for (int i=1;i<=NUM_;++i) fact[i]=fact[i-1]*i%mo, factr[i]=factr[i-1]*inv[i]%mo;
	}
	if(C_<0 || C_>N_) return 0;
	return factr[C_]*fact[N_]%mo*factr[N_-C_]%mo;
}
ll hcomb(int P_,int Q_) { return (P_==0&&Q_==0)?1:comb(P_+Q_-1,Q_);}

ll modpow(ll a, ll n) {
	ll r=1;a%=mo;
	while(n){
      r=r*((n%2)?a:1)%mo;
      a=a*a%mo;
      n>>=1;
    }
	return r;
}


int main() {
  int K;
  string S;
  int N;
  
  cin>>K>>S;
  N=S.size();
	
  ll ret=0;
  for(int i=0;i<=K;i++){
    ret+=modpow(26,i)*modpow(25,K-i)%mo*hcomb(N,K-i)%mo;
  }
  
  cout<<ret%mo<<endl;
  return 0;
}


Compiler output:
a.cc:4:7: error: 'll' does not name a type
    4 | const ll mo=1000000007;
      |       ^~
a.cc:6:1: error: 'll' does not name a type
    6 | ll comb(ll N_, ll C_) {
      | ^~
a.cc:17:1: error: 'll' does not name a type
   17 | ll hcomb(int P_,int Q_) { return (P_==0&&Q_==0)?1:comb(P_+Q_-1,Q_);}
      | ^~
a.cc:19:1: error: 'll' does not name a type
   19 | ll modpow(ll a, ll n) {
      | ^~
a.cc: In function 'int main()':
a.cc:38:3: error: 'll' was not declared in this scope
   38 |   ll ret=0;
      |   ^~
a.cc:40:5: error: 'ret' was not declared in this scope
   40 |     ret+=modpow(26,i)*modpow(25,K-i)%mo*hcomb(N,K-i)%mo;
      |     ^~~
a.cc:40:10: error: 'modpow' was not declared in this scope
   40 |     ret+=modpow(26,i)*modpow(25,K-i)%mo*hcomb(N,K-i)%mo;
      |          ^~~~~~
a.cc:40:38: error: 'mo' was not declared in this scope
   40 |     ret+=modpow(26,i)*modpow(25,K-i)%mo*hcomb(N,K-i)%mo;
      |                                      ^~
a.cc:40:41: error: 'hcomb' was not declared in this scope; did you mean 'wctomb'?
   40 |     ret+=modpow(26,i)*modpow(25,K-i)%mo*hcomb(N,K-i)%mo;
      |                                         ^~~~~
      |                                         wctomb
a.cc:43:9: error: 'ret' was not declared in this scope
   43 |   cout<<ret%mo<<endl;
      |         ^~~
a.cc:43:13: error: 'mo' was not declared in this scope
   43 |   cout<<ret%mo<<endl;
      |             ^~
Language: C++

int K;
string S;
int N;

const ll mo=1000000007;	

ll comb(ll N_, ll C_) {
	const int NUM_=2400001;
	static ll fact[NUM_+1],factr[NUM_+1],inv[NUM_+1];
	if (fact[0]==0) {
		inv[1]=fact[0]=factr[0]=1;
		for (int i=2;i<=NUM_;++i) inv[i] = inv[mo % i] * (mo - mo / i) % mo;
		for (int i=1;i<=NUM_;++i) fact[i]=fact[i-1]*i%mo, factr[i]=factr[i-1]*inv[i]%mo;
	}
	if(C_<0 || C_>N_) return 0;
	return factr[C_]*fact[N_]%mo*factr[N_-C_]%mo;
}
ll hcomb(int P_,int Q_) { return (P_==0&&Q_==0)?1:comb(P_+Q_-1,Q_);}

ll modpow(ll a, ll n) {
	ll r=1;a%=mo;
	while(n) r=r*((n%2)?a:1)%mo,a=a*a%mo,n>>=1;
	return r;
}


int main() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>K>>S;
	N=S.size();
	
	ll ret=0;
	FOR(i,K+1) {
		ret+=modpow(26,i)*modpow(25,K-i)%mo*hcomb(N,K-i)%mo;
	}
	cout<<ret%mo<<endl;
  return 0;
}

Compiler output:
a.cc:2:1: error: 'string' does not name a type
    2 | string S;
      | ^~~~~~
a.cc:5:7: error: 'll' does not name a type
    5 | const ll mo=1000000007;
      |       ^~
a.cc:7:1: error: 'll' does not name a type
    7 | ll comb(ll N_, ll C_) {
      | ^~
a.cc:18:1: error: 'll' does not name a type
   18 | ll hcomb(int P_,int Q_) { return (P_==0&&Q_==0)?1:comb(P_+Q_-1,Q_);}
      | ^~
a.cc:20:1: error: 'll' does not name a type
   20 | ll modpow(ll a, ll n) {
      | ^~
a.cc: In function 'int main()':
a.cc:28:28: error: 'string' was not declared in this scope
   28 |         int i,j,k,l,r,x,y; string s;
      |                            ^~~~~~
a.cc:30:9: error: 'cin' was not declared in this scope
   30 |         cin>>K>>S;
      |         ^~~
a.cc:30:17: error: 'S' was not declared in this scope
   30 |         cin>>K>>S;
      |                 ^
a.cc:33:9: error: 'll' was not declared in this scope; did you mean 'l'?
   33 |         ll ret=0;
      |         ^~
      |         l
a.cc:34:9: error: 'FOR' was not declared in this scope
   34 |         FOR(i,K+1) {
      |         ^~~
a.cc:37:9: error: 'cout' was not declared in this scope
   37 |         cout<<ret%mo<<endl;
      |         ^~~~
a.cc:37:15: error: 'ret' was not declared in this scope
   37 |         cout<<ret%mo<<endl;
      |               ^~~
a.cc:37:19: error: 'mo' was not declared in this scope
   37 |         cout<<ret%mo<<endl;
      |                   ^~
a.cc:37:23: error: 'endl' was not declared in this scope
   37 |         cout<<ret%mo<<endl;
      |                       ^~~~
Language: C++

int K;
string S;
int N;

const ll mo=1000000007;	

ll comb(ll N_, ll C_) {
	const int NUM_=2400001;
	static ll fact[NUM_+1],factr[NUM_+1],inv[NUM_+1];
	if (fact[0]==0) {
		inv[1]=fact[0]=factr[0]=1;
		for (int i=2;i<=NUM_;++i) inv[i] = inv[mo % i] * (mo - mo / i) % mo;
		for (int i=1;i<=NUM_;++i) fact[i]=fact[i-1]*i%mo, factr[i]=factr[i-1]*inv[i]%mo;
	}
	if(C_<0 || C_>N_) return 0;
	return factr[C_]*fact[N_]%mo*factr[N_-C_]%mo;
}
ll hcomb(int P_,int Q_) { return (P_==0&&Q_==0)?1:comb(P_+Q_-1,Q_);}

ll modpow(ll a, ll n) {
	ll r=1;a%=mo;
	while(n) r=r*((n%2)?a:1)%mo,a=a*a%mo,n>>=1;
	return r;
}


void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>K>>S;
	N=S.size();
	
	ll ret=0;
	FOR(i,K+1) {
		ret+=modpow(26,i)*modpow(25,K-i)%mo*hcomb(N,K-i)%mo;
	}
	cout<<ret%mo<<endl;
}

Compiler output:
a.cc:2:1: error: 'string' does not name a type
    2 | string S;
      | ^~~~~~
a.cc:5:7: error: 'll' does not name a type
    5 | const ll mo=1000000007;
      |       ^~
a.cc:7:1: error: 'll' does not name a type
    7 | ll comb(ll N_, ll C_) {
      | ^~
a.cc:18:1: error: 'll' does not name a type
   18 | ll hcomb(int P_,int Q_) { return (P_==0&&Q_==0)?1:comb(P_+Q_-1,Q_);}
      | ^~
a.cc:20:1: error: 'll' does not name a type
   20 | ll modpow(ll a, ll n) {
      | ^~
a.cc: In function 'void solve()':
a.cc:28:28: error: 'string' was not declared in this scope
   28 |         int i,j,k,l,r,x,y; string s;
      |                            ^~~~~~
a.cc:30:9: error: 'cin' was not declared in this scope
   30 |         cin>>K>>S;
      |         ^~~
a.cc:30:17: error: 'S' was not declared in this scope
   30 |         cin>>K>>S;
      |                 ^
a.cc:33:9: error: 'll' was not declared in this scope; did you mean 'l'?
   33 |         ll ret=0;
      |         ^~
      |         l
a.cc:34:9: error: 'FOR' was not declared in this scope
   34 |         FOR(i,K+1) {
      |         ^~~
a.cc:37:9: error: 'cout' was not declared in this scope
   37 |         cout<<ret%mo<<endl;
      |         ^~~~
a.cc:37:15: error: 'ret' was not declared in this scope
   37 |         cout<<ret%mo<<endl;
      |               ^~~
a.cc:37:19: error: 'mo' was not declared in this scope
   37 |         cout<<ret%mo<<endl;
      |                   ^~
a.cc:37:23: error: 'endl' was not declared in this scope
   37 |         cout<<ret%mo<<endl;
      |                       ^~~~
Language: C

#include<stdio.h>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define rep(i,n) for(int i=0;i<(lint)(n);i++)
#define REP(i,n) for(int i=1;i<=(lint)(n);i++)
typedef long long lint;
typedef unsigned long long ulint;
const int mod=1000000007;
int k,n=-1,cnt=13;
char c[15];
lint fact[2000010],inv[2000010];
int main(){
	while(true){
		*c=getchar_unlocked();
		if(*c=='\n')break;
		k*=10;
		k+=*c-'0';
	}
	while(getchar_unlocked()!=-1)n++;
	fact[0]=1;
	for(int i=1;i<=n+k;i++)fact[i]=fact[i-1]*i%mod;
	inv[n+k]=1;
	lint now=fact[n+k];
	int b=mod-2;
	while(b){
		if(b&1){
			inv[n+k]*=now;
			inv[n+k]%=mod;
		}
		b>>=1;
		now*=now;
		now%=mod;
	}
	for(int i=n+k-1;i>=0;i--)inv[i]=inv[i+1]*(i+1)%mod;
	lint ans=1;now=1;
	for(int i=1;i<=k;i++){
		now*=25;
		now%=mod;
		ans+=fact[n+k]*inv[n+k-i]%mod*inv[i]%mod*now;
		ans%=mod;
	}
	*(c+14)='\n';
	while(ans){
		*(c+cnt)=ans%10+'0';
		ans/=10;
		cnt--;
	}
	fwrite(c+cnt+1,1,14-cnt,stdout);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:15: error: 'true' undeclared (first use in this function)
   14 |         while(true){
      |               ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | #pragma GCC target("avx")
main.c:14:15: note: each undeclared identifier is reported only once for each function it appears in
   14 |         while(true){
      |               ^~~~
Language: Java

import java.nio.Buffer;
import java.util.Scanner;

public class cf {
    public static Scanner r=new Scanner(System.in);
    public static long []fac=new long[2000010];
    public static long mod=1000000007;
    public static long mul(long a,long b){
        return a*b%mod;
    }
    public static void init(){
        fac[0]=fac[1]=1;
        for(int i=2;i<2000010;++i){
            fac[i]=mul(fac[i-1],1l*i);
        }
    }
    public static long poww(long a,long b){
        long r=1;
        while(b>0){
            if(b%2==1) r=mul(r,a);
            a=mul(a,a);
            b/=2;
        }
        return r;
    }
    public static long inv(long x) {
        return poww(x, mod - 2);
    }
    public static long bino(int n,int k){
        if(k<0) return 0;
        if(k==0) return 1;
        return mul(fac[n],mul(inv(fac[n-k]),inv(fac[k])));
    }
    public static void main(String[] args) {
        init();
        long ans=0;
        int k=r.nextInt();
        String s=r.next();
        int n=s.length();
        long maxx=n+k;
        for(int len=n;len<=maxx;++len){
            long last=maxx-len;
            long ch_last=poww(26,last);
            long pos=bino(len-1,n-1);
            long ch25=poww(25,len-n);
            long cur=mul(mul(pos,ch25),ch_last);
            ans+=cur;
            ans%=mod;
        }
        System.out.println(ans);
    }
}


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

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

struct ModInt {
    using M = ModInt;

    static vector<M> fact, finv;
    static long long MOD;
    long long v;

    // normalize: [-MOD, MOD**2] -> [0, MOD)
    ModInt(const long long _v = 0) : v((_v < 0) ? _v % MOD + MOD : _v % MOD) {}

    M operator+(const M& x) const { return M(v + x.v); }
    M operator-(const M& x) const { return M(v - x.v); }
    M operator*(const M& x) const { return M(v * x.v); }
    M operator/(const M& x) const { return M(v * x.inv().v); }
    M& operator+=(const M& x) { return *this = *this + x; }
    M& operator-=(const M& x) { return *this = *this - x; }
    M& operator*=(const M& x) { return *this = *this * x; }
    M& operator/=(const M& x) { return *this = *this / x; }
    bool operator==(const M& x) const { return v == x.v; }
    bool operator!=(const M& x) const { return v != x.v; }
    friend istream& operator>>(istream& input, M& x) {
        return input >> x.v, x = M(x), input;
    }
    friend ostream& operator<<(ostream& output, const M& x) {
        return output << x.v;
    }
    inline M pow(long long n) const {
        M x(v), res(1);
        while (n) {
            if (n & 1) res *= x;
            x *= x;
            n >>= 1;
        }
        return res;
    }
    inline M inv() const { return this->pow(MOD - 2); }
    static void build(int n) {
        fact.assign(n + 1, 1);
        for (int i = 1; i < n + 1; i++) fact[i] = fact[i - 1] * M(i);
        finv.assign(n + 1, fact[n].inv());
        for (int i = n; i > 0; i--) finv[i - 1] = finv[i] * M(i);
    }
    static M comb(int n, int k) {
        if (n < k || k < 0) return M(0);
        return fact[n] * finv[n - k] * finv[k];
    }
    static M extgcd(int a, int b, int& x, int& y) {
        M d(a);
        if (b) {
            d = extgcd(b, a % b, y, x);
            y -= (a / b) * x;
        } else {
            x = 1;
            y = 0;
        }
        return d;
    }
};
vector<ModInt> ModInt::fact = vector<ModInt>();
vector<ModInt> ModInt::finv = vector<ModInt>();
long long ModInt::MOD = 1e9 + 7;

int main() {
    int k;
    cin >> k;
    string s;
    cin >> s;
    ModInt::build(n + k);
    int n = s.length();
    ModInt ans = 0;
    for (int i = 0; i <= k; i++) {
        ModInt tmp = ModInt::comb(i + n - 1, n - 1);
        tmp *= ModInt(25).pow(i) * ModInt(26).pow(k - i);
        ans += tmp;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:19: error: 'n' was not declared in this scope
   71 |     ModInt::build(n + k);
      |                   ^
Language: C

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
#define per(i,n) for(int i = n-1; i >= 0; i--)
typedef long long ll;
typedef pair<int, int> P;
typedef pair<long long, long long> Pll;
typedef vector<int> vi;
typedef vector<ll> vll;
const long long mod = 1000000007LL;

ll fac[3300000];
ll finv[3300000];
ll inv[3300000];

void compre() {
  fac[0] = fac[1] = 1LL;
  finv[0] = finv[1] = 1LL;
  inv[1] = 1LL;
  for(ll i = 2LL; i<3050000; 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 modcom(long long n, long long k) {
  if(n<k) return 0;
  if(n<0 || k<0) return 0;
  return fac[n] * (finv[k] * finv[n-k] % mod) % mod;
}

ll modpow(ll n, ll p, ll m) {
  if(p==0) return 1LL;
  if(p%2==0) {
    ll t = modpow(n, p/2, m);
    return t * t % m;
  }
  return n * modpow(n, p-1, m) % m;
}

int main() {
  ll k;
  cin >> k;
  string s;
  cin >> s;
  ll len = s.size();
  compre();
  ll ans = 0LL;
  for(int i = 0; i<=k; i++) {
    ll now = modpow(26LL,k-i,mod);
    now *= modpow(25LL,i,mod);
    now %= mod;
    now *= modcom(i+len-1,len-1);
    now %= mod;
    ans += now;
    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<bits/stdc++.h>
using namespace std;
#define PI 3.141592653589793238462
typedef long long ll;
typedef double db;
ll mod=1e9+7,p1[2000005],p2[2000005],p26[2000005],p25[2000005];
ll qpow(ll a,ll b){ll res=1;while(b){if(b&1) res=res*a%mod;a=a*a%mod;b/=2;}return res%mod;}
ll C(ll a,llb){
    return (f1[a]%mod*f2[b]%mod*f2[a-b]%mod)%mod;
}
int main(){
    ll k,ans=0;string s;cin>>s;
    ll n=s.length();
    p1[0]=1;p2[0]=1;p26[0]=1;p25[0]=1;
    for(ll i=1;i<=2000000;i++){
        p1[i]=p1[i-1]*i;
        p2[i]=qpow(p1[i],mod-2);
        p26[i]=(p26[i-1]%mod*26)%mod;
        p25[i]=(p25[i-1]%mod*25)%mod;
    }
    k=k+n;
    for(int i=n;i<=k;i++){
        ll num=(C(i-1,n-1)%mod*p26[k-i]%mod*p25[i-n]%mod)%mod;
        ans=(ans%mod+num%mod)%mod;
    }
    cout<<ans%mod<<endl;
}

Compiler output:
a.cc:8:11: error: 'llb' has not been declared
    8 | ll C(ll a,llb){
      |           ^~~
a.cc: In function 'll C(ll, int)':
a.cc:9:13: error: 'f1' was not declared in this scope; did you mean 'y1'?
    9 |     return (f1[a]%mod*f2[b]%mod*f2[a-b]%mod)%mod;
      |             ^~
      |             y1
a.cc:9:23: error: 'f2' was not declared in this scope; did you mean 'p2'?
    9 |     return (f1[a]%mod*f2[b]%mod*f2[a-b]%mod)%mod;
      |                       ^~
      |                       p2
a.cc:9:26: error: 'b' was not declared in this scope
    9 |     return (f1[a]%mod*f2[b]%mod*f2[a-b]%mod)%mod;
      |                          ^
Language: Java



import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public final class F {

    // Duplicates
    // https://www.hackmath.net/en/calculator/combinations-and-permutations?n=26&k=5&order=0&repeat=1
    static class Combinations {
        long[] factorial;
        long[] facInverse;
        long[] inverse;

        void init(int n) {
            final int MAX = n + 2;
            factorial = new long[MAX];
            facInverse = new long[MAX];
            inverse = new long[MAX];
            factorial[0] = factorial[1] = 1;
            facInverse[0] = facInverse[1] = 1;
            inverse[1] = 1;
            for (int i = 2; i < MAX; i++) {
                factorial[i] = factorial[i - 1] * i % MOD;
                final long inv = inverse[i] = MOD - inverse[MOD % i] * (MOD / i) % MOD;
                facInverse[i] = facInverse[i - 1] * inv % MOD;
            }
        }

        long ncr(int n, int r) {
            if (n < r) { return 0; }
            if (n < 0 || r < 0) { return 0; }
            return factorial[n] * (facInverse[r] * facInverse[n - r] % MOD) % MOD;
        }

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

    private static final int MOD = (int) (1e9 + 7);

    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int k = Integer.parseInt(in.nextLine());
        final int n = in.nextLine().length();
        final Combinations solver = new Combinations();
        solver.init(2 * (int) 1e6);
        long res = 0;
        for (int i = 0; i <= k; ++i) {
            final long add = solver.modpow(26, k - i) *
                             solver.ncr(n - 1 + i, i) % MOD *
                             solver.modpow(25, i) % MOD;
            res = (res + add) % MOD;
        }
        System.out.println(res % MOD);
    }
}


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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, a, b) for(ll i=(a); i<(b); i++)
#define PER(i, a, b) for(ll i=(a); i>=(b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
#define ALL(a)  (a).begin(),(a).end()
const ll INF = 1e18+18;
const ll MAX = 200100;
const ll MOD = 1000000007;
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl;
#define YES(n) cout << ((n) ? "YES" : "NO") << endl;

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

ll myPow(ll x, ll n, ll m){
  if(n == 0)
    return 1;
  if(n % 2 == 0)
    return myPow(x * x % m, n / 2, m);
  else
    return x * myPow(x, n - 1, m) % m;
}
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int 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(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int main(){
  	COMinit();
    ll K;
    cin>>K;
    string S;
    cin>>S;
    ll Sz=S.size();
    ll Ans=0;
    for(ll i=Sz; i<=Sz+K; i++){
        //ll T=COM(i-1, Sz-1);
        T*=myPow(25, i-Sz, MOD);
        T%=MOD;
        T*=myPow(26, Sz+K-i, MOD);
        T%=MOD;
        Ans+=T;
        Ans%=MOD;
    }
    cout<<Ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:9: error: 'T' was not declared in this scope
   54 |         T*=myPow(25, i-Sz, MOD);
      |         ^
Language: C++

#include<bits/stdc++.h>
using ll = long long;
using namespace std;
signed main() {
	ll n = 0, k, ans = 1; string s;
    cin >> k >> s; n = s.size();
    for (int h = 0; h < k; h++) {
        ans *= ((26 * (n + 1)) - n); ans %= mod;
        n++;
    }
    while (ans < 0) { ans += mod; }
    cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:45: error: 'mod' was not declared in this scope; did you mean 'modf'?
    8 |         ans *= ((26 * (n + 1)) - n); ans %= mod;
      |                                             ^~~
      |                                             modf
a.cc:11:30: error: 'mod' was not declared in this scope; did you mean 'modf'?
   11 |     while (ans < 0) { ans += mod; }
      |                              ^~~
      |                              modf
Language: Java

import java.util.*;
public class Main {
    public static long gcd(long x,long y){
        if(x < y) return gcd(y, x);
        if(y == 0) return x;
        return gcd(y, x % y);
    }
    public static long lcm(long x,long y){                                                              
        return x*y/gcd(x,y);                                                                                                                                                                                                                
    }
    public static long fac(long x){
        if(x==0) return 1;
        return x*fac(x-1);
    }
    public static long per(long x,long y){
        return fac(x)/fac(x-y);      
    }
    public static long com(long x,long y){
        return per(x,y)/fac(y);      
    }
   
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        int k = sc.nextInt();
        String str = sc.next();
        long ans = 0;
		long mod = 1000000007;
        for(int i=0;i<k;i++){ans+=Math.pow(26,a)%mod;
                            ans%=mod;}
        System.out.println(ans);
	}
}


Compiler output:
Main.java:28: error: cannot find symbol
        for(int i=0;i<k;i++){ans+=Math.pow(26,a)%mod;
                                              ^
  symbol:   variable a
  location: class Main
1 error
Language: C++

#include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i = 0; i<n; ++i)
#define REP(i,n) for(int i = 1; i<=n; ++i)
#define all(x) begin(x),end(x)
#define show(obj) {for(auto x:obj)cout<<x<<' ';cout<<endl;}
#define line "----------"
typedef long long ll;
typedef pair<int,int> P;
const int inf = 1001001000;
const ll INF = 1LL<<60;
const ll MOD = 1e9 + 7;

int main(){
	int K; cin>>K;
	string s; cin>>s;
	int cnt = 0;
	rep(i,N-1){
		if(s[i] != s[i+1])cnt++;
	}
	ll ans = 1;
	ans *= 25 * 25;
	ans *=pow(26, cnt) %MOD;
	ans %= MOD;
	int cnt2 = cnt;
	rep(i,K-1){
		cnt += 2;
		cnt2 += 3;
		ans += pow(26, cnt2)%MOD;
		ans %MOD;
		ans += pow(26, cnt)%MOD;
		ans %MOD;
		ans *= 625;
		ans %MOD;
	}
	
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:15: error: 'N' was not declared in this scope
   31 |         rep(i,N-1){
      |               ^
a.cc:16:35: note: in definition of macro 'rep'
   16 | #define rep(i,n) for(int i = 0; i<n; ++i)
      |                                   ^
a.cc:36:28: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'const ll' {aka 'const long long int'} to binary 'operator%'
   36 |         ans *=pow(26, cnt) %MOD;
      |               ~~~~~~~~~~~~ ^~~~
      |                  |          |
      |                  |          const ll {aka const long long int}
      |                  __gnu_cxx::__promote<double>::__type {aka double}
a.cc:42:37: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'const ll' {aka 'const long long int'} to binary 'operator%'
   42 |                 ans += pow(26, cnt2)%MOD;
      |                        ~~~~~~~~~~~~~^~~~
      |                           |          |
      |                           |          const ll {aka const long long int}
      |                           __gnu_cxx::__promote<double>::__type {aka double}
a.cc:44:36: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'const ll' {aka 'const long long int'} to binary 'operator%'
   44 |                 ans += pow(26, cnt)%MOD;
      |                        ~~~~~~~~~~~~^~~~
      |                           |         |
      |                           |         const ll {aka const long long int}
      |                           __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<bits/stdc++.h>

#define rep(i,N) for(int i=0;i<N;i++)
#define rep2(i,N) for(int i=1;i<=N;i++)
using namespace std;
long long  INF=1e18;
long long mod=1e9+7;

//status unsolved
long long MOD=mod;
#define SIZE 200005
long long fac[SIZE],finv[SIZE],inv[SIZE];

void make() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < SIZE; 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 C(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int main(){
    long long k;
    cin>>k;
    string s;
    cin>>s;
    
    make();

    long long now=C(k+s.size(),s.size());
    rep(i,k){
        now*=26;
        if(now>mod)now%=mod;
    }
    cout<<now<<endl;
    
    
    long long dp[200010][100010];

    dp[0]=1;

    for(int i=0;i<s.size()+k;i++){
        for(int l=0;l<s.size();l++){
        dp[i+1][l+1]+=dp[i][l];
        dp[i+1][l]+=dp[i][l]*25;
        }
        dp[i+1][l]%=mod;
        dp[i+1][l+1]%=mod;
    }

    cout<<dp[k+s.size()][s.size()]<<endl;
    
    /*
    long long ans;

    ans=C(k+s.size(),k);

    rep(i,k){
        ans*=25;
        if(ans>mod)ans%=mod;
    }
    */
    return 0;

}
/*


*/


Compiler output:
a.cc: In function 'int main()':
a.cc:50:10: error: incompatible types in assignment of 'int' to 'long long int [100010]'
   50 |     dp[0]=1;
      |     ~~~~~^~
a.cc:57:17: error: 'l' was not declared in this scope
   57 |         dp[i+1][l]%=mod;
      |                 ^
Language: C++

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <tuple>
#include <cassert>

using namespace std;

#define all(c) (c).begin(), (c).end()
#define iter(c) __typeof((c).begin())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(c, i) for (iter(c) i = (c).begin(); i != (c).end(); ++i)
#define pb(e) push_back(e)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)   FOR(i,0,n)
#define mp(a,b) make_pair((a), (b))
#define mt(a,b,c) make_tuple((a),(b),(c))
#define MOD 1000000007
long long modinv(long long a, long long m = MOD) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

long long comb(long long n, long long r){
    return (((fact[n] * modinv(r)) % MOD) * modinv(n-r)) % MOD;
}

typedef long long ll;
ll fact[1000005];
ll pw[1000005];

int main(){
    fact[0] = 1;
    pw[0] = 26;
    for(int i=1; i< 1000005;i++) fact[i] = (fact[i-1] * i) % MOD;
    for(int i=1; i< 1000005;i++) pw[i] = (pw[i-1] * 25) % MOD;
    long long int k; string s; cin >> k >> s;
    ll sum = 0;
    ll ss = s.length();
    for(int i=ss; i<=ss+k;i++){
        sum = (sum + comb(ss+k, i) * pw[ss+k - i]) % MOD;
    }
    cout << sum << endl;
    return 0;
}

Compiler output:
a.cc: In function 'long long int comb(long long int, long long int)':
a.cc:43:15: error: 'fact' was not declared in this scope
   43 |     return (((fact[n] * modinv(r)) % MOD) * modinv(n-r)) % MOD;
      |               ^~~~
Language: Java

import java.util.*;

public class Program {

    public static final int M = 1000000007;

    public static int[][] dfa;
    public static long[][] paths;

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String s = sc.next();

        kmp(s); // generate dfa

        paths = new long[s.length() + 1][s.length() + 1];
        for (int k = 0; k < 26; k++)
            for (int i = 0; i < dfa[0].length; i++)
                paths[i][dfa[k][i]]++;            
        paths[paths.length - 1][paths.length - 1] = 26;

        paths = matrixToPower(paths, n);

        System.out.println(paths[0][s.length()]);
    }

    public static long[][] matrixToPower(long[][] a, int p) {
        long[][] b = a;
        for (int n = 1; n < p; n++)
            a = matrixMultiplication(a, b);
        return a;
    }

    public static long[][] matrixMultiplication(long[][] m1, long[][] m2) {
        int len = m1.length;
        long[][] mResult = new long[len][len];
        for(int i = 0; i < len; i++) {
            for(int j = 0; j < len; j++) {
                for(int k = 0; k < len; k++) {
                    mResult[i][j] += (m1[i][k] * m2[k][j]) % M;
                    mResult[i][j] %= M;
                }
            }
        }
        return mResult;
    }

    // create the DFA from a String
    public static void kmp(String pat) {
        // build DFA from pattern
        int m = pat.length();
        dfa = new int[26][m]; 
        dfa[pat.charAt(0) - 'A'][0] = 1; 
        for (int X = 0, j = 1; j < m; j++) {
            for (int c = 0; c < 26; c++) 
                dfa[c][j] = dfa[c][X];         // Copy mismatch cases. 
            dfa[pat.charAt(j) - 'A'][j] = j+1; // Set match case. 
            X = dfa[pat.charAt(j) - 'A'][X];   // Update restart state. 
        } 
    }

}

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

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

const ll mod = 1e9 + 7;



int main(void) {
  int k;
  string s;
  cin >> k;
  cin >> s;
  ll mul1 = 0;
  ll acc1 = 1;
  for(int i = 0;i <= k;++i) {
    mul1 = (mul1 + acc1) % mod;
    acc1 = (acc1 * 25) % mod;
  }
  ll mul2 = 0;
  ll acc2 = 1;
  for(int i = 0;i <= k;++i) {
    mul2 = (mul2 + acc2) % mod;
    acc2 = (acc2 * 26) % mod;
  }
  
  ll inv = 1;
  ll x = mod - 2LL;
  ll a = mul2;
  while(x > 0) {
    if(x & 1) {
      inv = (inv * a) % mod;
    }
    a = (a * a) % mod;
    x >>= 1;
  }

  ll all1 = 1;
  for(int i = 0;i < k + (int)s.size();++i) {
    all1 = (all1 * 26) % mod;
  }

  ll calc = all1;
  for(int i = 0;i < k;++i) {
    ll fuga = all1 - calc 
    ll hoge = (fuga * mul1) % mod;
    hoge = (hoge * inv) % mod;
    calc = (calc + hoge) % mod;
  }
  cout << (all1 - calc + mod) % mod << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:5: error: expected ',' or ';' before 'll'
   46 |     ll hoge = (fuga * mul1) % mod;
      |     ^~
a.cc:47:5: error: 'hoge' was not declared in this scope
   47 |     hoge = (hoge * inv) % mod;
      |     ^~~~
Language: C++

#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using P = pair<ll,ll>;
using um = unordered_map<ll,ll>;
#define fl cout<<flush;
#define endl '\n'
template <typename T> inline void prt(T v){cout<<v<<'\n';}
template <typename T> inline bool chmax(T &a, const T &b){if (a<b){a=b;return 1;}return 0;}
template <typename T> inline bool chmin(T &a, const T &b){if (a>b){a=b;return 1;}return 0;}
const ll INF=1LL<<60;
const ll MOD=1e9+7;
const ll MOD2=998244353;
const ld pi=3.14159265358979323846;
const ld eps=1e-10;
#define MAX 2000007
long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void fact() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll 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 comb(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
//↓↓↓↓↓↓fact()ってちゃんとつける！！！！！！！！！！！↓↓↓↓↓↓
//↓↓↓↓↓↓fact()ってちゃんとつける！！！！！！！！！！！↓↓↓↓↓↓
//↓↓↓↓↓↓fact()ってちゃんとつける！！！！！！！！！！！↓↓↓↓↓↓
//↓↓↓↓↓↓fact()ってちゃんとつける！！！！！！！！！！！↓↓↓↓↓↓
//↓↓↓↓↓↓fact()ってちゃんとつける！！！！！！！！！！！↓↓↓↓↓↓
// a^n mod を計算する
//ただしmodとaが互いにその時のみ
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;
}
signed main(void){
    cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);
    fact();
    ll K;
    cin >> K;
    string S;
    cin >> S;
    ll N=S.size();
    ll ans=0;
    for(ll i=N;i<=N+K;++i){
        ans+=comb(N+K,N)*modpow(25,N+K-i)%MOD;
        ans%=MOD;
    }
    prt(ans);

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:67:32: error: too few arguments to function 'long long int modpow(long long int, long long int, long long int)'
   67 |         ans+=comb(N+K,N)*modpow(25,N+K-i)%MOD;
      |                          ~~~~~~^~~~~~~~~~
a.cc:48:11: note: declared here
   48 | long long modpow(long long a, long long n, long long mod) {
      |           ^~~~~~
Language: C++

import java.util.*;

public class Program {

    public static final int M = 1000000007;

    public static int[][] dfa;
    public static long[][] paths;

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String s = sc.next();

        kmp(s); // generate dfa

        paths = new long[s.length() + 1][s.length() + 1];
        for (int k = 0; k < 26; k++)
            for (int i = 0; i < dfa[0].length; i++)
                paths[i][dfa[k][i]]++;            
        paths[paths.length - 1][paths.length - 1] = 26;

        paths = matrixToPower(paths, n);

        System.out.println(paths[0][s.length()]);
    }

    public static long[][] matrixToPower(long[][] a, int p) {
        long[][] b = a;
        for (int n = 1; n < p; n++)
            a = matrixMultiplication(a, b);
        return a;
    }

    public static long[][] matrixMultiplication(long[][] m1, long[][] m2) {
        int len = m1.length;
        long[][] mResult = new long[len][len];
        for(int i = 0; i < len; i++) {
            for(int j = 0; j < len; j++) {
                for(int k = 0; k < len; k++) {
                    mResult[i][j] += (m1[i][k] * m2[k][j]) % M;
                    mResult[i][j] %= M;
                }
            }
        }
        return mResult;
    }

    // create the DFA from a String
    public static void kmp(String pat) {
        // build DFA from pattern
        int m = pat.length();
        dfa = new int[26][m]; 
        dfa[pat.charAt(0) - 'A'][0] = 1; 
        for (int X = 0, j = 1; j < m; j++) {
            for (int c = 0; c < 26; c++) 
                dfa[c][j] = dfa[c][X];         // Copy mismatch cases. 
            dfa[pat.charAt(j) - 'A'][j] = j+1; // Set match case. 
            X = dfa[pat.charAt(j) - 'A'][X];   // Update restart state. 
        } 
    }

}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Program {
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include "../lib/math/comb.hpp"

using namespace std;

#define SZ(x) (int)(x.size())
#define REP(i, n) for(int i=0;i<(n);++i)
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RREP(i, n) for(int i=(int)(n);i>=0;--i)
#define RFOR(i, a, b) for(int i=(int)(a);i>=(int)(b);--i)
#define ALL(a) (a).begin(),(a).end()
#define DUMP(x) cerr<<#x<<" = "<<(x)<<endl
#define DEBUG(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<< endl;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<int, int>;

const double eps = 1e-8;
const ll MOD = 1000000007;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;

template <typename T1, typename T2>
bool chmax(T1 &a, const T2 &b) {
  if(a < b) {a = b; return true;}
  return false;
}

template <typename T1, typename T2>
bool chmin(T1 &a, const T2 &b) {
  if(a > b) {a = b; return true;}
  return false;
}

template<typename T1, typename T2>
ostream& operator<<(ostream &os, const pair<T1, T2> p) {
  os << p.first << ":" << p.second;
  return os;
}

template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  REP(i, SZ(v)) {
    if(i) os << " ";
    os << v[i];
  }
  return os;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);

  int k; cin >> k;
  string s; cin >> s;
  int n = SZ(s);

  Combination<MOD> comb(3000000);

  vi v;
  REP(i, n) {
    v.push_back(comb.C(n+k, i));
  }
  reverse(ALL(v));
  ll now = 1;
  ll ans = 0;
  REP(i, n+k+1-SZ(v)) {
    now *= 25;
    now %= MOD;
  }
  REP(i, SZ(v)) {
    ans += now * v[i] % MOD;
    ans %= MOD;
    now *= 25;
    now %= MOD;
  }


  ll all = 1;
  REP(i, n+k) {
    all *= 26;
    all %= MOD;
  }

  cout << (all + MOD - ans) % MOD << endl;
}








Compiler output:
a.cc:2:10: fatal error: ../lib/math/comb.hpp: No such file or directory
    2 | #include "../lib/math/comb.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

sum_{i=|S|}^{K+|S|} binom(i-1,|S|-1) 25^((i-1)-(|S|-1)) 26^(K+|S|-i)

Compiler output:
a.cc:1:1: error: 'sum_' does not name a type
    1 | sum_{i=|S|}^{K+|S|} binom(i-1,|S|-1) 25^((i-1)-(|S|-1)) 26^(K+|S|-i)
      | ^~~~
a.cc:1:12: error: expected unqualified-id before '^' token
    1 | sum_{i=|S|}^{K+|S|} binom(i-1,|S|-1) 25^((i-1)-(|S|-1)) 26^(K+|S|-i)
      |            ^
a.cc:1:26: error: expected constructor, destructor, or type conversion before '(' token
    1 | sum_{i=|S|}^{K+|S|} binom(i-1,|S|-1) 25^((i-1)-(|S|-1)) 26^(K+|S|-i)
      |                          ^
Language: C++

#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cstdint>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <chrono>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#include <random>
#include <utility>
#include <limits>
#include <list>
#include <type_traits>

/* template start */
 
#define rep(i, a, b) for (long long i = (a); (i) < (b); (i)++)
#define all(i) i.begin(), i.end()

#ifdef LOCAL
#define debug(...) std::cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...)
#endif

void debug_out(){std::cerr<<std::endl;}

template<typename Head,typename... Tail>
void debug_out(Head h,Tail... t){
  std::cerr<<" "<<h;
  if(sizeof...(t)>0)std::cout<<" :";
  debug_out(t...);
}
 
template <typename T1, typename T2>
std::ostream& operator<<(std::ostream& os, std::pair<T1, T2> pa) {
  return os << pa.first << " " << pa.second;
}
 
template <typename T>
std::ostream& operator<<(std::ostream& os, std::vector<T> vec) {
  for (std::size_t i = 0; i < vec.size(); i++)os << vec[i] << (i + 1 == vec.size() ? "" : " ");
  return os;
}
 
template<typename T1,typename T2>
inline bool chmax(T1& a,T2 b){return a<b && (a=b,true);}
 
template<typename T1,typename T2>
inline bool chmin(T1& a,T2 b){return a>b && (a=b,true);}

template<typename Num>
constexpr Num mypow(Num a, long long b) {
  if(b==0)return 1;
  if (a==0)return 0;
  Num x = 1;
  while (b > 0) {
    if(b & 1)x*=a;
    a*=a;
    b >>= 1;
  }
  return x;
}

/* template end */

using ll = long long;

#include "../../../lib/math/FactorialTable.hpp"

constexpr ll MOD=1e9+7;

using mint=modint<MOD>;

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

  ll k;
  std::cin>>k;

  std::string s;
  std::cin>>s;

  ll n=s.size();

  Factorial<2000100,MOD> fact;

  mint ans=0;

  rep(i,0,k+1)ans+=fact.binom(n+k,i)*mypow(mint(25),i);

  std::cout<<ans.value()<<"\n";

  return 0;
}

Compiler output:
a.cc:84:10: fatal error: ../../../lib/math/FactorialTable.hpp: No such file or directory
   84 | #include "../../../lib/math/FactorialTable.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.