PAT 1082 Read Number in Chinese[难]】的更多相关文章

1082 Read Number in Chinese (25 分) 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 l…
#include <cstdio> #include <cstdlib> #include <string> #include <vector> #include <algorithm> using namespace std; const char* d2cn[] = {"ling", "yi", "er", "san", "si", "…
1082 Read Number in Chinese (25 分) Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output Fufirst if it is negative. For example, -123456789 is read as Fu yi Yi er Qian san Bai si Shi wu Wan li…
模拟题. #include<cstdio> #include<cstring> #include<cmath> #include<vector> #include<map> #include<stack> #include<queue> #include<string> #include<iostream> #include<algorithm> using namespace std;…
题意: 输入一个九位整数,输出它的汉字读法(用拼音表示). trick: 字符串数组""其实会输出一个空格,而不是什么都不输出,导致测试点0和4格式错误. AAAAAccepted code: #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; ]; ]={"","yi","er","san",&qu…
题目如下: 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 b…
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: ze…
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: ze…
题意就是给出9位以内的数字,按照汉子的读法读出来. 读法请看下方的几个例子: 5 0505 0505 伍亿零伍佰零伍万零伍佰零伍 5 5050 5050 伍亿伍仟零伍拾万伍仟零伍拾  (原本我以为这个是读:伍亿伍仟零伍拾万"零"伍仟零伍拾) 5 0550 0055 伍亿零伍佰伍拾万零伍拾伍 5 5005 5500 伍亿伍仟零伍万伍仟伍佰 5 5500 0055 伍亿伍仟伍 按四位四位的分开处理,具体见代码~ #include <iostream> #include <…
// 1082.cpp : 定义控制台应用程序的入口点. // #include <iostream> #include <string> #include <vector> using namespace std; string str; string s1[4] = { "Ge","Shi","Bai","Qian" }; string s2[10] = { "ling&quo…