Професионална програма
+ Нов въпрос
galina777 avatar galina777 8 Точки

Не минава последният тест на една изпитна задача. Който може, да помага - на JS

https://pastebin.com/uKLFtcht, 90/100



Create a program that keeps information about Pesho's followers, likes and comments. Keep a record of the followers, each with the likes and comments Pesho has received from them.

You will be receiving lines with commands until you receive the "Log out" command.  There are four possible commands:

  • "New follower: {username}":
    • the username, to your records (with 0 likes and 0 comments). If person with the given username already exists ignore the line.
  • "Like: {username}: {count}":
    • If the username doesn't exist, add it to your records with the given count of likes.
    • If the username exist, increase the count of likes with the given count.
  • "Comment: {username}":
    • If the username doesn't exist, add it to your records with 1 comment.
    • If the username exists, increase the count of commens with 1.
  • "Blocked: {username}":
    • Delete all records of the given username. If it doesn’t exist, print:

 "{Username} doesn't exist."


In the end, you have to print the count of followers, each follower with his/her likes and comments (the sum of likes and comments) sorted in descending order by the likes and then by their username in ascending order in the following format: 

{count} followers

{username}: {likes+comments}

{username}: {likes+comments}



  • You will be receiving lines until you receive the "Log out" command.
  • The input will always be valid.


  • Print the users with their likes in the format described above.




New follower: gosho

Like: gosho: 5

Comment: gosho

New follower: gosho

New follower: tosho

Comment: gosho

Comment: tosho

Comment: pesho

Log out


gosho: 7

pesho: 1

tosho: 1



Like: A: 3

Comment: A

New follower: B

Blocked: A

Comment: B

Like: C: 5

Like: D: 5

Log out


C: 5

D: 5

B: 1




Fundamentals Module
galina777 avatar galina777 8 Точки

Да, точно така е. Благодаря.

xoqud avatar xoqud 0 Точки

A detail of the answers given for the approval of the matchless items for the citizens. Improvement of the stance and best essay writing service review is grouped for the shows. The fund is financed for the mid of the offered target for the team for the sows for humans.

EmilyKing avatar EmilyKing -2 Точки

We also have a specific type of essay writing service to help clients write essays on specific topics, in a specific manner and with a specific level of detail. This is easy to do with the help of a teacher who understands the client's requirements and the writing process order paper online. If you are looking for a tutor or essay writer to help you write an academic essay, you can contact the service provider's company website.