Submission #24281694
Source Code Expand
n, a, x, y = map(int, input().split())
res = 0
if n <= a:
res += n * x
else:
res += a * x
res += (n - a) * y
print(res)
Submission Info
| Submission Time | |
|---|---|
| Task | A - Cabbages |
| User | cubesat |
| Language | PyPy3 (7.3.0) |
| Score | 100 |
| Code Size | 142 Byte |
| Status | AC |
| Exec Time | 85 ms |
| Memory | 61632 KiB |
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 | 85 ms | 61560 KiB |
| 001.txt | AC | 51 ms | 61392 KiB |
| 002.txt | AC | 53 ms | 61548 KiB |
| 003.txt | AC | 53 ms | 61632 KiB |
| 004.txt | AC | 51 ms | 61604 KiB |
| 005.txt | AC | 52 ms | 61500 KiB |
| 006.txt | AC | 53 ms | 61392 KiB |
| 007.txt | AC | 53 ms | 61496 KiB |
| 008.txt | AC | 53 ms | 61412 KiB |
| 009.txt | AC | 54 ms | 61336 KiB |
| example0.txt | AC | 52 ms | 61620 KiB |
| example1.txt | AC | 53 ms | 61604 KiB |