Page 3 of 5

Re: Problem 017

Posted: Wed Nov 10, 2010 11:27 am
by jaap
phillip1882,
I saw the code you posted before it was removed. Your problem lies in how you handle the number 100.

Re: Problem 017

Posted: Mon Feb 21, 2011 9:03 pm
by Doro_91
I'm going crazy. I've been looking over my code (java) about 2 hours and to me it's correct. but it gives not the correct solution. so i ask: may anyone of you look over my code? cause i do not understand what's wrong..

Re: Problem 017

Posted: Mon Feb 21, 2011 10:38 pm
by Jochen_P
Yeah, please send it.. I am curious If I am able to spot the looney in an unfamiliar language.. (no guarantuee)

Re: Problem 017

Posted: Sat Apr 09, 2011 8:24 am
by N1ghtly
Hello everybody,

I've been debugging my code 2+ hours, still without a correct answer.
I gave up and cheated, and I seem to bet getting 10 too low.
I have absolutely no idea!
Can I please send my code to someone, maybe you can spot the error :p

Re: Problem 017

Posted: Wed Apr 27, 2011 9:49 am
by Barsy
Hello,

I cannot find the right answer and I think the problem come from the language.

Can someone cofirm that the sum of letters from 1 to 500 is : 9774 ?

Is there exceptions in the language ? The writting for following numbers is correct ?
100 : one hundred (10)
200 : two hundred (10)
215 : two hundred and fifteen (20)
407 : four hundred and seven (19)
694 : six hundred and ninety four (23)

Thank you for your help

PS : It's OK, I solved the problem. It's seem I made a mistake counting letters in the word "fourteen"... :?

Re: Problem 017

Posted: Mon May 30, 2011 7:58 am
by pytom
this one is ok~ :D

Code: Select all

code snipped by hk

Re: Problem 017

Posted: Mon May 30, 2011 8:36 am
by Lord_Farin
pytom wrote:this one is ok~ :D

Code: Select all

[Snip]
In fact, it is not. The bright red box above this forum should tell you (and should've in advance) that posting such results is **NOT** allowed. Please, remove your code.

Re: Problem 017

Posted: Mon May 30, 2011 9:16 am
by pytom
Lord_Farin wrote:
pytom wrote:this one is ok~ :D

Code: Select all

[Snip]
In fact, it is not. The bright red box above this forum should tell you (and should've in advance) that posting such results is **NOT** allowed. Please, remove your code.
sorry, terrible sorry~ :( i make a mistake~

Re: Problem 017

Posted: Mon May 30, 2011 10:29 am
by Lord_Farin
pytom wrote: sorry, terrible sorry~ :( i make a mistake~
Mistakes are good. They keep us human 8-) Thanks for your apologies.

Re: Problem 017

Posted: Wed Jun 01, 2011 5:37 pm
by m34tcode
lol im epic failing. been trying to figure out for days y its not working.

Code: Select all

one
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
thirteen
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
..
thirty
fourty
fifty
sixty
seventy
eighty
ninety
n-hundred
onethousand
EDIT: lol browsers spell-correct feature showed me that fourty is spelled as 'forty' lol. got it =]

Re: Problem 017

Posted: Mon Jun 20, 2011 11:08 am
by browndar
I think eighteen and eighty may be other culprits.

Re: Problem 017

Posted: Tue Jun 21, 2011 7:22 pm
by kholdstare13
I would like to point out that the proper U.S. and Canadian number system reserves the word "and" only for FRACTIONAL numbers, not those represented with a decimal point, and digits following a decimal point are pronounced separately unless treated as a fraction. For example,

1 1/2: One and one half
1.5: One point five
102.123 One hundred two point one two three
3.14 Three point one four (In order to pronounce "fourteen" it must be stated as "three and fourteen hundredths")

It is lso interesting to note that "hundredth(s)" is the only fraction not to require the word "one", as in "one hundred fiftieths" (X/150). Is this also true in British?

How would British people pronounce the following?
987,123 456/705: Nine hundred AND eighty seven thousand one hundred AND twenty three AND four hundred AND fifty six seven hundred AND fifths?
(American: Nine hundred eighty seven thousand one hundred twenty three AND for hundred fifty six seven hundred fifths)
Do you use some word other than "and" to separate integers from fractions?

Luckily this problem is only up to 1000 or we might have to deal with the dilemma of British numbers over 999,999,999.

Re: Problem 017

Posted: Tue Jun 21, 2011 7:58 pm
by garethrees
In the UK, we almost never talk about large improper fractions, so it does not matter very much that a phrase like "one hundred and three quarters" is ambiguous between 103/4 and 403/4 (which indeed it is). For real world numbers, we tend to use decimal, so we'd say "twenty-five point seven five" or "one hundred point seven five". For the few cases where we do use improper fractions (for example, ages of young children, clothing sizes, "platform nine and three quarters"), the numbers tend to be small enough that there is in practice no ambiguity. Maybe things are different elsewhere in the world.

There is no dilemma about names for large numbers in the UK. 10**9 is a "billion" and has been so for at least forty years. The very last holdouts for the "long scale" (10**12) billion gave up in the mid-1970s.

Re: Problem 017

Posted: Wed Jun 29, 2011 7:50 am
by kapila_619
Hi,
can anyone see my code in python

I have gone over it many times but cannot find the mistake

edit : done !!

Re: Problem 017

Posted: Wed Jul 06, 2011 11:46 pm
by Slaunger
Feel free to send me your code, and I will try to help.

Re: Problem 017

Posted: Sun Jul 10, 2011 8:46 pm
by Ulkor
Thanks to this thread I am now aware of the fact that it's forty, not fourty. :shock:

Should I be happy I or should I feel ashamed? :lol:

Re: Problem 017

Posted: Sun Nov 20, 2011 10:12 pm
by sh4ring4n
I have most of it down, but I can't seem to pinpoint the answer, and how my code is wrong.

Re: Problem 017

Posted: Mon Jul 23, 2012 12:03 am
by ComSciGuy
After reading all of the posts and double checking my spelling, I am still getting the wrong answer. Below is a sample of the output. My code outputs 19 for 1-5 and does 115 and 342 correctly.

Code: Select all

1: one (3)
2: two (3)
3: three (5)
4: four (4)
5: five (4)
6: six (3)
7: seven (5)
8: eight (5)
9: nine (4)
10: ten (3)
11: eleven (6)
12: twelve (6)
13: thirteen (8)
14: fourteen (8)
15: fifteen (7)
16: sixteen (7)
17: seventeen (9)
18: eighteen (8)
19: nineteen (8)
20: twenty (6) ...
30: thirty (6) ...
40: forty (5) ...
50: fifty (5) ...
60: sixty (5)
70: seventy (7) ...
80: eighty (6) ...
90: ninety (6)...
100: onehundred (10)
101: onehundredandone (16) ...
115: onehundredandfifteen (20) ...
342: threehundredandfortytwo (23) ...
998: ninehundredandninetyeight (25)
999: ninehundredandninetynine (24)
1000: onethousand  (12)
Am I missing something simple here. Thanks.

Edit: Thanks to mdean for providing a fresh set of eyes. Note: The error was an extra space after the "thousand"

Re: Problem 017

Posted: Tue Apr 08, 2014 2:16 pm
by loucmu
Damn you "eightteen"!!!!! I'm a mathematician damnit, not a speller.

Re: Problem 017

Posted: Tue Apr 08, 2014 7:31 pm
by hk
For a mathematician spelling should be piece of cake. :lol: