[Python] Арабские числа в римские. Решаем логические задачи на Python вслух #2

Published: 22 March 2023
on channel: Be Geek
3,158
90

Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, 2 is written as II in Roman numeral, just two one's added together.
12 is written as XII, which is simply X + II. The number 27 is written as XXVII,
which is XX + V + II.

Roman numerals are usually written largest to smallest from left to right.
However, the numeral for four is not IIII.
Instead, the number four is written as IV.
Because the one is before the five we subtract it making four.
The same principle applies to the number nine, which is written as IX.
There are six instances where subtraction is used:

I can be placed before V (5) and X (10) to make 4 and 9.
X can be placed before L (50) and C (100) to make 40 and 90.
C can be placed before D (500) and M (1000) to make 400 and 900.
Given an integer, convert it to a roman numeral.

⚙️ Помимо рекламы на канале я так же оказываю различные консультации по IT направлению, провожу пробные собеседования, на которых подсказываю каких знаний не хватает и что нужно подтянуть
💰 Расценки на рекламу и услуги - https://boosty.to/begeek/posts/e44fee...
------------
➡️ Сами вы sre (лайф канал) - https://t.me/samivisre
➡️ Zen канал - https://zen.yandex.ru/id/60b9ba33a9b9...
➡️ Чат в телеграме- https://t.me/beGeekProgramming
➡️ Приватный блог - https://boosty.to/begeek
➡️ Реклама на канал или другие услуги сюда - [email protected]
------------
💰 Поддержать блогера - http://www.donationalerts.ru/r/beminer


Watch video [Python] Арабские числа в римские. Решаем логические задачи на Python вслух #2 online without registration, duration hours minute second in high quality. This video was added by user Be Geek 22 March 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,158 once and liked it 90 people.