Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <string>

#define FOR(i, a, b) for(int i = a; i <= b; i++)
#define DOW(i, b, a) for(int i = b; i >= a; i--)
#define maxN 1000000 + 10
const int modi = 1e9 + 7;

using namespace std;

int n;
int prev[maxN];
int dem[maxN];

void enter(){
	cin >> n;
}

void init(){
	FOR(i, 2, n) prev[i] = 0;
	FOR(i, 2, n){
		if(prev[i] == 0){
			prev[i] = i;
			FOR(j, 2, n / i) prev[j * i] = i;
		}
	}
}

void solve(){
	int s = 1;
	FOR(i, 2, n) dem[i] = 0;
	FOR(i, 2, n){
		int t = i;
		while(t != 1){
			dem[prev[t]]++;
			t /= prev[t];
		}
	} 
	FOR(i, 2, n){
		s = (long long)s * (dem[i] + 1) % modi;
	}
	cout << s << endl;
}

void printAns(){

}

int main(){
	enter();
	init();
	solve();
	printAns();
	return 0;
}



Compiler output:
a.cc: In function 'void init()':
a.cc:28:22: error: reference to 'prev' is ambiguous
   28 |         FOR(i, 2, n) prev[i] = 0;
      |                      ^~~~
In file included from /usr/include/c++/14/string:47,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
a.cc:20:5: note:                 'int prev [1000010]'
   20 | int prev[maxN];
      |     ^~~~
a.cc:30:20: error: reference to 'prev' is ambiguous
   30 |                 if(prev[i] == 0){
      |                    ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
a.cc:20:5: note:                 'int prev [1000010]'
   20 | int prev[maxN];
      |     ^~~~
a.cc:31:25: error: reference to 'prev' is ambiguous
   31 |                         prev[i] = i;
      |                         ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
a.cc:20:5: note:                 'int prev [1000010]'
   20 | int prev[maxN];
      |     ^~~~
a.cc:32:42: error: reference to 'prev' is ambiguous
   32 |                         FOR(j, 2, n / i) prev[j * i] = i;
      |                                          ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
a.cc:20:5: note:                 'int prev [1000010]'
   20 | int prev[maxN];
      |     ^~~~
a.cc: In function 'void solve()':
a.cc:43:29: error: reference to 'prev' is ambiguous
   43 |                         dem[prev[t]]++;
      |                             ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
a.cc:20:5: note:                 'int prev [1000010]'
   20 | int prev[maxN];
      |     ^~~~
a.cc:44:30: error: reference to 'prev' is ambiguous
   44 |                         t /= prev[t];
      |                              ^~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:244:5: note: candidates are: 'template<class _BidirectionalIterator> constexpr _BidirectionalIterator std::prev(_BidirectionalIterator, typename iterator_traits<_Iter>::difference_type)'
  244 |     prev(_BidirectionalIterator __x, typename
      |     ^~~~
a.cc:20:5: note:                 'int prev [1000010]'
   20 | int prev[maxN];
      |     ^~~~