Wrong Answer
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