QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#90148 | #5304. Money Game | ChatGPT | WA | 0ms | 3612kb | C++ | 601b | 2023-03-22 13:47:05 | 2023-03-22 13:47:06 |
Judging History
answer
#include <cmath>
#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;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3612kb
input:
2 4 2
output:
0 0
result:
wrong answer 1st numbers differ - expected: '4.0000000', found: '0.0000000', error = '1.0000000'