Skip to content

Commit

Permalink
[3주차] : 김예경 - 5883 아이폰 9S Silver4 (CBNU-Nnet#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
vss121 committed Jul 17, 2022
1 parent 66f4b40 commit 4750c9c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions 김예경/5883 아이폰 9S.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
n=int(input())
a=list()
for _ in range(n):
a.append(int(input()))
a_set = set(a)

res=0
for x in a_set:
cnt=1
prev=a[0]
for i in range(1,n):
if x==a[i]:
continue
if prev==a[i]:
cnt+=1
else:
prev=a[i]
cnt=1

if cnt>res:
res=cnt

print(res)

0 comments on commit 4750c9c

Please sign in to comment.