結果

問題 No.91 赤、緑、青の石
ユーザー NoNo
提出日時 2015-06-11 18:29:29
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,391 bytes
コンパイル時間 2,118 ms
コンパイル使用メモリ 106,784 KB
実行使用メモリ 27,740 KB
最終ジャッジ日時 2023-09-20 20:53:47
合計ジャッジ時間 8,041 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 339 ms
27,552 KB
testcase_01 AC 242 ms
25,584 KB
testcase_02 AC 176 ms
27,600 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 129 ms
25,568 KB
testcase_07 AC 60 ms
21,460 KB
testcase_08 AC 60 ms
21,504 KB
testcase_09 WA -
testcase_10 AC 59 ms
21,452 KB
testcase_11 AC 131 ms
25,564 KB
testcase_12 AC 290 ms
23,552 KB
testcase_13 AC 309 ms
25,680 KB
testcase_14 AC 226 ms
25,656 KB
testcase_15 AC 329 ms
25,600 KB
testcase_16 AC 60 ms
21,584 KB
testcase_17 AC 60 ms
21,436 KB
testcase_18 AC 60 ms
23,628 KB
testcase_19 AC 59 ms
21,564 KB
testcase_20 AC 60 ms
21,568 KB
testcase_21 AC 60 ms
23,548 KB
testcase_22 AC 59 ms
21,348 KB
testcase_23 AC 60 ms
23,472 KB
testcase_24 AC 59 ms
21,448 KB
testcase_25 AC 93 ms
25,528 KB
testcase_26 WA -
testcase_27 AC 60 ms
23,464 KB
testcase_28 AC 93 ms
25,528 KB
testcase_29 AC 131 ms
25,612 KB
testcase_30 AC 334 ms
27,740 KB
testcase_31 AC 171 ms
25,504 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)
            {
                if (c[2] == c[1])
                {
                    c[2] -= 1;
                    c[1] -= 1;
                    c[0] += 1;
                }
                else
                {
                    c[2] -= 2;
                    c[0] += 1;
                    Array.Sort(c);
                }
            }
            Console.WriteLine(c.Min());
            Console.ReadLine();
        }


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

        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