ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#213395 | #2053. 地雷爆炸 | WZRYWZWY | Compile Error | / | / | Python3 | 462b | 2024-11-11 21:24:13 | 2024-11-11 23:07:00 |
answer
#include <bits/stdc++.h> // https://blog.csdn.net/adfa4535/article/details/101184862
using namespace std;
double p[3005], f[3005];
int main() {
int n, m, k; cin >> n >> m;
k = n;
double ans = 0;
for (int i = 0; i < n; i++) cin >> p[i];
f[0] = 0; f[1] = p[0];
for (int i = 2; i <= m; i++) {
f[i] = p[0];
for (int j = 1; j < n; j++) f[i] += p[j] * pow(f[i - 1], j);
}
printf("%.4lf", f[m]);
}
//太菜了,WZRYWZWY只会超原题
Details
File "answer.code", line 2 using namespace std; ^ SyntaxError: invalid syntax