90 第三个点wa
查看原帖
90 第三个点wa
581411
sunyuyang楼主2022/10/30 12:45
#include <bits/stdc++.h>
using namespace std;

long long a, b;
long long x = 1;

void input()
{
    cin >> a >> b;
}

void work()
{
    while (b--)
    {
        if (x > 1000000000)
        {
            cout << -1;
            return;
        }
        else
            x = x * a;
    }
    cout << x;
}

int main()
{
    input();
    work();
    return 0;
}

2022/10/30 12:45
加载中...