We have three vessels with integer volumes a, b, c (numbers a, b

Выполнен
Заказ
3761149
Раздел
Программирование
Предмет
Python
Антиплагиат
70% eTXT
Срок сдачи
26 Дек 2020 в 03:00
Цена
0 ₽
Блокировка
10 дней
Размещен
22 Дек 2020 в 16:40
Просмотров
24
Описание работы
We have three vessels with integer volumes a, b, c (numbers a, b, c are not greater than 10) in which the volume x, y, of water is at the beginning, in this order.
We can pour water from container to container, always by completely filling the container where we pour, or by completely emptying the container from where we pour. The volume of water poured is determined by which of these variants occurs earlier.
We must not pour water anywhere else or add it from any other source.
The inputs of the program are the numbers a, b, c, x, y, z, indicating the volumes and initial contents of the vessels.
The program prints a list of all volumes (including zero, if possible) that can be achieved by pouring (the entire volume of water in any of the vessels) and for each of them states after the colon the minimum number of required overflows. The volumes in this list will be printed in ascending order.
Example:
Input:
4 1 1 1 1 1
Corresponding output:
0: 1 1: 0 2: 1 3: 2
Нужна такая же работа?
  • Разместите заказ
  • Выберите исполнителя
  • Получите результат
Гарантия на работу 1 год
Средний балл 4.96
Стоимость Назначаете сами
Эксперт Выбираете сами
Уникальность работы от 70%
Время выполнения заказа:
3 дня 6 часов 20 минут
Выполнен в срок
Отзыв о выполненном заказе
Нужна аналогичная работа?
Оформи быстрый заказ и узнай стоимость
Гарантированные бесплатные доработки
Быстрое выполнение от 2 часов
Проверка работы на плагиат
Темы журнала
Показать ещё
Прямой эфир