結果

問題 No.91 赤、緑、青の石
ユーザー NoNo
提出日時 2015-06-11 18:33:27
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 481 ms / 5,000 ms
コード長 1,127 bytes
コンパイル時間 2,265 ms
コンパイル使用メモリ 106,592 KB
実行使用メモリ 29,680 KB
最終ジャッジ日時 2023-09-06 12:11:55
合計ジャッジ時間 10,172 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 352 ms
27,648 KB
testcase_01 AC 257 ms
27,644 KB
testcase_02 AC 182 ms
27,744 KB
testcase_03 AC 281 ms
25,712 KB
testcase_04 AC 167 ms
27,640 KB
testcase_05 AC 323 ms
25,524 KB
testcase_06 AC 133 ms
23,624 KB
testcase_07 AC 61 ms
21,484 KB
testcase_08 AC 60 ms
21,484 KB
testcase_09 AC 61 ms
21,584 KB
testcase_10 AC 60 ms
21,488 KB
testcase_11 AC 136 ms
23,624 KB
testcase_12 AC 304 ms
29,680 KB
testcase_13 AC 325 ms
25,516 KB
testcase_14 AC 234 ms
25,516 KB
testcase_15 AC 340 ms
25,596 KB
testcase_16 AC 61 ms
19,444 KB
testcase_17 AC 61 ms
23,488 KB
testcase_18 AC 62 ms
23,540 KB
testcase_19 AC 61 ms
23,532 KB
testcase_20 AC 61 ms
21,676 KB
testcase_21 AC 60 ms
21,452 KB
testcase_22 AC 60 ms
21,492 KB
testcase_23 AC 60 ms
21,500 KB
testcase_24 AC 61 ms
23,464 KB
testcase_25 AC 481 ms
27,640 KB
testcase_26 AC 456 ms
25,596 KB
testcase_27 AC 60 ms
21,448 KB
testcase_28 AC 101 ms
27,644 KB
testcase_29 AC 142 ms
25,540 KB
testcase_30 AC 374 ms
27,780 KB
testcase_31 AC 480 ms
25,820 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