結果

問題 No.549 素材合成システム
ユーザー greentea011greentea011
提出日時 2019-03-28 14:50:32
言語 C
(gcc 12.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 250 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 28,672 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-20 23:45:00
合計ジャッジ時間 2,060 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 1 ms
5,376 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 10 ms
5,376 KB
testcase_09 AC 12 ms
5,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 11 ms
5,376 KB
testcase_14 WA -
testcase_15 AC 12 ms
5,376 KB
testcase_16 AC 11 ms
5,376 KB
testcase_17 AC 9 ms
5,376 KB
testcase_18 AC 8 ms
5,376 KB
testcase_19 WA -
testcase_20 AC 9 ms
5,376 KB
testcase_21 AC 11 ms
5,376 KB
testcase_22 AC 10 ms
5,376 KB
testcase_23 AC 13 ms
5,376 KB
testcase_24 AC 10 ms
5,376 KB
testcase_25 AC 8 ms
5,376 KB
testcase_26 AC 11 ms
5,376 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 9 ms
5,376 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 10 ms
5,376 KB
testcase_35 AC 12 ms
5,376 KB
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 1 ms
5,376 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 AC 4 ms
5,376 KB
testcase_44 AC 2 ms
5,376 KB
testcase_45 AC 4 ms
5,376 KB
testcase_46 AC 4 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(){
    int n;
    int ans;
    int max;
    int c;
    scanf("%d",&n);
    for (int i=0;i<n;i++) {
        scanf("%d",&c);
        max=(c>max)?c:max;
        ans+=c/2;
    }
    ans+=max/2+max%2;
    printf("%d\n",ans);
}
0