結果
問題 |
No.79 過小評価ダメ・ゼッタイ
|
ユーザー |
👑 ![]() |
提出日時 | 2015-08-05 12:43:33 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 193 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 21,248 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-18 01:22:53 |
合計ジャッジ時間 | 1,155 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 16 WA * 6 |
コンパイルメッセージ
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:11: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | while(n--)scanf("%d",a+n); | ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(){ int a[100000]={},l[7]={},n; scanf("%d",&n); while(n--)scanf("%d",a+n); while(a[++n])l[a[n]]++; *a=1;n=7;while(n--)l[n]>l[*a]&&(*a=n); printf("%d",*a); return 0; }