Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Highly Rated Users

Forum
No Posts Rated

Top 50
Given
Received

Forum Statistics

Users
Members:
1879
Members Online:
1
Guests Online:
38

Total Post History
Posts:
81448
Topics:
18714

7-Day Post History
New Posts:
0
New Topics:
0
Active Topics:
0

Our newest member
mwojcik

Other

FAQ
All times are UTC [ DST ]

Google Ads

Distinct Roman numerals

Mind Boggling Puzzles, to keep that grey matter in shape...
Forum rules
Always post answers in a "Hidecode" tag, so that others have a chance to answer the question too.
Please wait...

Distinct Roman numerals

Postby SQLDenis on Sat Jan 14, 2012 8:02 pm

How many Roman numerals are possible if you are not allowed to repeat a character?

Valid characters are I, V, X, L, C, D, and M

I can be subtracted from V and X only.
X can be subtracted from L and C only.
C can be subtracted from D and M only.
V, L, and D can never be subtracted.

In other words 99 = LXXXXVIIII not IC but since we have repeated numbers here(LXXXXVIIII ) we don't want this one


Here is a sample
I
IV
V
VI
IX
XI
XV


can you write a program that list all of them till 1000?
User avatar
SQLDenis
LTD Admin
LTD Admin
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
 
Posts: 21784
Joined: Wed Oct 10, 2007 6:43 pm
Location: Princeton, New Jersey, USA,World, Solar System, Milky Way, Universe and Beyond
Unrated

Re: Distinct Roman numerals

Postby jriddy on Mon Jan 30, 2012 11:01 pm

Code is hidden, SHOW
jriddy
Newbie
Newbie
LTD Bronze - Rating: 3
 
Posts: 1
Joined: Thu Jan 12, 2012 10:25 pm