結果
| 問題 | No.191 供託金 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-06-07 17:54:31 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 238 bytes |
| 記録 | |
| コンパイル時間 | 145 ms |
| コンパイル使用メモリ | 30,144 KB |
| 最終ジャッジ日時 | 2026-02-23 18:32:44 |
|
ジャッジサーバー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);
}