結果

問題 No.549 素材合成システム
ユーザー bluemeganebluemegane
提出日時 2018-09-11 16:35:25
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 4,135 ms
コンパイル使用メモリ 102,168 KB
実行使用メモリ 28,856 KB
最終ジャッジ日時 2023-09-05 21:13:29
合計ジャッジ時間 8,684 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
20,656 KB
testcase_01 AC 60 ms
22,736 KB
testcase_02 AC 61 ms
22,756 KB
testcase_03 AC 61 ms
20,720 KB
testcase_04 AC 60 ms
20,680 KB
testcase_05 AC 59 ms
20,864 KB
testcase_06 AC 60 ms
20,776 KB
testcase_07 AC 118 ms
26,620 KB
testcase_08 AC 117 ms
26,508 KB
testcase_09 AC 118 ms
26,440 KB
testcase_10 AC 117 ms
26,512 KB
testcase_11 AC 118 ms
26,532 KB
testcase_12 AC 118 ms
24,556 KB
testcase_13 AC 118 ms
28,540 KB
testcase_14 AC 117 ms
26,720 KB
testcase_15 AC 118 ms
26,624 KB
testcase_16 AC 117 ms
26,424 KB
testcase_17 AC 101 ms
27,380 KB
testcase_18 AC 94 ms
20,932 KB
testcase_19 AC 100 ms
25,188 KB
testcase_20 AC 100 ms
25,152 KB
testcase_21 AC 104 ms
26,688 KB
testcase_22 AC 104 ms
26,368 KB
testcase_23 AC 108 ms
28,856 KB
testcase_24 AC 115 ms
26,200 KB
testcase_25 AC 110 ms
26,056 KB
testcase_26 AC 117 ms
26,456 KB
testcase_27 AC 110 ms
25,860 KB
testcase_28 AC 60 ms
20,664 KB
testcase_29 AC 60 ms
20,720 KB
testcase_30 AC 59 ms
20,824 KB
testcase_31 AC 101 ms
25,456 KB
testcase_32 AC 101 ms
25,476 KB
testcase_33 AC 100 ms
25,376 KB
testcase_34 AC 102 ms
25,332 KB
testcase_35 AC 109 ms
28,848 KB
testcase_36 AC 101 ms
23,528 KB
testcase_37 AC 103 ms
27,324 KB
testcase_38 AC 60 ms
20,612 KB
testcase_39 AC 60 ms
20,736 KB
testcase_40 AC 98 ms
24,712 KB
testcase_41 AC 80 ms
23,752 KB
testcase_42 AC 70 ms
20,752 KB
testcase_43 AC 79 ms
21,664 KB
testcase_44 AC 71 ms
21,324 KB
testcase_45 AC 81 ms
21,896 KB
testcase_46 AC 76 ms
21,444 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);
        Array.Sort(a);
        var sum = 0;
        for (int i = 0; i < n - 1; i++) sum += a[i] / 2;
        Console.WriteLine(sum + a[n-1]);
    }
}
0