Submission #5483335


Source Code Expand

Copy
n = int(input())
k = int(input())
x = int(input())
y = int(input())
res = 0
for i in range(1, n + 1):
    if i <= k:
        res += x
    else:
        res += y
print(res)

Submission Info

Submission Time
Task A - 高橋君とホテルイージー / Tak and Hotels (ABC Edit)
User recuraki
Language Python3 (3.4.3)
Score 100
Code Size 181 Byte
Status
Exec Time 19 ms
Memory 3060 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 example_01.txt, example_02.txt
All 100 / 100 example_01.txt, example_02.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt
Case Name Status Exec Time Memory
example_01.txt 17 ms 3060 KB
example_02.txt 17 ms 2940 KB
subtask1_01.txt 17 ms 2940 KB
subtask1_02.txt 16 ms 2940 KB
subtask1_03.txt 19 ms 2940 KB
subtask1_04.txt 17 ms 2940 KB
subtask1_05.txt 18 ms 2940 KB
subtask1_06.txt 19 ms 2940 KB
subtask1_07.txt 18 ms 2940 KB
subtask1_08.txt 17 ms 2940 KB