# Exclusive Execution Time of Functions

Try to solve the Exclusive Execution Time of Functions problem.

We'll cover the following

## Statement

We are given an integer number, n, representing the number of functions running in a single-threaded CPU, and an execution log, which is essentially a list of strings. Each string has the format {function id}:{"start" | "end"}:{timestamp}, indicating that the function with function id either started or stopped execution at the time identified by the timestamp value. Each function has a unique ID between $0$ and $n-1$. Compute the exclusive time of the functions in the program.

Note: The exclusive time is the sum of the execution times for all the calls to a specific function.

Constraints:

• $1 \leq$ n $\leq 100$
• $1 \leq$ logs.length $\leq 500$
• $0 \leq$ function id $<$ n
• $0 \leq$ timestamp $\leq 10^3$
• No two start events and two end events will happen at the same timestamp.
• Each function has an end log entry for each start log entry.

## Examples

Each function is identified in the logs by a function id. Each log entry is formatted in the following way:

{function id}:{"start" | "end"}:{timestamp}