닫기버튼


상단 배너 영역


실시간댓글

[일반] 이 문제는 좀 귀찮아 보인다

nlv107_876532 길섹 | 2014-06-12 11:55

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.




흠 - _-


이거 좀 많이 귀찮네 ㅡㅡ;;;;;;



걍 패스하고 다른 문제부터 풀까..

nlv119_89323 길섹
gold

1,296

point

1,829,040

프로필 숨기기

119

36%

 

최신순

게임조선 회원님들의 의견 (총 8개) ※ 새로고침은 5초에 한번씩 실행 됩니다.

새로고침

신고

nlv126_54168 소이리 2014-06-12 11:58 0

그런게 어딪죠 머리굴리셈

신고

nlv157_2456 TheRogue 2014-06-12 12:44 0

그거 쉬움

신고

nlv157_2456 TheRogue 2014-06-12 12:44 0

근데 난 못풀겟다

신고

nlv84 진짜배랭이 2014-06-12 12:58 0

1~9 ->36개
10~19 -> 70개
20~99 -> (6+6+6+5+4+7+7+6)*10 + 36*8 = 758개

and -> 3*891 = 2673개
hundred -> 7*900 = 6300개
hundred 앞에 one~nine -> 36*100 = 3600개
1~99까지 총 10번 -> (36+70+758) * 10 = 8640개
one thousand -> 11개

2673+6300+3600+8640+11 = 21224 나왔음

신고

nlv107_876532 길섹 작성자 2014-06-12 13:13 0

그니깐 배랭이 댓글 같은걸 손수 계산은 당연히 귀찮은거고

함수 활용해서 프로그래밍으로 풀고 싶은데

예외가 꽤 자주 나오니 ( 1부터 20 이라던가 and 가 붙는다던가)

그래서 귀찮다는건데 어렵다곤 안했는데...

신고

nlv84 진짜배랭이 2014-06-12 13:23 0

아 프로그래밍 할려는 거였군
근데 저렇게 보면 and는 100개당 99개
hundred 100개당 100개
이것만 있으면 되는거 아닌가 1~99까지랑

신고

nlv107_876532 길섹 작성자 2014-06-12 13:27 0

지금 생각한대로만 해서 굴려보니깐 21174 개 나옴
한 50개 정도 차이인데... 뭐가 비어버린걸까

신고

nlv107_876532 길섹 작성자 2014-06-12 13:39 0

근데 21224 가 틀렸네
= _=;

0/500자

목록 글쓰기 위로 로그인


게임조선 소개및 약관