Every now and then people in the office moves teams or departments. Depending what people are doing with their time they can become more or less boring. Time to assess the current team.

```if-not:java
You will be provided with an object(staff) containing the staff names as keys, and the department they work in as values.
```

```if:java
You will be provided with an array of `Person` objects with each instance containing the name and department for a staff member.
~~~java
public class Person {
  public final String name;        // name of the staff member
  public final String department;  // department they work in
}
~~~
```

Each department has a different boredom assessment score, as follows:

accounts = 1
finance = 2 
canteen = 10 
regulation = 3 
trading = 6 
change = 6
IS = 8
retail = 5 
cleaning = 4
pissing about = 25

Depending on the cumulative score of the team, return the appropriate sentiment:

<=80: 'kill me now'
< 100 & > 80: 'i can handle this'
100 or over: 'party time!!'

The Office I - Outed
The Office III - Broken Photocopier
The Office IV - Find a Meeting Room
The Office V - Find a Chair

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Data structures

Starter code: def boredom(staff):
	

Solutions:
def boredom(staff):
	lookup = {'accounts': 1, 'finance': 2, 'canteen': 10, 'regulation': 3, 'trading': 6, 'change': 6, 'IS': 8, 'retail': 5, 'cleaning': 4, 'pissing about': 25}
	n = sum((lookup[s] for s in staff.values()))
	if n <= 80:
		return 'kill me now'
	if n < 100:
		return 'i can handle this'
	return 'party time!!'


boredom_scores = {'accounts': 1, 'finance': 2, 'canteen': 10, 'regulation': 3, 'trading': 6, 'change': 6, 'IS': 8, 'retail': 5, 'cleaning': 4, 'pissing about': 25}

def boredom(staff):
	score = sum(map(boredom_scores.get, staff.values()))
	return 'kill me now' if score <= 80 else 'i can handle this' if score < 100 else 'party time!!'


SCORE = {'accounts': 1, 'finance': 2, 'canteen': 10, 'regulation': 3, 'trading': 6, 'change': 6, 'IS': 8, 'retail': 5, 'cleaning': 4, 'pissing about': 25}

def boredom(staff):
	score = sum(map(lambda x: SCORE[x], staff.values()))
	return ('kill me now', 'i can handle this', 'party time!!')[(score >= 100) + (score > 80)]


boredom = lambda s: ['kill me now', 'i can handle this', 'party time!!'][min(2, max(0, __import__('math').ceil(sum(((' tconig I e' + ' ' * 14 + 'u').index(e.replace('din', 'g')[-2]) for e in s.values())) / 20 - 4)))]


def boredom(staff):
	D = {'accounts': 1, 'finance': 2, 'canteen': 10, 'regulation': 3, 'trading': 6, 'change': 6, 'IS': 8, 'retail': 5, 'cleaning': 4, 'pissing about': 25}
	score = sum([D[key] for key in list(staff.values())])
	if score <= 80:
		ans = 'kill me now'
	elif 80 < score < 100:
		ans = 'i can handle this'
	elif score >= 100:
		ans = 'party time!!'
	return ans