Submission #1198748

#TimeUsernameProblemLanguageResultExecution timeMemory
1198748THXuanPot (COCI15_pot)C++20
Compilation error
0 ms0 KiB
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#define INF 1e9
using namespace std;
typedef long long ll;
const ll MAXN = 100005;

void solve()
{
	int n; cin >> n;
	ll ans = 0;
	for (int i = 0; i < n; i++) {
		int v; cin >> v;
		int p = v % 10;
		v /= 10;
		ans += pow(v, p);
	}
	cout << ans << "\n";
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int t = 1;// cin>>t;
	while (t--) solve();
	return 0;
}

Compilation message (stderr)

pot.cpp: In function 'void solve()':
pot.cpp:20:24: error: 'pow' was not declared in this scope
   20 |                 ans += pow(v, p);
      |                        ^~~