結果

問題 No.91 赤、緑、青の石
ユーザー NoNo
提出日時 2015-06-11 18:44:45
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 474 ms / 5,000 ms
コード長 1,126 bytes
コンパイル時間 2,194 ms
コンパイル使用メモリ 106,188 KB
実行使用メモリ 29,556 KB
最終ジャッジ日時 2023-09-06 12:12:56
合計ジャッジ時間 9,426 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 345 ms
27,612 KB
testcase_01 AC 247 ms
27,524 KB
testcase_02 AC 179 ms
25,476 KB
testcase_03 AC 271 ms
25,472 KB
testcase_04 AC 162 ms
25,492 KB
testcase_05 AC 311 ms
27,536 KB
testcase_06 AC 131 ms
25,568 KB
testcase_07 AC 59 ms
21,432 KB
testcase_08 AC 60 ms
21,416 KB
testcase_09 AC 60 ms
23,696 KB
testcase_10 AC 59 ms
21,408 KB
testcase_11 AC 133 ms
25,456 KB
testcase_12 AC 292 ms
25,724 KB
testcase_13 AC 314 ms
27,444 KB
testcase_14 AC 232 ms
25,656 KB
testcase_15 AC 331 ms
27,592 KB
testcase_16 AC 58 ms
21,516 KB
testcase_17 AC 59 ms
21,544 KB
testcase_18 AC 61 ms
21,564 KB
testcase_19 AC 59 ms
19,460 KB
testcase_20 AC 60 ms
23,420 KB
testcase_21 AC 60 ms
19,520 KB
testcase_22 AC 59 ms
21,372 KB
testcase_23 AC 60 ms
25,560 KB
testcase_24 AC 59 ms
23,488 KB
testcase_25 AC 474 ms
27,616 KB
testcase_26 AC 444 ms
27,452 KB
testcase_27 AC 60 ms
21,596 KB
testcase_28 AC 93 ms
29,556 KB
testcase_29 AC 133 ms
27,624 KB
testcase_30 AC 342 ms
25,472 KB
testcase_31 AC 435 ms
25,568 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] >= 3)
            {
                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