For those not familiar with steam - or at least this particular aspect:
Often on peoples' profiles, people leave comments saying either "+rep _____" or "-rep _____". These are an unofficial means of showing whether you think someone in the community has a good or a bad reputation, for a number of reasons. Such comments look like:
+rep a good player
The program must take input through any consensual way. The input consists of a string with optional newlines (
\n). At the very start of each line,
'+rep ' or
'-rep ' might be present. The rest of the line can be discarded. If the line doesn't start with
'+rep ' or
'-rep ' (note the trailing space), the line should be ignored.
The program then must keep a total reputation score. Starting at
0, this score should be incremented on every line that starts with
'+rep ' and decremented on every line that starts with
This result should be output in any agreed-upon way.
Input: +rep fast trade +rep nice person -rep too good Output: 1 Input: -rep hacker -rep scammer -rep was mean Output: -3 Input: first i don't like him +rep good at cs go Output: 1 Input (note the lack of a trailing space on the third line): +rep +rep hi +rep -rep Output: 1 Input: + rep Output: 0 Input: +rep like -thing Output: 1
I don't even know if it's possible, but bonus points if you can somehow get these comments from Steam.