結果

問題 No.549 素材合成システム
ユーザー bluemeganebluemegane
提出日時 2018-09-11 16:20:01
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 96 ms / 2,000 ms
コード長 514 bytes
コンパイル時間 3,509 ms
コンパイル使用メモリ 101,596 KB
実行使用メモリ 28,984 KB
最終ジャッジ日時 2023-09-05 20:52:32
合計ジャッジ時間 9,191 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
22,748 KB
testcase_01 AC 58 ms
20,620 KB
testcase_02 AC 57 ms
20,712 KB
testcase_03 AC 58 ms
20,644 KB
testcase_04 AC 60 ms
20,652 KB
testcase_05 AC 58 ms
22,696 KB
testcase_06 AC 58 ms
22,744 KB
testcase_07 AC 92 ms
26,780 KB
testcase_08 AC 92 ms
28,868 KB
testcase_09 AC 94 ms
26,792 KB
testcase_10 AC 93 ms
26,904 KB
testcase_11 AC 92 ms
27,032 KB
testcase_12 AC 92 ms
24,792 KB
testcase_13 AC 96 ms
26,796 KB
testcase_14 AC 94 ms
28,984 KB
testcase_15 AC 93 ms
26,904 KB
testcase_16 AC 93 ms
26,760 KB
testcase_17 AC 86 ms
25,728 KB
testcase_18 AC 82 ms
23,236 KB
testcase_19 AC 88 ms
25,596 KB
testcase_20 AC 85 ms
27,580 KB
testcase_21 AC 91 ms
26,924 KB
testcase_22 AC 92 ms
28,792 KB
testcase_23 AC 94 ms
27,344 KB
testcase_24 AC 92 ms
26,544 KB
testcase_25 AC 89 ms
26,228 KB
testcase_26 AC 91 ms
26,740 KB
testcase_27 AC 88 ms
26,260 KB
testcase_28 AC 59 ms
20,576 KB
testcase_29 AC 60 ms
22,820 KB
testcase_30 AC 58 ms
20,676 KB
testcase_31 AC 88 ms
27,676 KB
testcase_32 AC 87 ms
25,624 KB
testcase_33 AC 89 ms
25,860 KB
testcase_34 AC 88 ms
25,692 KB
testcase_35 AC 94 ms
27,268 KB
testcase_36 AC 86 ms
27,720 KB
testcase_37 AC 86 ms
25,724 KB
testcase_38 AC 57 ms
20,708 KB
testcase_39 AC 59 ms
22,740 KB
testcase_40 AC 82 ms
22,916 KB
testcase_41 AC 73 ms
21,852 KB
testcase_42 AC 66 ms
20,776 KB
testcase_43 AC 74 ms
21,636 KB
testcase_44 AC 69 ms
23,136 KB
testcase_45 AC 75 ms
21,688 KB
testcase_46 AC 71 ms
21,820 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 b = new int[n];
        var bsum = 0;
        var ans = 0;
        for (int i = 0; i < n; i++)
        {
            b[i] = a[i] / 2;
            ans = Math.Max(ans, a[i] - b[i]);
            bsum += b[i];
        }
        Console.WriteLine(ans + bsum);
    }
}
0