結果
問題 | No.191 供託金 |
ユーザー |
![]() |
提出日時 | 2023-06-30 11:43:30 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 421 bytes |
コンパイル時間 | 257 ms |
コンパイル使用メモリ | 31,232 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-07 00:07:00 |
合計ジャッジ時間 | 1,227 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 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;scanf("%d", &n);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;}