結果

問題 No.91 赤、緑、青の石
ユーザー 抹茶アイス抹茶アイス
提出日時 2023-08-01 14:15:12
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 503 ms / 5,000 ms
コード長 895 bytes
コンパイル時間 8,452 ms
コンパイル使用メモリ 167,192 KB
実行使用メモリ 208,664 KB
最終ジャッジ日時 2024-04-19 13:33:30
合計ジャッジ時間 15,405 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 362 ms
54,656 KB
testcase_01 AC 262 ms
55,036 KB
testcase_02 AC 188 ms
54,784 KB
testcase_03 AC 297 ms
54,528 KB
testcase_04 AC 172 ms
54,656 KB
testcase_05 AC 330 ms
54,528 KB
testcase_06 AC 88 ms
40,960 KB
testcase_07 AC 48 ms
30,208 KB
testcase_08 AC 52 ms
30,720 KB
testcase_09 AC 51 ms
30,432 KB
testcase_10 AC 50 ms
30,848 KB
testcase_11 AC 147 ms
54,624 KB
testcase_12 AC 312 ms
54,496 KB
testcase_13 AC 316 ms
54,656 KB
testcase_14 AC 244 ms
54,656 KB
testcase_15 AC 355 ms
54,528 KB
testcase_16 AC 48 ms
30,336 KB
testcase_17 AC 53 ms
29,824 KB
testcase_18 AC 55 ms
29,952 KB
testcase_19 AC 57 ms
30,704 KB
testcase_20 AC 55 ms
30,464 KB
testcase_21 AC 53 ms
30,592 KB
testcase_22 AC 49 ms
30,208 KB
testcase_23 AC 49 ms
30,336 KB
testcase_24 AC 49 ms
30,592 KB
testcase_25 AC 503 ms
54,656 KB
testcase_26 AC 471 ms
54,656 KB
testcase_27 AC 50 ms
30,336 KB
testcase_28 AC 54 ms
31,232 KB
testcase_29 AC 59 ms
32,384 KB
testcase_30 AC 363 ms
54,528 KB
testcase_31 AC 485 ms
208,664 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (82 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

namespace yukicoder
{
    public class Program
    {
        public static void Main()
        {
            var s = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var sum = 0;
            sum = Make(s, sum);
            Console.WriteLine(sum);
        }
        public static int Make(int[] s,int sum)
        {
            Array.Sort(s);
            sum += s[0];
            s = s.Select(x => x - s[0]).ToArray();
            s = new int[2] { s[1], s[2] };
            while (s.All(x => x > 0) && s.Max() >= 3)
            {
                Array.Sort(s);
                s[0]--;
                s[1] -= 3;
                sum++;
            }
            while (s[1] > 4)
            {
                s[1] -= 5;
                sum++;
            }
            return sum;
        }
    }
}
0