This is a traditional problem.
Description
"What functionality does my program need to implement? ......" "I don't know either ......" "Ah? Then how am I supposed to write it ......" "Someone has already written tests for you; you just need to pass these tests ......" "Ah? ......" "All the final test data is in the problem directory. Please make backups to avoid accidental deletion!" "This ......" "Oh, I can also tell you the input format ... but since you have the complete data, knowing the input format might not be very useful ......"
Input
The first line contains a string representing the ID of the software function to be executed. The more similar two IDs are, the closer the algorithms for the corresponding functions are.
Depending on the function, there may be input of arbitrary length following this; see the documentation for each function for details.
Output
See the documentation for each function for details.
Subtasks
"Where is the 'documentation for each function'?" "I don't have it, just like I don't have the problem description ......" "Fine ... can I just hardcode the answers then ......" "The code length limit is 102400 bytes (100KB). Exceeding this limit will result in a score of zero for this problem, so just hardcoding everything is definitely not going to work! However, you can include some small tables if needed ......" "Hmm ......" "Additionally, we will grade your program for each test case individually and sum them up to get the total score. According to traditional rules, each test case is worth full marks if correct and 0 if incorrect. The scores for each test case are not all the same, and there is no necessary correlation between the score, order, and difficulty of the test cases."
Note
When you use the int type in C/C++, if an overflow occurs, it is relatively likely that the result will be a reasonable value within the int range, congruent modulo $2^{32}$. For example, when calculating $2147483647 + 2$, you are likely to get $-2147483647$.
However, the C/C++ standard classifies this situation as "undefined behavior." When your program attempts to perform an int operation that overflows, in addition to the result mentioned above, the compiler may also cause your program to produce incorrect results, enter an infinite loop, or encounter runtime errors, all of which are compliant with the C/C++ standard.
If your program intends to utilize the natural overflow characteristics of int, please convert to unsigned type operations. For example, rewrite a + b as (int) ((unsigned) a + (unsigned) b) to avoid unexpected errors.