a064: Change Arabic number to Chinese number 將阿拉伯數字更改為中文數字
標籤 : String 字串
通過比率 : 33% (1 人 / 3 人 ) (非即時)
評分方式 :
Tolerant

最近更新 : 2019-03-08 08:39

內容

Given an amount of money (in the form of Arabic number), please change it to the form of Chinese number. For example, if the input value is 5203, then you have to change it to “伍仟貳佰零參”.

給定一個金額(以阿拉伯數字的形式),請將其更改為中文數字。例如,如果輸入值為5203,則必須將其更改為“伍仟貳佰零參”。

輸入說明

The input consists of a number of test cases. The first line of the input file contains an integer indicating the number of test cases to follow. Each test case is an integer that indicates an amount of money (in the form of Arabic number). We assume the value of each test case is less than or equal to 500000000.

輸入包含許多測試案例。輸入文件的第一行包含一個整數,表示接著的測試案例數量。每個測試案例都是一個整數,表示金額(以阿拉伯數字的形式)。我們假設每個測試案例的值小於或等於500000000。

輸出說明

The output contains one line for each test case. Each line contains a string, which is the number in the form of Chinese number.

每個測試案例輸出一行。每行包含一個字串,即為中文數字形式的數字。

範例輸入
2
5028
309027
範例輸出
伍仟零貳拾捌
參拾萬玖仟零貳拾柒
測資資訊 :
記憶體限制 : 64 MB
隱藏 測資點#0 (50%): 1.0s , <1K
隱藏 測資點#1 (50%): 1.0s , <1K
提示 :
標籤:
String 字串
出處:
線上協同學習平臺 - ITSA 教育部資通訊軟體創新人才推升計畫 [編輯 :
zero_jason (zero_jason(MANAGER))
]


編號 身分 題目 主題 人氣 發表日期
沒有發現任何「解題報告」