连续5次20分,求调,帮助的必关
查看原帖
连续5次20分,求调,帮助的必关
1049033
luogu_00楼主2025/2/6 14:47

Record1

Code1

#include <bits/stdc++.h>
using namespace std;
int main() {
    int n, r;
    cin >> n >> r;
    cout << int(pow(n, r)) - n;
    return 0;
}

Record2

Code2

#include <bits/stdc++.h>
using namespace std;
int main() {
    int n, r, ans = 1;
    cin >> n >> r;
    for (int i = 0; i < r; i++) {
        ans *= n;
    }
    cout << ans - n;
    return 0;
}

Record3

Code3

#include <bits/stdc++.h>
using namespace std;
int main() {
    int n, r;
    long long ans = 1;
    cin >> n >> r;
    for (int i = 0; i < r; i++) {
        ans *= n;
    }
    cout << ans - n;
    return 0;
}

Record4

Code4

#include <bits/stdc++.h>
using namespace std;
int main() {
    int n, r;
    cin >> n >> r;
    cout << int(pow(r, n)) - 2;
    return 0;
}

Record5

Code5

#include <bits/stdc++.h>
using namespace std;
int main() {
    int n, r;
    cin >> n >> r;
    cout << int(pow(r, n)) - r;
    return 0;
}

Help

2020 分求调,帮助的必关

验证码:g2zz

2025/2/6 14:47
加载中...