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

6676번 - Inglish-Number Translator 다국어

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

문제

In this problem, you will be given one or more integers in English. Your task is to translate these numbers into their integer representation. The numbers can range from negative 999,999,999 to positive 999,999,999. The following is an exhaustive list of English words that your program must account for:

negative, zero, one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, fifteen, sixteen, seventeen, eighteen, nineteen, twenty, thirty, forty, fifty, sixty, seventy, eighty, ninety, hundred, thousand, million

입력

The input consists of several instances. Notes on input:

  1. Negative numbers will be preceded by the word negative.
  2. The word "hundred" is not used when "thousand" could be. For example, 1500 is written "one thousand five hundred", not "fifteen hundred".

The input is terminated by an empty line.

출력

The answers are expected to be on separate lines with a newline after each.

제한

예제 입력 1

six
negative seven hundred twenty nine
one million one hundred one
eight hundred fourteen thousand twenty two

예제 출력 1

6
-729
1000101
814022

힌트

출처

ICPC > Regionals > Europe > Central European Regional Contest > CTU Open Contest > CTU Open Contest 2004 I번

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

출처

대학교 대회

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

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