QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#537317 | #5304. Money Game | Sound_Medium | WA | 0ms | 3820kb | C++23 | 565b | 2024-08-30 09:58:24 | 2024-08-30 09:58:27 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
using namespace std;
int n, m;
void solve () {
cin>>n;
vector<double>a(n);
for(auto &v:a)cin>>v;
int cnt=0;
while(cnt<100){
for(int i=0;i<n;i++){
a[i]/=2;
a[(i+1)%n]+=a[i];
}
cnt++;
}for(int i=0;i<n;i++){
cout<<a[i]<<" ";
}cout<<endl;
}
signed main () {
int T = 1;
std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
//cin>>T;
while (T --) solve ();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3820kb
input:
2 4 2
output:
4 2
result:
ok 2 numbers
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3808kb
input:
2 2 3
output:
3.33333 1.66667
result:
wrong answer 2nd numbers differ - expected: '1.6666667', found: '1.6666700', error = '0.0000020'