PROGRAMMING:Simple password of zjw series
Recently, the campus "telecommunication fraud" happened one after another, which made zjw worry about his bank account. In order to prevent this kind of thing from happening to himself, zjw decided to design a password for the bank card, but zjw encountered such troubles: if it is easy to remember the birthday, it is easy to be cracked and not very safe; If you set a password that is not easy to remember, you are worried that you will forget it; What if it's on paper? I'm afraid the paper will be found or lost
After racking their brains, zjw designed a program, the task of this program is to convert a string of Pinyin letters into 6 digits (password).
Zjw can use any easy to remember Pinyin string (such as name, Zhong Jiawei, just write: zhongjiawei) as input, and finally output 6 digits.
The program transformation process is as follows:
Step 1: fold the Pinyin strings into 6 groups. For example, zhongjiawei becomes:
zhongj
iawei
Step 2: add the ascll code values of all the characters in the same vertical position to get 6 numbers. As shown in the above example, we can get the following results:
227 201 230 211 208 106
The third step: for each number processing, is to add the number of each bit, if it is not a single digit, then continue processing until it becomes a single digit.
For example: 227 = > 2 + 2 + 7 = 11 = > 1 + 1 = 2
After the above three steps, the password is 235417. This is the last bank card password of zjw
###Input format:
Enter a t (0 < T < 100) in the first line to indicate the number of test data groups
Each group of data occupies one line, representing the given Pinyin string, the length is not more than 20, and it is guaranteed to be in lowercase English
###Output format:
Zjw last bank card password, a group of data accounts for one line
###Input example:
Here is a set of inputs. For example:
```in
two
zhongjiawei
haohaoxuexi
```
###Output example:
The corresponding output is given here. For example:
```out
two hundred and thirty-five thousand four hundred and seventeen
eight hundred and seventy-five thousand eight hundred and forty-three
```
answer:If there is no answer, please comment
After racking their brains, zjw designed a program, the task of this program is to convert a string of Pinyin letters into 6 digits (password).
Zjw can use any easy to remember Pinyin string (such as name, Zhong Jiawei, just write: zhongjiawei) as input, and finally output 6 digits.
The program transformation process is as follows:
Step 1: fold the Pinyin strings into 6 groups. For example, zhongjiawei becomes:
zhongj
iawei
Step 2: add the ascll code values of all the characters in the same vertical position to get 6 numbers. As shown in the above example, we can get the following results:
227 201 230 211 208 106
The third step: for each number processing, is to add the number of each bit, if it is not a single digit, then continue processing until it becomes a single digit.
For example: 227 = > 2 + 2 + 7 = 11 = > 1 + 1 = 2
After the above three steps, the password is 235417. This is the last bank card password of zjw
###Input format:
Enter a t (0 < T < 100) in the first line to indicate the number of test data groups
Each group of data occupies one line, representing the given Pinyin string, the length is not more than 20, and it is guaranteed to be in lowercase English
###Output format:
Zjw last bank card password, a group of data accounts for one line
###Input example:
Here is a set of inputs. For example:
```in
two
zhongjiawei
haohaoxuexi
```
###Output example:
The corresponding output is given here. For example:
```out
two hundred and thirty-five thousand four hundred and seventeen
eight hundred and seventy-five thousand eight hundred and forty-three
```
answer:If there is no answer, please comment