Computer Science, asked by bhimavarapupavan888, 4 months ago

new year is shortly arriving and the students of st. philips code

Answers

Answered by amardeeppsingh176
0

Answer:

Explanation:

Disclaimer:

Write a Computer programme.

New Year is shortly arriving and the students of St. Philip's College of Business are eager to receive the freshers for the coming year. The Welcome party for the freshers is going to be organized in a week's time and in connection to that the College Management has ordered the students to renovate their class room block. The block has N rooms in it numbered from 1 to N. Each room is currently painted in one of the red, blue or green colors. Students are given configuration of colors of their class room block by an array consisting of N values. In this array, color red will be denoted by ' 1 ', green by ' 2 ' and blue by ' 3 '.

Solution:

The process of creating instructions for computers to follow is known as computer programming. The code, sometimes referred to as the instructions, is written in a programming language that the computer can comprehend and use to carry out a task or address an issue.

Here i have written the code in python language.

Python is frequently used for creating websites and applications, automating repetitive tasks, and analysing and displaying data. Since Python is fairly easy to learn, many non-programmers, such as accountants and scientists, have utilised it for a range of mundane tasks, including managing funds.

Code:

n=int(input())

l=list(map(int,input().split()))

max=0

num=l[0]

for i in l:

   freq=l.count(i)

   if freq>max:

       max=freq

       num=i

x=l.count(num)

y=n-x

print(y)

Output :

#SPJ2

Attachments:
Similar questions