Page 2 of 5

Re: Problem 017

Posted: Fri May 01, 2009 1:18 am
by quilan
There's a lesson here about drinking & deriving...

Re: Problem 017

Posted: Sun May 10, 2009 4:05 am
by TripleM
stupidgeek wrote:EDIT: I editted my code so that my point c) was validated, ie, my program now output "three hundred seven" for 307 instead of "three hundred and seven" (and, obviously all like cases [102, 906, 405, etc]). As far as I'm concerned, this is inconsistent, but it gives the correct answer. Good luck all.
If that gives the correct answer for you, then you must have a mistake elsewhere in your code. The correct answer uses 'three hundred and seven' for 307, not the American version.

Re: Problem 017

Posted: Mon Jun 29, 2009 4:00 pm
by aantthony
lol, can't get this, but it seems so easy. I add up the numbers on the right
and get these results like this (i skipped the spaces on purpose)

eighthundredandninetytwo 24
eighthundredandninetythree 26
eighthundredandninetyfour 25
eighthundredandninetyfive 25
eighthundredandninetysix 24
eighthundredandninetyseven 26
eighthundredandninetyeight 26
eighthundredandninetynine 25
ninehundred 11
ninehundredandone 17
ninehundredandtwo 17
ninehundredandthree 19
ninehundredandfour 18
ninehundredandfive 18
ninehundredandsix 17
ninehundredandseven 19
ninehundredandeight 19
ninehundredandnine 18
ninehundredandten 17
ninehundredandeleven 20
ninehundredandtwelve 20

Are the last two right? Thats how I would say them.

Re: Problem 017

Posted: Mon Jun 29, 2009 4:53 pm
by daniel.is.fischer
Yes, the last two are correct (I think the others are also correct, but I didn't count the letters in each number).
Double-check your spelling, it's quite common to have a glitch there.

Problem 17 is logically wrong.

Posted: Fri Jan 15, 2010 2:41 am
by mctom987
The use of "and" should not be counted. Thinking about it logically, one would look like a complete fool to say the number 913 as "nine-hundred and ten and three." Or the number 135 as "one-hundred and thirty and five."

The use of "and" in numbers is used to separate numbers. "one-hundred and thirty-five" would logically be 100 and 35. Therefore, counting the "and"s in this problem is incorrect, even if it is the accepted form in British.

Re: Problem 17 is logically wrong.

Posted: Fri Jan 15, 2010 3:14 am
by elendiastarman
This site is hosted in England (I think) and therefore the British usage is correct. I'm in the same boat as you, but it's not really that big of a deal...

Re: Problem 17 is logically wrong.

Posted: Fri Jan 15, 2010 4:11 am
by mctom987
I'm saying, British is incorrect. Therefore, using British usage would be incorrect.
This is beyond the scope of a language, opinion, or dialect. Logic is independent of all of these factors.
If 2x = 4, then you could logically deduct x = 2. But if in England, x were to be 3, the logic in England would be flawed, and thus incorrect to use anywhere in the world.

Also, on an semi-unrelated note. Searching is broken. I was looking for "Problem 17" (quotes included), and was returned many, many more results than just for problem 17. "problem" was not included. Even with "+Problem" it would not work.

Re: Problem 17 is logically wrong.

Posted: Fri Jan 15, 2010 4:16 am
by elendiastarman
Unfortunately, semantics isn't always totally logical...like I before E except after C...

Re: Problem 17 is logically wrong.

Posted: Fri Jan 15, 2010 9:25 am
by TripleM
mctom987 wrote:I'm saying, British is incorrect. Therefore, using British usage would be incorrect.
Just a shame that the entire rest of the world disagrees with you. American is definitely the one that is incorrect, and that is easily the majority view :)

Re: Problem 017

Posted: Fri Jan 15, 2010 12:33 pm
by hk
mctom987 wrote:The use of "and" should not be counted. Thinking about it logically, one would look like a complete fool to say the number 913 as "nine-hundred and ten and three." Or the number 135 as "one-hundred and thirty and five."

The use of "and" in numbers is used to separate numbers. "one-hundred and thirty-five" would logically be 100 and 35. Therefore, counting the "and"s in this problem is incorrect, even if it is the accepted form in British.
mctom987 wrote:I'm saying, British is incorrect. Therefore, using British usage would be incorrect.
This is beyond the scope of a language, opinion, or dialect. Logic is independent of all of these factors.
If 2x = 4, then you could logically deduct x = 2. But if in England, x were to be 3, the logic in England would be flawed, and thus incorrect to use anywhere in the world.
Language has little to do with logic.
One can only try to describe usage. And accepted usage can be never be called wrong.
E.g. in my mother language one pronounces 1066 as "thousand six and sixty".
Or 123456 as "hundred three and twenty thousand four hundred six and fifty"
Funny isn't it?
Also, on an semi-unrelated note. Searching is broken. I was looking for "Problem 17" (quotes included), and was returned many, many more results than just for problem 17. "problem" was not included. Even with "+Problem" it would not work.
Problems with a number lower than 100 are called Problem 0xx in this forum to enable to display them sorted on subject.
See the sticky topic viewtopic.php?f=50&t=1356#p12839
Searching for Problem 017 would have done the job.
Better still: at the bottom of this page are options to display a forum.
One of them is: sorted on subject.

Re: Problem 017

Posted: Fri Jan 15, 2010 1:18 pm
by Jochen_P
Or take the french language for example (no offense intended, I do love the french language, but hadn't had practice since school days)

94 = quatre-vingt-quatorce = four-twenty-fourteen = 4*20+14

Sounds very unfamiliar, eh?

Re: Problem 017

Posted: Fri Jan 15, 2010 3:16 pm
by Lord_Farin
Actually it's quatorze, but we get your point (btw the Dutch numeric pronunciation is indeed one of the weirdest around XD)

However, this all has little to do with Problem 17, so we might consider moving these posts to somewhere more appropriate. Moderators?

Re: Problem 017

Posted: Fri Jan 15, 2010 5:50 pm
by Jochen_P
évidemment ! :shock:

Talking about weird numeric pronounciation; it's the very same in german (the dutch, not the french pronounciation that is) and of course it feels not so weird when you have grown up with it.
What is weird is to state that it is wrong :mrgreen: *ahem* as well as to say "search is broken" without proof

Re: Problem 017

Posted: Fri Jan 15, 2010 7:32 pm
by hk
Lord_Farin wrote:Actually it's quatorze, but we get your point (btw the Dutch numeric pronunciation is indeed one of the weirdest around XD)

However, this all has little to do with Problem 17, so we might consider moving these posts to somewhere more appropriate. Moderators?
About the only thing that can be said about this problem is the never ending bickering of those that do not know the British usage.
So we better can leave it here as a warning.

Re: Problem 017

Posted: Wed Apr 28, 2010 12:49 am
by Bernardo
I feel like such a bitch having brute forced this one :lol:

Re: Problem 017

Posted: Thu Aug 26, 2010 9:12 pm
by frogboy77
new poster
forgive any errors
agree the and is unneeded in english system
someone stated 1.345 is said in U.S as one and three hundred forty five thousandths
just wondering how an american says 1.2435576889
not saying one way is better than the other but just curious
also how to say 3.8562829348746563838364545747

Re: Problem 017

Posted: Thu Aug 26, 2010 9:50 pm
by elendiastarman
At that point (no pun intended) we say "Three point eight five six two...". There's probably a rule out there that says that you say it as a fraction only up to a certain point (probably the thousands)...

Re: Problem 017

Posted: Sat Oct 09, 2010 7:10 pm
by kunukn
Hey just go the right result and wanted to share the correct spellings (had a spelling bug which puzzled my for some time)
I recommend printing the spelling along for debugging, e.g. NineHundredAndNinetyNine

One
Two
Three
Four
Five
Six
Seven
Eight
Nine
Ten
Eleven
Twelve
Thirteen
Fourteen
Fifteen
Sixteen
Seventeen
Eighteen
Nineteen
Twenty
Thirty
Forty
Fifty
Sixty
Seventy
Eighty
Ninety
Thousand

having some trouble with 17

Posted: Wed Nov 10, 2010 4:40 am
by phillip1882
as far as i can tell my logic is correct as is my spelling of the words that make up the numbers, short of posting the code I'm not sure what to do help you understand where i might be going wrong. any ideas?

p.s. i posted my code in the numbers forum so apologies for this.

Re: Problem 017

Posted: Wed Nov 10, 2010 9:26 am
by euler
I assume that you have carefully read through this entire thread for the many common issues with this problem?

However, I would draw your attention to kunukn's post (just above), where he/she kindly lists the correct spellings of all the numbers. Does your program give 19 with the simple test case: one, two, three, four, five? Does it give 23 and 20 for the numbers 342 and 115 respectively? (Remember you do not count spaces.)