3332 2023. 02. 25 20:24:59 4bs0lute0 Gergő és a sárkány cpp17 Forditási hiba
#include <iostream>
using namespace std;

int main() {
    int N, D;
    cin >> N >> D;
    int p2 = D;
    int p1 = D;
    while (!(p1 >= pow(10, N-1) && p2 >= pow(10, N-1))) {
        int p0 = p1 + p2;
        p2 = p0 + p1;
        p1 = p2 + p0;
    }
    if (p1 == p2) {
        cout << 0 << " " << 0;
    } else {
        cout << p1 << " " << p2;
    }
    return 0;
}
Forditási hiba
exit status 1
main.cpp: In function 'int main()':
main.cpp:9:20: error: 'pow' was not declared in this scope
    9 |     while (!(p1 >= pow(10, N-1) && p2 >= pow(10, N-1))) {
      |                    ^~~
Exited with error status 1