- Problem Statement.
- A
**main()**with the examples compiled in. - A skeleton that compiles with
**main.cpp**. -
**Problem Given in Topcoder**: October, 2016 -
**Competitors who opened the problem**: 287 -
**Competitors who submitted a solution**: 281 -
**Number of correct solutions**: 212 -
**Accuracy (percentage correct vs those who opened)**: 73.87 -
**Average Correct Time**: 8 minutes, 47 seconds.

Each key on the Xylophone maps to one of seven notes. You don't care what the notes are. You just want to know which distinct notes are played. So, take each key played, and calculate its value mod 7. That value will be different for each note (For example, if you play an A, and then a B, they first key mod 7 will not equal the second key mod 7. However, if you play two A's, even on different keys, then their values mod 7 will be the same).

So what you want to do is count the number of distinct values there are when you take each key mod 7. There are two straightforward ways to do this:

- Have a vector whose size is seven. Set a vector's entry to one, whenever the key mod 7 equals the entry's index. Then sum the vector's entries.
- Have a set of integers, and insert each (key mod 7) into the set. Since you cannot insert duplicates into sets, at the end, the size of the set will be your answer.