結果

問題 No.549 素材合成システム
ユーザー greentea011
提出日時 2019-03-28 14:50:32
言語 C
(gcc 13.3.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 250 bytes
コンパイル時間 1,398 ms
コンパイル使用メモリ 27,776 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-12 22:02:20
合計ジャッジ時間 1,815 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 20 WA * 24
権限があれば一括ダウンロードができます

ソースコード

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