結果
| 問題 |
No.191 供託金
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-06-07 17:54:31 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 238 bytes |
| コンパイル時間 | 348 ms |
| コンパイル使用メモリ | 20,864 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-07 16:04:10 |
| 合計ジャッジ時間 | 944 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
コンパイルメッセージ
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", &v);
| ^~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
int n, v, vote = 0, cnt = 0, i;
int c[100];
scanf("%d", &n);
for(i=0; i<n; i++){
scanf("%d", &v);
c[i] = v;
vote += v;
}
vote /= 10;
while(n--) if(c[n] <= vote) cnt++;
printf("%d\n", cnt*30);
}