You never believed in aliens until one day, while exploring a building rumored to have UFO sightings to win a bet with your friend. During a phone call with your friend, the signal became increasingly distorted. Suddenly, you lost consciousness. When you opened your eyes, three aliens with mechanical arms appeared before you in a strange space, with your limbs restrained.
Your friend, discovering your disappearance, uses Turbo Granny(高速婆婆)time-travel ability to reach you. To pinpoint your location, he sends signals that you need to respond to.
You will receive T signals S. You need to return the execution result of each line to your friend.
The signals will only appear in the following formats:
(The printf format in the 3rd case follows the same pattern as cases 1 and 2.)
For the %d format, when using %Ad where A is a positive integer, if the number of digits is less than A, spaces will be added in front to make the total width equal to A.
Please process your string using the Gen function and output the result.
(You can modify the Gen function as long as you ensure the output result is correct.)
#include <string.h>
int Gen(int init, char *str){
The first line contains an integer T, representing the number of signals.
The following T lines each contain a string Si , representing the signal to process in the i-th round.
Each signal Si is guaranteed to:
Output T lines, each containing a signal Si after being processed by the Gen function, representing the signal to process in the i-th round.
Please remember to print "\n" at the end.
If you are not sure how to use Gen, please refer to the following.
int ans = 0;
ans = Gen(ans, <your string>);
If the input is "for(int i=N; i < M; i++) printf(...);" , you can process it with the following code.
int ans = 0;
for(int i=N; i < M; i++){