Masala #VQ24CCZFFC
Latareya yutish
Alenning bankda n dollar pul bor. U barcha pullarini naqd olishni xohlaydi. Naqd pulning nominal qiymatlari 1, 5, 10, 20 va 100 dollarlik banknotlar. Alen minimum qancha banknot olish kerakligini aniqlaymiz.
birinchi qatorda n soni beriladi
minimum qancha banknot kerakligini chiqaring
# | input.txt | output.txt |
---|---|---|
1 |
125 |
3 |
Alen birinchi misolda 100 dollarlik bitta banknot, 20 dollarlik bitta banknot va 5 dollarlik bitta banknot olishi mumkin. 125 dollardan bir yoki ikkita banknot yordamida olish mumkin emas.
Ikkinchi misolda esa Alen ikkita 20 dollarlik banknot va uchta 1 dollarlik banknot olishi mumkin.
Uchinchi misolda Alen 10000 dollarni 100 dollarlik 100 ta banknot bilan olish mumkin.