GO_PROBLEMS_LIB Telegram 1024
Задача: Дано некоторое количество монет разного номинала. Нужно выдать сдачу, либо вернуть nil, если выдать не можем.

Жадный алгоритм:

1️⃣ Начинаем с самой крупной доступной монеты.

2️⃣ Берем максимально возможное количество этой монеты.

3️⃣ Переходим к следующей меньшей монете.

4️⃣ Повторяем, пока сдача не будет полностью выдана.

Реализацию смотрите в картинке 🔼
👍61🔥1😢1



tgoop.com/go_problems_lib/1024
Create:
Last Update:

Задача: Дано некоторое количество монет разного номинала. Нужно выдать сдачу, либо вернуть nil, если выдать не можем.

Жадный алгоритм:

1️⃣ Начинаем с самой крупной доступной монеты.

2️⃣ Берем максимально возможное количество этой монеты.

3️⃣ Переходим к следующей меньшей монете.

4️⃣ Повторяем, пока сдача не будет полностью выдана.

Реализацию смотрите в картинке 🔼

BY Библиотека задач по Go | тесты, код, задания




Share with your friend now:
tgoop.com/go_problems_lib/1024

View MORE
Open in Telegram


Telegram News

Date: |

When choosing the right name for your Telegram channel, use the language of your target audience. The name must sum up the essence of your channel in 1-3 words. If you’re planning to expand your Telegram audience, it makes sense to incorporate keywords into your name. Public channels are public to the internet, regardless of whether or not they are subscribed. A public channel is displayed in search results and has a short address (link). With the sharp downturn in the crypto market, yelling has become a coping mechanism for many crypto traders. This screaming therapy became popular after the surge of Goblintown Ethereum NFTs at the end of May or early June. Here, holders made incoherent groaning sounds in late-night Twitter spaces. They also role-played as urine-loving Goblin creatures. Hashtags are a fast way to find the correct information on social media. To put your content out there, be sure to add hashtags to each post. We have two intelligent tips to give you: But a Telegram statement also said: "Any requests related to political censorship or limiting human rights such as the rights to free speech or assembly are not and will not be considered."
from us


Telegram Библиотека задач по Go | тесты, код, задания
FROM American