Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vii;
typedef vector<pair<int,int>> vp;

#define pb push_back
#define mp make_pair

const int INF = INT_MAX;
const int MOD = 1e9 + 7;

vector<long long> factorial(20000000);
int index;

ll expo(int x, int e)
{
	if(e == 0){
		return 1;
	}
	if(e == 1){
		return x % MOD;
	}
	ll temp = expo(x, e/2);
	if(e & 1){
		return (((temp * temp) % MOD) * x) % MOD;
	}
	return (temp * temp) % MOD;
}

ll facto(int a)
{
	if(a > index){
		for(; index <= a; index++){
			factorial[index] = (long long) (factorial[index - 1] * index) % MOD;
		}
	}
	return factorial[a];
}

ll com(int x, int r)
{
	return (facto(x) / ((facto(x - r) * facto(r)) % MOD)) % MOD;
}

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

	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif

	factorial[0] = 1;
 	factorial[1] = 1;
 	index = 1;

	string s;
	int k;

	cin >> k >> s;

	int n = s.length();
	ll ans = 0;
	for(int i = n; i <= n+k; i++){
		ans += com(n+k, i) * expo(25, n+k-i);
	}

	cout << ans << "\n";

	return 0;
}

Compiler output:
a.cc:17:5: error: 'int index' redeclared as different kind of entity
   17 | int index;
      |     ^~~~~
In file included from /usr/include/string.h:462,
                 from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/strings.h:50:20: note: previous declaration 'const char* index(const char*, int)'
   50 | extern const char *index (const char *__s, int __c)
      |                    ^~~~~
a.cc: In function 'll facto(int)':
a.cc:36:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>'
   36 |         if(a > index){
      |            ~~^~~~~~~
a.cc:37:29: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<='
   37 |                 for(; index <= a; index++){
      |                       ~~~~~~^~~~
a.cc:37:40: error: no post-increment operator for type
   37 |                 for(; index <= a; index++){
      |                                        ^~
a.cc:38:34: error: no match for 'operator[]' (operand types are 'std::vector<long long int>' and '<unresolved overloaded function type>')
   38 |                         factorial[index] = (long long) (factorial[index - 1] * index) % MOD;
      |                                  ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = long long int; _Alloc = std::allocator<long long int>; reference = long long int&; size_type = long unsigned int]'
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1128:28: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<long long int>::size_type' {aka 'long unsigned int'}
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1147:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = long long int; _Alloc = std::allocator<long long int>; const_reference = const long long int&; size_type = long unsigned int]'
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1147:28: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<long long int>::size_type' {aka 'long unsigned int'}
 1147 |       operator[](size_type __n) const _GLIBCXX_NOEXCEPT
      |                  ~~~~~~~~~~^~~
a.cc:38:73: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator-'
   38 |                         factorial[index] = (long long) (factorial[index - 1] * index) % MOD;
      |                                                                   ~~~~~~^~~
a.cc: In function 'int main()':
a.cc:61:17: error: overloaded function with no contextual type information
   61 |         index = 1;
      |                 ^