Description
题目描述:
已知有N个整数,求最长数连续相等的数的个数。
输入:
第一行有一个正整数N,它的范围是[1..10000]。
第二行有N个正整数,它的范围是[1..100]。
输出:
最长数连续相等的数的个数.
输入样例1
7
1 1 1 5 2 1 1
输出样例1
3
HINT
n=int(input())
a=map(int,input().split())
a=list(a)
a.sort()
a.append(-1)
pre=a[0];
cnt=0;
##print(a)
for i in a:
if i!=pre:
print(pre,cnt)
cnt=0
pre=i
cnt+=1;