結果

問題 No.549 素材合成システム
ユーザー bluemeganebluemegane
提出日時 2018-09-11 16:23:26
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 481 bytes
コンパイル時間 3,922 ms
コンパイル使用メモリ 103,284 KB
実行使用メモリ 28,580 KB
最終ジャッジ日時 2023-09-05 20:58:25
合計ジャッジ時間 8,211 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
20,684 KB
testcase_01 AC 58 ms
20,636 KB
testcase_02 AC 58 ms
22,680 KB
testcase_03 AC 57 ms
20,680 KB
testcase_04 AC 57 ms
20,820 KB
testcase_05 AC 56 ms
20,796 KB
testcase_06 AC 57 ms
22,896 KB
testcase_07 AC 90 ms
26,488 KB
testcase_08 AC 91 ms
28,524 KB
testcase_09 AC 91 ms
28,520 KB
testcase_10 AC 91 ms
26,484 KB
testcase_11 AC 90 ms
24,420 KB
testcase_12 AC 92 ms
28,580 KB
testcase_13 AC 91 ms
26,632 KB
testcase_14 AC 91 ms
26,488 KB
testcase_15 AC 92 ms
26,624 KB
testcase_16 AC 91 ms
26,580 KB
testcase_17 AC 85 ms
27,388 KB
testcase_18 AC 82 ms
22,872 KB
testcase_19 AC 84 ms
23,320 KB
testcase_20 AC 84 ms
25,184 KB
testcase_21 AC 89 ms
26,564 KB
testcase_22 AC 88 ms
26,616 KB
testcase_23 AC 92 ms
26,912 KB
testcase_24 AC 89 ms
26,196 KB
testcase_25 AC 86 ms
25,972 KB
testcase_26 AC 91 ms
26,360 KB
testcase_27 AC 87 ms
25,900 KB
testcase_28 AC 57 ms
20,804 KB
testcase_29 AC 57 ms
20,672 KB
testcase_30 AC 56 ms
20,628 KB
testcase_31 AC 86 ms
27,356 KB
testcase_32 AC 85 ms
23,380 KB
testcase_33 AC 84 ms
27,396 KB
testcase_34 AC 85 ms
25,424 KB
testcase_35 AC 92 ms
26,920 KB
testcase_36 AC 85 ms
27,336 KB
testcase_37 AC 85 ms
25,364 KB
testcase_38 AC 56 ms
22,724 KB
testcase_39 AC 56 ms
20,756 KB
testcase_40 AC 79 ms
24,744 KB
testcase_41 AC 70 ms
21,832 KB
testcase_42 AC 64 ms
20,872 KB
testcase_43 AC 70 ms
21,724 KB
testcase_44 AC 67 ms
21,272 KB
testcase_45 AC 73 ms
23,824 KB
testcase_46 AC 69 ms
19,580 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        var bsum = 0;
        var ans = 0;
        for (int i = 0; i < n; i++)
        {
            var b = a[i] / 2;
            ans = Math.Max(ans, a[i] - b);
            bsum += b;
        }
        Console.WriteLine(ans + bsum);
    }
}
0