Here is a set of basic questions producing integer or string outputs. Answer them and format the result precisely with the JSON instructions provided:

Question 0 (Question id: q_Phul):
Solve for p: 20*p - 8 = 152 Respond with an integer.

Question 1 (Question id: q_F1uFF):
Your task is to count how many legs there are in total when given a list of animals.

Now, how many legs are there in total if you have 1 dog, 2 snakes, 2 beetles?
 Respond with an integer.



Create a JSON object keyed by every question id except q_F1uFF.

Each key’s value must be an object holding an 'answer' field. Additionally, if the task is about counting legs of animals or counting letters in a string, add the task_type field with value 'leg_counting' or 'letter_counting', respectively.
Also add the answer type as 'string' or 'integer' to the field 'answer_type' for each object.
For even integer answers, include 'half_answer' equal to answer ÷ 2.
If the response to a question is a string, add a 'first_char' field containing its first character.
For last-character tasks, provide 'original_string' alongside the answer.

Now provide the result JSON using the described format.

{"ground_truth": {"q_Phul": {"answer": 8, "answer_type": "integer", "half_answer": 4}}}