Language: C++

#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define all(x) begin(x),end(x)
#define F(i,n) for (int i = 0; i < n; ++i)
#define F1(i,n) for (int i = 1; i <= n; ++i)
#define dbg(x) cerr << #x << " = " << x << endl
#define dbgg(x) cerr << #x << " = " << x << ' '
#define T(x) x[pool]
#define mineq(x,y) { if ((x) > (y)) (x) = (y); }
#define maxeq(x,y) { if ((x) < (y)) (x) = (y); }
#define MEOW cout << "meowwwww" << '\n'; system("pause");
#define int long long
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> pii;

template<typename T>
ostream& operator <<(ostream &s, const vector<T> &c)
{
	s << "[ "; for (auto it : c) s << it << " "; s << "\b]\n";
	return s;
}

template<typename T>
ostream& operator <<(ostream &s, const pair<int, T> &c)
{
	s << "[ "; cout << c.fi << " , " << c.se << " ] ";
	return s;
}

const int maxa = 60, maxb = 25, maxn = 234567;
int n;
int pre[maxa][maxb];
string a[maxn];
int b[maxn], c[maxn], d[maxn];

void input()
{
	ios::sync_with_stdio(false); cin.tie(0);
	cin >> n;
	F1 (i, n) cin >> a[i];
}

int fu(int x)
{
	int ret = 0;
	bool f = false;
	for (auto i : a[x])
	{
		if (i == '.') f = true;
		else
		{
			ret *= 10;
			ret += i - '0';
			if (f) --b[x], --c[x];
		}
	}
	return ret;
}

void solve()
{
	int ans = 0;
	F1 (i, n)
	{
		d[i] = fu(i);
		while (d[i] % 2 == 0)
		{
			d[i] /= 2;
			b[i]++;
		}
		while (d[i] % 5 == 0)
		{
			d[i] /= 5;
			c[i]++;
		}
		for (int j = max(0, -b[i] + 10); j < maxa; ++j)
			for (int k = max(0, -c[i] + 10); k < maxb; ++k)
				ans += pre[j][k];
		pre[b[i] + 10][c[i] + 10]++;
		//dbgg(b[i]); dbg(c[i]);
	}
	cout << ans << '\n';
}

main()
{
	input();
	solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:80:33: error: no matching function for call to 'max(int, long long int)'
   80 |                 for (int j = max(0, -b[i] + 10); j < maxa; ++j)
      |                              ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:80:33: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   80 |                 for (int j = max(0, -b[i] + 10); j < maxa; ++j)
      |                              ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:80:33: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   80 |                 for (int j = max(0, -b[i] + 10); j < maxa; ++j)
      |                              ~~~^~~~~~~~~~~~~~~
a.cc:81:41: error: no matching function for call to 'max(int, long long int)'
   81 |                         for (int k = max(0, -c[i] + 10); k < maxb; ++k)
      |                                      ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:81:41: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   81 |                         for (int k = max(0, -c[i] + 10); k < maxb; ++k)
      |                                      ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:81:41: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   81 |                         for (int k = max(0, -c[i] + 10); k < maxb; ++k)
      |                                      ~~~^~~~~~~~~~~~~~~
a.cc: At global scope:
a.cc:89:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   89 | main()
      | ^~~~