結果

問題 No.549 素材合成システム
ユーザー 14番14番
提出日時 2017-07-28 22:39:18
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 1,042 bytes
コンパイル時間 4,113 ms
コンパイル使用メモリ 114,628 KB
実行使用メモリ 35,952 KB
最終ジャッジ日時 2024-04-18 09:55:01
合計ジャッジ時間 6,094 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
25,356 KB
testcase_01 AC 32 ms
25,064 KB
testcase_02 AC 30 ms
25,140 KB
testcase_03 AC 31 ms
27,236 KB
testcase_04 AC 31 ms
26,984 KB
testcase_05 AC 32 ms
25,068 KB
testcase_06 AC 30 ms
27,264 KB
testcase_07 AC 104 ms
33,268 KB
testcase_08 AC 107 ms
35,192 KB
testcase_09 AC 106 ms
33,144 KB
testcase_10 AC 103 ms
33,264 KB
testcase_11 AC 104 ms
35,316 KB
testcase_12 AC 101 ms
33,272 KB
testcase_13 AC 109 ms
33,020 KB
testcase_14 AC 110 ms
33,528 KB
testcase_15 AC 107 ms
33,144 KB
testcase_16 AC 103 ms
33,280 KB
testcase_17 AC 78 ms
34,284 KB
testcase_18 AC 71 ms
31,160 KB
testcase_19 AC 77 ms
34,112 KB
testcase_20 AC 74 ms
31,968 KB
testcase_21 AC 77 ms
33,256 KB
testcase_22 AC 78 ms
32,760 KB
testcase_23 AC 84 ms
35,856 KB
testcase_24 AC 98 ms
30,848 KB
testcase_25 AC 93 ms
32,364 KB
testcase_26 AC 108 ms
32,884 KB
testcase_27 AC 93 ms
32,564 KB
testcase_28 AC 31 ms
25,576 KB
testcase_29 AC 31 ms
25,336 KB
testcase_30 AC 30 ms
25,452 KB
testcase_31 AC 78 ms
30,064 KB
testcase_32 AC 78 ms
32,124 KB
testcase_33 AC 77 ms
32,384 KB
testcase_34 AC 80 ms
34,160 KB
testcase_35 AC 103 ms
35,952 KB
testcase_36 AC 89 ms
32,360 KB
testcase_37 AC 93 ms
30,316 KB
testcase_38 AC 35 ms
29,432 KB
testcase_39 AC 32 ms
27,268 KB
testcase_40 AC 80 ms
28,528 KB
testcase_41 AC 54 ms
26,508 KB
testcase_42 AC 35 ms
25,712 KB
testcase_43 AC 52 ms
26,824 KB
testcase_44 AC 38 ms
26,220 KB
testcase_45 AC 54 ms
27,132 KB
testcase_46 AC 47 ms
26,412 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;

public class Program
{

    public void Proc()
    {
        int inputCount = int.Parse(Reader.ReadLine());
        long[] items = Reader.ReadLine().Split(' ').Select(a => long.Parse(a)).OrderByDescending(a => a).ToArray();
        long ans = items[0];
        for (int i = 1; i < items.Length; i++) {
            ans += items[i] / 2;
        }
        Console.WriteLine(ans);
    }


    public class Reader
	{
		private static StringReader sr;
		public static bool IsDebug = false;
		public static string ReadLine()
		{
			if (IsDebug)
			{
				if (sr == null)
				{
					sr = new StringReader(InputText.Trim());
				}
				return sr.ReadLine();
			}
			else
			{
				return Console.ReadLine();
			}
		}
		private static string InputText = @"


16
5 48 74 84 94 13 24 15 92 79 74 89 32 30 5 24


";
	}

	public static void Main(string[] args)
	{
#if DEBUG
		Reader.IsDebug = true;
#endif
		Program prg = new Program();
		prg.Proc();
	}
}
0