QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#600394#9296. Golden SpiritLIHRIWA 0ms3628kbC++14406b2024-09-29 16:15:262024-09-29 16:15:27

Judging History

你现在查看的是最新测评结果

  • [2024-09-29 16:15:27]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3628kb
  • [2024-09-29 16:15:26]
  • 提交

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'