プロジェクト

全般

プロフィール

Problem 17 » 履歴 » バージョン 1

Noppi, 2023/12/31 01:26

1 1 Noppi
[ホーム](https://redmine.noppi.jp) - [[Wiki|Project Euler]]
2
# [[Problem 17]]
3
4
## Number Letter Counts
5
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.
6
If all the numbers from $1$ to $1000$ (one thousand) inclusive were written out in words, how many letters would be used?
7
**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.
8
9
## 数字の文字数
10
1 から 5 までの数字を英単語で書けば one, two, three, four, five であり, 全部で 3 + 3 + 5 + 4 + 4 = 19 の文字が使われている.
11
では 1 から 1000 (one thousand) までの数字をすべて英単語で書けば, 全部で何文字になるか.
12
注: 空白文字やハイフンを数えないこと. 例えば, 342 (three hundred and forty-two) は 23 文字, 115 (one hundred and fifteen) は20文字と数える. なお, "and" を使用するのは英国の慣習.
13
14
```scheme
15
```