結果
問題 | No.191 供託金 |
ユーザー |
|
提出日時 | 2015-06-07 17:55:36 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 249 bytes |
コンパイル時間 | 363 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-16 20:39:09 |
合計ジャッジ時間 | 1,167 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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); return 0; }