/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 320.0 KiB
#2 Wrong Answer 2ms 344.0 KiB
#3 Wrong Answer 5ms 488.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
int main(){
     ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t;
    cin>>t;
    while(t--){
        int n,d;
        cin>>n>>d;
        int a,b;
        cin>>a>>b;
        long long cost=(d*a)+((n-d)*b);
        cout<<cost<<"\n";
    }
}

Information

Submit By
Type
Submission
Problem
P1090 A. Summer trip
Language
C++11 (G++ 13.2.0)
Submit At
2025-08-05 16:50:08
Judged At
2025-08-05 16:50:08
Judged By
Score
10
Total Time
5ms
Peak Memory
488.0 KiB