제출 #1198748

#제출 시각아이디문제언어결과실행 시간메모리
1198748THXuanPot (COCI15_pot)C++20
컴파일 에러
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;
}

컴파일 시 표준 에러 (stderr) 메시지

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