Входной файл: | input.txt | Ограничение времени: | 1 сек | |
Выходной файл: | output.txt | Ограничение памяти: | 256 Мб |
Дано два целых числа. Найти минимальное.
Входной файл содержит два целых числа: A и B.
Требуется вывести единственное целое число — min{A, B}.
A и B по модулю не превосходят 100000, т.е. − 100000 ≤ A, B ≤ 100000.
№ | Входной файл (input.txt ) |
Выходной файл (output.txt ) |
---|---|---|
1 |
|
|
2 |
|
|
Автор: | A. Klenin | Ограничение времени: | 5 сек | |
Входной файл: | input.txt | Ограничение памяти: | 200 Мб | |
Выходной файл: | output.txt |
№ | Входной файл (input.txt ) |
Выходной файл (output.txt ) |
---|---|---|
1 |
|
|
Author: | A. Usmanov. Translation: V. Toropov. | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 256 Mb | |
Output file: | Standard output |
Avengers defeated alien invaders and decided to eat some shawarma.
Hulk ordered N shawarmas. M shawarmen immediately started to cook his order. Each shawarman can cook his first shawarma in T minutes. Each next shawarma requires S minutes more to cook than the previous one.
HULK SMASHes!!! awaiting his shawarmas.
You should help Avengers to find out the time when all shawarmas ordered by Hulk will be ready and green giant will calm down. Of course, Jarvis could solve this task, but Iron Man's suit is broken and only air conditioner is working right now.
First line contains two integers N and M — number of shawarmas ordered by Hulk, and number of shawarmen who are going to complete his order.
Second line contains two integers T and S — time needed to cook the first shawarma and the difference of cooking time between two shawarmas in the row.
Print one integer — time needed to complete Hulk's order.
1 ≤ N, M, T ≤ 100
0 ≤ S ≤ 100
No. | Standard input | Standard output |
---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|