結果
| 問題 | No.191 供託金 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-20 23:15:38 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 356 bytes |
| 記録 | |
| コンパイル時間 | 196 ms |
| コンパイル使用メモリ | 21,540 KB |
| 最終ジャッジ日時 | 2026-01-11 21:04:44 |
| 合計ジャッジ時間 | 1,036 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c: In function ‘main’:
main.c:4:9: error: C++ style comments are not allowed in ISO C90
4 | // your code goes here
| ^
main.c:4:9: note: (this will be reported only once per input file)
main.c:6:9: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | fscanf(stdin, "%d", &n);
| ^~~~~~~~~~~~~~~~~~~~~~~
main.c:8:17: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | fscanf(stdin, "%d", &c[i]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void) {
// your code goes here
int n, c[100], i, total = 0, count = 0;
fscanf(stdin, "%d", &n);
for(i = 0; i < n; i++)
fscanf(stdin, "%d", &c[i]);
for(i = 0; i < n; i++)
total += c[i];
total = total / 10;
for(i = 0; i < n; i++){
if(c[i] <= total)
count++;
}
printf("%d\n", count * 30);
return 0;
}