結果
問題 |
No.191 供託金
|
ユーザー |
![]() |
提出日時 | 2023-06-30 11:42:56 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 149 ms |
コンパイル使用メモリ | 29,056 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-07 00:06:18 |
合計ジャッジ時間 | 811 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | WA * 23 |
ソースコード
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include <string.h> int main() { int n = 0; int persons[100] = { -1 }; int cnt = 0; int maney = 0; for (int i = 0;i < n;i++) { scanf("%d", &persons[i]); cnt += persons[i]; } cnt /= 10; for (int i = 0;i < n;i++) { if (persons[i] <= cnt) { maney += 30; } } printf("%d\n", maney); return 0; }