結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2015-08-05 12:53:21 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 5,000 ms |
| コード長 | 163 bytes |
| コンパイル時間 | 401 ms |
| コンパイル使用メモリ | 20,992 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 07:39:45 |
| 合計ジャッジ時間 | 1,681 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4 | scanf("%d",&n);
| ^~~~~~~~~~~~~~
main.c:5:12: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | while(n--){scanf("%d",&i);l[i]++;}
| ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int l[7]={},n,i;
scanf("%d",&n);
while(n--){scanf("%d",&i);l[i]++;}
i=0;n=7;
while(n--)l[n]>l[i]&&(i=n);
printf("%d",i);
return 0;
}
testestest