結果

問題 No.191 供託金
ユーザー funakoshi
提出日時 2019-08-19 11:44:19
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 445 bytes
コンパイル時間 889 ms
コンパイル使用メモリ 28,928 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-03 03:27:31
合計ジャッジ時間 1,347 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
int main(void)
{
    int candidate=0,deposit=0,totalvote=0;
    int vote[150]={0};
    scanf("%d",&candidate);
    for(int i=0;i<candidate;i++)
    {
        scanf("%d",&vote[i]);
        totalvote+=vote[i];
    }
    for(int i=0;i<candidate;i++)
    {
        if(vote[i]<=totalvote/10)
        {
            deposit+=30;
        }
    }
    printf("%d",deposit);
}
0