Language: C++

#include<bits/stdc++.h>
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:3:1: error: 'string' does not name a type; did you mean 'stdin'?
    3 | string S;
      | ^~~~~~
      | stdin
a.cc:6:7: error: 'll' does not name a type
    6 | const ll mo=1000000007;
      |       ^~
a.cc:8:1: error: 'll' does not name a type
    8 | ll comb(ll N_, ll C_) {
      | ^~
a.cc:19:1: error: 'll' does not name a type
   19 | ll hcomb(int P_,int Q_) { return (P_==0&&Q_==0)?1:comb(P_+Q_-1,Q_);}
      | ^~
a.cc:21:1: error: 'll' does not name a type
   21 | ll modpow(ll a, ll n) {
      | ^~
a.cc: In function 'int main()':
a.cc:33:28: error: 'string' was not declared in this scope
   33 |         int i,j,k,l,r,x,y; string s;
      |                            ^~~~~~
a.cc:33:28: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:35:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   35 |         cin>>K>>S;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:35:17: error: 'S' was not declared in this scope
   35 |         cin>>K>>S;
      |                 ^
a.cc:38:9: error: 'll' was not declared in this scope; did you mean 'l'?
   38 |         ll ret=0;
      |         ^~
      |         l
a.cc:39:9: error: 'FOR' was not declared in this scope
   39 |         FOR(i,K+1) {
      |         ^~~
a.cc:42:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   42 |         cout<<ret%mo<<endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:42:15: error: 'ret' was not declared in this scope
   42 |         cout<<ret%mo<<endl;
      |               ^~~
a.cc:42:19: error: 'mo' was not declared in this scope
   42 |         cout<<ret%mo<<endl;
      |                   ^~
a.cc:42:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   42 |         cout<<ret%mo<<endl;
      |                       ^~~~
      |                       std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~