結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2015-06-01 09:13:15 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 239 bytes |
| コンパイル時間 | 788 ms |
| コンパイル使用メモリ | 20,352 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-06 13:07:50 |
| 合計ジャッジ時間 | 1,558 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 20 WA * 2 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d", &N);
| ^~~~~~~~~~~~~~~
main.c:7:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | scanf("%d", &l);
| ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
int i, N, max = 0, l, lmax, L[7] = {0};
scanf("%d", &N);
for(i = 1;i <= N;i++){
scanf("%d", &l);
L[l]++;
if(L[l] > max){
max = L[l];
lmax = l;
}
}
printf("%d\n", lmax);
return 0;
}
suppy193