Submission #24281564
Source Code Expand
Copy
#include <bits/stdc++.h>using namespace std;int main() {int n, a, x, y;cin >> n >> a >> x >> y;if ( n<a ) {cout << x*n << endl;} else {cout << x*a + y*(n-a) << endl;}}
#include <bits/stdc++.h> using namespace std; int main() { int n, a, x, y; cin >> n >> a >> x >> y; if ( n<a ) { cout << x*n << endl; } else { cout << x*a + y*(n-a) << endl; } }
Submission Info
Submission Time | |
---|---|
Task | A - Cabbages |
User | RoadLynton27 |
Language | C++ (GCC 9.2.1) |
Score | 100 |
Code Size | 209 Byte |
Status | AC |
Exec Time | 9 ms |
Memory | 3652 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example0.txt, example1.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, example0.txt, example1.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | AC | 9 ms | 3528 KB |
001.txt | AC | 2 ms | 3400 KB |
002.txt | AC | 2 ms | 3572 KB |
003.txt | AC | 2 ms | 3448 KB |
004.txt | AC | 2 ms | 3652 KB |
005.txt | AC | 2 ms | 3444 KB |
006.txt | AC | 3 ms | 3592 KB |
007.txt | AC | 2 ms | 3408 KB |
008.txt | AC | 3 ms | 3628 KB |
009.txt | AC | 2 ms | 3524 KB |
example0.txt | AC | 3 ms | 3600 KB |
example1.txt | AC | 2 ms | 3592 KB |