QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#600394 | #9296. Golden Spirit | LIHRI | WA | 0ms | 3628kb | C++14 | 406b | 2024-09-29 16:15:26 | 2024-09-29 16:15:27 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main()
{
int T;
cin>>T;
long long n,x,t,sum=0;
while(T--)
{
sum=0;
cin>>n>>x>>t;
if(2*n*t<=x)
{
sum=(n*2)*(t*2);
cout<<sum<<endl;
}
else
{
sum=(n*2)*(t*2)+(x-(2*n*t))*n;
cout<<sum<<endl;
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3628kb
input:
3 2 2 2 3 1 10 11 45 14
output:
4 -57 -2277
result:
wrong answer 1st lines differ - expected: '16', found: '4'