QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#600378#9296. Golden SpiritLIHRIWA 0ms3608kbC++14404b2024-09-29 16:09:352024-09-29 16:09:38

Judging History

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

  • [2024-09-29 16:09:38]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3608kb
  • [2024-09-29 16:09:35]
  • 提交

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));
            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: 3608kb

input:

3
2 2 2
3 1 10
11 45 14

output:

10
61
353

result:

wrong answer 1st lines differ - expected: '16', found: '10'