結果

問題 No.268 ラッピング(Easy)
ユーザー nuwasoginuwasogi
提出日時 2015-11-30 12:37:25
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 63 ms / 5,000 ms
コード長 1,356 bytes
コンパイル時間 2,534 ms
コンパイル使用メモリ 107,284 KB
実行使用メモリ 24,024 KB
最終ジャッジ日時 2023-10-12 05:57:48
合計ジャッジ時間 3,825 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
21,804 KB
testcase_01 AC 60 ms
21,800 KB
testcase_02 AC 61 ms
21,820 KB
testcase_03 AC 61 ms
21,812 KB
testcase_04 AC 62 ms
21,828 KB
testcase_05 AC 60 ms
21,884 KB
testcase_06 AC 61 ms
23,912 KB
testcase_07 AC 63 ms
23,932 KB
testcase_08 AC 62 ms
22,008 KB
testcase_09 AC 61 ms
23,852 KB
testcase_10 AC 62 ms
24,024 KB
testcase_11 AC 61 ms
21,848 KB
testcase_12 AC 61 ms
23,944 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.Linq;

namespace WrappingEasy_CS
{
    class Program
    {
        static void Main(string[] args)
        {
            
            Solver sol = new Solver();
            sol.Solve();
        }
    }

    class Solver
    {
        int[] L, C;

        public void Solve()
        {

            int min = 0;
            for(int i=0; i<3; i++) min += L[2 - i] * C[i];
            Console.WriteLine(min);
        }

        public Solver()
        {
            int[] tL = ria();
            L = new int[] { 2 * (tL[0] + tL[1]), 2 * (tL[0] + tL[2]), 2 * (tL[1] + tL[2]) };
            C = ria();
            Array.Sort(L);
            Array.Sort(C);
        }

        static String rs() { return Console.ReadLine(); }
        static int ri() { return int.Parse(Console.ReadLine()); }
        static long rl() { return long.Parse(Console.ReadLine()); }
        static double rd() { return double.Parse(Console.ReadLine()); }
        static String[] rsa() { return Console.ReadLine().Split(' '); }
        static int[] ria() { return Console.ReadLine().Split(' ').Select(e => int.Parse(e)).ToArray(); }
        static long[] rla() { return Console.ReadLine().Split(' ').Select(e => long.Parse(e)).ToArray(); }
        static double[] rda() { return Console.ReadLine().Split(' ').Select(e => double.Parse(e)).ToArray(); }
    }
}
0