結果

問題 No.268 ラッピング(Easy)
ユーザー NoNo
提出日時 2015-11-04 17:10:02
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 861 bytes
コンパイル時間 2,027 ms
コンパイル使用メモリ 103,636 KB
実行使用メモリ 22,844 KB
最終ジャッジ日時 2023-10-11 13:41:55
合計ジャッジ時間 3,624 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
20,868 KB
testcase_01 AC 58 ms
20,668 KB
testcase_02 AC 57 ms
20,620 KB
testcase_03 AC 58 ms
20,872 KB
testcase_04 AC 58 ms
22,844 KB
testcase_05 AC 58 ms
18,672 KB
testcase_06 AC 59 ms
20,800 KB
testcase_07 AC 59 ms
20,856 KB
testcase_08 AC 59 ms
20,840 KB
testcase_09 AC 59 ms
20,800 KB
testcase_10 AC 58 ms
22,664 KB
testcase_11 AC 58 ms
20,688 KB
testcase_12 AC 58 ms
20,672 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ForYukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] a = Console.ReadLine().Split();
            int w = int.Parse(a[0]);
            int h = int.Parse(a[1]);
            int d = int.Parse(a[2]);

            int[] box = { (h + d) * 2, (w + h) * 2, (w + d) * 2 };
            var C = ConvertStringArrayToIntArray(Console.ReadLine().Split());

            Array.Sort(box);
            Array.Sort(C);

            int sum = box[2] * C[0] + box[1] * C[1] + box[0] * C[2];

            Console.WriteLine(sum);
        }

        static int[] ConvertStringArrayToIntArray(string[] array)
        {
            return Array.ConvertAll(array, str => int.Parse(str));
        }
    }
}
0