Logo
(追記) (追記ここまで)

4062번 - Give Me an E 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB41201341.935%

문제

Everyone knows that the letter “E” is the most frequent letter in the English language. In fact, there are one hundred sixteen E’s on this very page ... no, make that one hundred twenty one. Indeed, when spelling out integers it is interesting to see which ones do NOT use the letter “E”. For example 6030 (six thousand thirty) doesn’t. Nor does 4002064 (four million two thousand sixty four).

It turns out that 6030 is the 64th positive integer that does not use an “E” when spelled out and 4002064 is the 838th such number. Your job is to find the n-th such number.

Note: 1,001,001,001,001,001,001,001,001,000 is “one octillion, one septillion, one sextillion, one quintillion, one quadrillion, one trillion, one billion, one million, one thousand”. (Whew!)

입력

The input file will consist of multiple test cases. Each input case will consist of one positive integer n (less than 231) on a line. A 0 indicates end-of-input. (There will be no commas in the input.)

출력

For each input n you will print, with appropriate commas, the n-th positive integer whose spelling does not use an “E”. You may assume that all answers are less than 1028.

제한

예제 입력 1

1
10
838
0

예제 출력 1

2
44
4,002,064

힌트

출처

ICPC > Regionals > North America > East Central North America Regional > 2007 East Central Regional Contest C번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /