結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー kroton
提出日時 2014-11-27 23:46:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 582 ms
コンパイル使用メモリ 57,724 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2025-01-03 09:34:24
合計ジャッジ時間 1,693 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 16 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int cnt[10];
int main(){
	int N;
	cin >> N;

	for(int i=0;i<N;i++){
		int L;
		cin >> L;

		cnt[L]++;
	}

	int maxi = 0;
	for(int i=1;i<=6;i++)maxi = max(maxi, cnt[i]);
	for(int i=1;i<=6;i++)if(maxi == cnt[i]){
		cout << i << endl;
		break;
	}
	
	return 0;
}
0