33332023-02-25 20:27:384bs0lute0Gergő és a sárkánycpp17Forditá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