Skip to content

sdaryan/Counting_votes_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

python

Mr. Gjoubin Artabaz is the head of the United Nations organization and is going to conduct a voting regarding the election of the executive board. Dadmehr Jamshidi, who is responsible for the computers at the United Nations, has written a program that counts how many votes each country has received. You are supposed to help Dadmehr by writing a program to count the votes.

The first input line contains an integer n, which represents the total number of votes. Each of the following n lines contains the name of a country. The names of the countries are made up of lowercase English letters.


آقای ژوبین آرتاباز رئیس سازمان ملل متحد هست و قراره راجع به انتخاب هیئت رئیسه یک رای گیری انجام بده! دادمهر جمشیدی که مسئول کامپیوتر سازمان ملل هست برنامه ای نوشته که می شمره هر کشور چند رائ رو کسب کرده. شما قراره با نوشتن برنامه ای به دادمهر کمک کنید تا آراء رو شمارش کنه.

خط اول ورودی شامل عدد n هست که تعداد کل آراء رو نمایش میده. هر یک از n خط بعدی شامل اسم یک کشور می باشد. اسم کشورها از حروف کوچک انگلیسی ساخته شده اند.

در خروجی m خط چاپ کنید که شامل تعداد آراء هر یک از کشورها می باشد. نام کشورها را به ترتیب الفبا در خروجی بنویسید. برای اطلاعات بیشتر به ورودی نمونه و خروجی نمونه مراجعه کنید.