結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-17 16:12:05 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 5,000 ms |
| コード長 | 289 bytes |
| コンパイル時間 | 128 ms |
| コンパイル使用メモリ | 20,992 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 08:14:26 |
| 合計ジャッジ時間 | 1,042 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%ld", &n);
| ^~~~~~~~~~~~~~~~
main.c:9:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%hd", &l);
| ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void){
long n, level[6] = {};
short l;
char i;
scanf("%ld", &n);
for(; n > 0; n--){
scanf("%hd", &l);
level[l - 1]++;
}
l = 0;
for(i = 1; i < 6; i++){
if(level[l] <= level[i])
l = i;
}
printf("%hd\n", l + 1);
return 0;
}