Masala #DBGHCEUG85
Shokolad
Do’konda 1 dona shokolad narxi X so’m. Shuningdek, Y so’m evaziga 2 ta shokolad olish ham mumkin. N ta shokolad olish uchun qancha pul kerak?
Kiruvchi ma'lumotlar:
Bitta qatorda orasida bo'sh joy bilan 3 ta natural son -- N, X, Y \((1 \leq N,X,Y \leq 10^9)\)
Chiquvchi ma'lumotlar:
Bitta alohida qatorda masala javobi
Misollar
# | input.txt | output.txt |
---|---|---|
1 |
7 3 5 |
18 |
Izoh:
Izoh: 2 talik shokoladdan 3 dona va 1 talik shokoladdan 1 dona olamiz. Demak javob: 3*5 + 1*3 = 18.