杜牧恒


私信TA

用户名:dotcpp0687248

访问量:5179

签 名:

解把飞花蒙日月,不知天地有清霜

等  级
排  名 357
经  验 5236
参赛次数 15
文章发表 169
年  龄 99
在职情况 在职
学  校 大庆一中附属第一小学
专  业 你猜

  自我简介:

人类

参考代码:

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const ll N=1e5;

ll tong[N];

int main()

{

    for(int i=1; i<=10; i++)

    {

        ll p;

cin>>p;

tong[p]++; 

    }

    for(int i=1; i<=10; i++)

        cout<<tong[i]<<' ';

    cout<<endl;

    ll maxx=0,pos;

    for(int i=1; i<=10; i++)

    {

        if(tong[i]>maxx)

        {

            maxx=tong[i];

            pos=i;

        }

    }

    cout<<pos;

    return 0;

}


 

0.0分

0 人评分

  评论区

  • «
  • »