Implement a function that sorts a list of creature powers and organizes them into odd and even categories. The function should separate the powers into two lists based on their parity, calculate the sum of each list, and append these sums to their respective lists. Finally, return a formatted string containing the sorted even powers followed by the sorted odd powers.
Functionality Requirements:
Create a function named sort_creatures_by_power that takes the following parameters:
N (int): The number of creature powers. This parameter will be provided for clarity but will not be directly used in the implementation.
powers (list of int): A list containing the power levels of the creatures.
The function should:
Sort the list of powers.
Divide the powers into two separate lists: one for even powers and another for odd powers.
Calculate and append the sum of the even powers to the end of the even list.
Calculate and append the sum of the odd powers to the end of the odd list.
Combine the even and odd lists into a single string, where even powers appear first, followed by odd powers, with the sums included at the end of their respective lists.
Return this combined string.
Input/Output Requirements:
Input: An integer N followed by a list powers of integers.
Output: A string formatted as described, with even powers listed first, followed by odd powers and their respective sums.