結果
問題 |
No.79 過小評価ダメ・ゼッタイ
|
ユーザー |
|
提出日時 | 2017-10-14 03:58:04 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 413 bytes |
コンパイル時間 | 424 ms |
コンパイル使用メモリ | 58,444 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-17 12:49:03 |
合計ジャッジ時間 | 4,415 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 RE * 1 |
other | WA * 3 RE * 19 |
ソースコード
#include <iostream> #include <cmath> using namespace std; int main(){ int N; cin >> N; int answers[6]; for(int i = 0; i < 6; i++){ answers[i] = 0; } for(int i = 0; i < N; i++){ int level; cin >> level; answers[level + 1]++; } int max = answers[0]; int max_num = 1; for(int i = 1; i < 6; i++){ if(max <= answers[i]){ max = answers[i]; max_num = i + 1; } } cout << max_num << endl; }