QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#602493 | #9423. Gold Medal | leo2005 | WA | 0ms | 3716kb | C++14 | 403b | 2024-10-01 08:11:18 | 2024-10-01 08:11:43 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int T;
const int maxn=105;
int a[maxn];
int main(){
cin>>T;
while (T--)
{
long long ans=0;
int n,k,m;
cin>>n>>k;
for(int i=1;i<=n;i++){
cin>>a[i];
ans+=a[i];
}
cin>>m;
ans+=m;
ans=ans/k;
cout<<ans<<endl;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3716kb
input:
2 3 10 239 141 526 6 2 1 300 100 1000
output:
91 1400
result:
ok 2 lines
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3620kb
input:
100 39 88 746 86884 628655 868 87506 46761498 3338 91952768 312 9712 5277106 2263554 246545 98849 91459 6 5506 4 17626 5984050 32079 10 7672277 8104250 62 8976 866448 1 4 62240996 93128 181 6 9 5 175665 9 7680943 81 239822 9 200383 53147 17 82509 3 617847780 418677763 5402536 16 38253558 79857 66 60...
output:
2734453 5391 72 0 66483196 44509 60 4 166366037 76727 114876521 0 13117 1427237708 12524 19427 12 35644 5 268 34841147 731790799 10 12 0 51508673 3 262195 179 6286240839 4 1059 293092 167140 7 141335 455003437 86185475 18 1974 15 491379 174 8970 3869760302 14424321 31856 560665 133745 6272 101 11983...
result:
wrong answer 2nd lines differ - expected: '5390', found: '5391'