結果

問題 No.91 赤、緑、青の石
ユーザー NoNo
提出日時 2015-06-11 18:46:21
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 455 ms / 5,000 ms
コード長 1,124 bytes
コンパイル時間 2,228 ms
コンパイル使用メモリ 104,464 KB
実行使用メモリ 27,748 KB
最終ジャッジ日時 2023-09-06 12:12:46
合計ジャッジ時間 9,152 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 333 ms
25,508 KB
testcase_01 AC 240 ms
25,680 KB
testcase_02 AC 174 ms
27,580 KB
testcase_03 AC 267 ms
25,652 KB
testcase_04 AC 156 ms
23,540 KB
testcase_05 AC 303 ms
23,560 KB
testcase_06 AC 126 ms
23,652 KB
testcase_07 AC 59 ms
21,680 KB
testcase_08 AC 58 ms
21,560 KB
testcase_09 AC 59 ms
19,508 KB
testcase_10 AC 56 ms
21,500 KB
testcase_11 AC 126 ms
27,748 KB
testcase_12 AC 286 ms
27,636 KB
testcase_13 AC 342 ms
27,568 KB
testcase_14 AC 246 ms
25,584 KB
testcase_15 AC 352 ms
23,712 KB
testcase_16 AC 60 ms
23,416 KB
testcase_17 AC 58 ms
23,540 KB
testcase_18 AC 58 ms
21,484 KB
testcase_19 AC 57 ms
21,484 KB
testcase_20 AC 55 ms
21,536 KB
testcase_21 AC 58 ms
21,436 KB
testcase_22 AC 58 ms
21,368 KB
testcase_23 AC 56 ms
23,424 KB
testcase_24 AC 59 ms
21,568 KB
testcase_25 AC 455 ms
25,592 KB
testcase_26 AC 426 ms
23,644 KB
testcase_27 AC 57 ms
21,444 KB
testcase_28 AC 92 ms
25,588 KB
testcase_29 AC 127 ms
25,516 KB
testcase_30 AC 326 ms
25,644 KB
testcase_31 AC 436 ms
23,560 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 foryuki
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] c = ConvertStringArrayToIntArray(Console.ReadLine().Split());
            Array.Sort(c);

            while (c[2] - c[0] > 2)
            {
                c[2] -= 2;
                c[0] += 1;
                Array.Sort(c);
            }
            Console.WriteLine(c.Min());
        }

        //-------------------------------------------------------------

        static int[] ConvertStringArrayToIntArray(string[] str)
        {
            int[] b = Array.ConvertAll<string, int>(str, delegate(string value)
                {
                    return int.Parse(value);
                });
            return b;
        }

        static List<int> ConvertStringArrayToIntList(string[] str)
        {
            var list = new List<int>();
            foreach (var c in str)
            {
                list.Add(int.Parse(c));
            }
            return list;
        }
    }
}
0