| Action | Tickets Earned |
|---|---|
Complete Daily Challenge | +1 |
10-Day Streak | +10 |
20-Day Streak | +20 |
30-Day Streak | +30 |
LinkedIn post with #30DaysofCode Everyday (and tag Educative) | +2 per post |
Most-Liked Post Overall | +20 |
Top of Leaderboard | +50 |
Leaderboard: 2nd place | +30 |
Leaderboard: 3rd place | +20 |
Given an integer, num, convert it to its Roman numeral representation.
Roman numerals are built using the following
Symbol | Value |
I | 1 |
V | 5 |
X | 10 |
L | 50 |
C | 100 |
D | 500 |
M | 1000 |
Roman numerals are constructed by converting each decimal place value from highest to lowest using these rules:
If the value does not start with
If the value starts with IV), IX), XL), XC), CD), and CM).
Only powers of I, X, C, M ) may be repeated consecutively, and at most V, L, and D may never be repeated. If a symbol would need to appear
Note: Conversion is applied digit by digit based on decimal place values. For example,
is not treated as less than ; instead, becomes XLandbecomes IX.
Constraints:
num
| Action | Tickets Earned |
|---|---|
Complete Daily Challenge | +1 |
10-Day Streak | +10 |
20-Day Streak | +20 |
30-Day Streak | +30 |
LinkedIn post with #30DaysofCode Everyday (and tag Educative) | +2 per post |
Most-Liked Post Overall | +20 |
Top of Leaderboard | +50 |
Leaderboard: 2nd place | +30 |
Leaderboard: 3rd place | +20 |
Given an integer, num, convert it to its Roman numeral representation.
Roman numerals are built using the following
Symbol | Value |
I | 1 |
V | 5 |
X | 10 |
L | 50 |
C | 100 |
D | 500 |
M | 1000 |
Roman numerals are constructed by converting each decimal place value from highest to lowest using these rules:
If the value does not start with
If the value starts with IV), IX), XL), XC), CD), and CM).
Only powers of I, X, C, M ) may be repeated consecutively, and at most V, L, and D may never be repeated. If a symbol would need to appear
Note: Conversion is applied digit by digit based on decimal place values. For example,
is not treated as less than ; instead, becomes XLandbecomes IX.
Constraints:
num