14414 - Fishhh's military career
|
Time |
Memory |
Case 1 |
1 sec |
32 MB |
Case 2 |
1 sec |
32 MB |
Case 3 |
1 sec |
32 MB |
Case 4 |
1 sec |
32 MB |
Case 5 |
1 sec |
32 MB |
Case 6 |
1 sec |
32 MB |
Case 7 |
1 sec |
32 MB |
Case 8 |
1 sec |
32 MB |
Case 9 |
1 sec |
32 MB |
Case 10 |
1 sec |
32 MB |
Description
Fishhh is about to join the military, and unfortunately, he has to serve one year of mandatory service. Upon receiving his draft notice, he got his recruit information, including a military branch represented by a single English letter C, and a 20-digit ID number. He's worried about reporting to the wrong place, so he needs your help to calculate the following information:
- Military Branch: Lowercase letter represents Navy, uppercase letter represents Army
- Battalion: The first 3 digits of the ID number
- Company: The 4th to 8th digits of the ID number
- Platoon: The 16th digit from the front of the ID number (5th from the end), where 1 represents A, 2 represents B, and so on
- Group: The remainder of the ID number divided by 4, plus 1
Input
The input consists of only one line, containing a character C and a string ID of length 20 composed of digits 0-9 (may have leading zeros), separated by a space.
Constraints
- C will only be an uppercase or lowercase English letter.
- The length of ID is 20. (May include leading zeros)
- for all i in [1,20], 0 ≤ idi ≤ 9
- id16 ≠ 0
Subtasks
- Testcases 1~3: ID has 11 leading zeros.
- Testcases 4~5: ID has 3 leading zeros.
- Testcases 6~10: No additional restrictions.
Output
The output consists of five lines, each containing a string or an integer, representing:
Military Branch (string), Battalion (integer), Company (integer), Platoon (string), and Group (integer).
"integer" means it doesn't include any unnecessary leading zeros.
Please remember to print "\n" at the end.
Tags