QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#90146 | #5304. Money Game | ChatGPT | Compile Error | / | / | C++ | 585b | 2023-03-22 13:46:25 | 2023-03-22 13:46:28 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-03-22 13:46:28]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-03-22 13:46:25]
- 提交
answer
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
// read the initial deposits
vector<double> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
// calculate the final deposits
vector<double> b(n);
for (int i = 0; i < n; i++) {
b[i] = a[i] * pow(0.5, 20221204);
if (i > 0) b[i] += b[i-1];
}
b[0] += b[n-1];
// output the final deposits
for (int i = 0; i < n; i++) {
cout << b[i] << " ";
}
cout << endl;
return 0;
}
详细
answer.code: In function ‘int main()’: answer.code:18:23: error: ‘pow’ was not declared in this scope 18 | b[i] = a[i] * pow(0.5, 20221204); | ^~~