글자 수 세기

1부터 1000까지를 영어로 썼을 때, 전부 다 쓰려면 영어 몇 글자가 필요한가?

If the numbers 1 to 5 are written out in words: one, two, three,
four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.

If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used?


NOTE:

Do not count spaces or hyphens. For
example, 342 (three hundred and forty-two) contains 23 letters and 115
(one hundred and fifteen) contains 20 letters. The use of “and” when
writing out numbers is in compliance with British usage.

원문 : http://projecteuler.net/index.php?section=problems&id=17

one


더보기

코멘트

“글자 수 세기”에 대한 4개 응답

  1. 
                  snowall
                  아바타

    하나





    넷…

    그리고 글자판을 몇번 눌러야 하는가

    이렇게 물어보면 결코 쉽지 않죠 -_-

  2. 
                  snowall
                  아바타

    84번을 풀게 될 때쯤 말씀드리겠습니다. -_-;

  3. 
                 goldenbug
                 아바타

    한글로 접근하면 훨씬 단순해지는 문제네요. ^^ㅋ

  4. 
                ㄹㄹㄹ
                아바타
    ㄹㄹㄹ

    음.. 84번 모노폴리 문제 어떻게 접근하면 좋을까요?

ㄹㄹㄹ 에 응답 남기기응답 취소

이 사이트는 Akismet을 사용하여 스팸을 줄입니다. 댓글 데이터가 어떻게 처리되는지 알아보세요.