mirror of
https://github.com/xlucn/PAT.git
synced 2026-10-30 00:37:37 +08:00
26 lines
1.1 KiB
HTML
26 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<h1>1082. Read Number in Chinese (25)</h1>
|
|
<div id="problemContent">
|
|
<p>Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output "Fu" first if it is negative. For example, -123456789 is read as "Fu yi Yi er Qian san Bai si Shi wu Wan liu Qian qi Bai ba Shi jiu". Note: zero ("ling") must be handled correctly according to the Chinese tradition. For example, 100800 is "yi Shi Wan ling ba Bai".</p>
|
|
<p><b>
|
|
Input Specification:
|
|
</b></p>
|
|
<p>Each input file contains one test case, which gives an integer with no more than 9 digits.</p>
|
|
<p><b>
|
|
Output Specification:
|
|
</b></p>
|
|
<p>For each test case, print in a line the Chinese way of reading the number. The characters are separated by a space and there must be no extra space at the end of the line.</p>
|
|
<b>Sample Input 1:</b><pre>
|
|
-123456789
|
|
</pre>
|
|
<b>Sample Output 1:</b><pre>
|
|
Fu yi Yi er Qian san Bai si Shi wu Wan liu Qian qi Bai ba Shi jiu
|
|
</pre>
|
|
<b>Sample Input 2:</b><pre>
|
|
100800
|
|
</pre>
|
|
<b>Sample Output 2:</b><pre>
|
|
yi Shi Wan ling ba Bai
|
|
</pre>
|
|
</div> |