結果

問題 No.91 赤、緑、青の石
ユーザー bluemeganebluemegane
提出日時 2018-10-03 19:41:14
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 685 bytes
コンパイル時間 973 ms
コンパイル使用メモリ 113,328 KB
実行使用メモリ 31,176 KB
最終ジャッジ日時 2024-04-20 14:48:41
合計ジャッジ時間 7,751 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 361 ms
23,040 KB
testcase_01 AC 248 ms
22,656 KB
testcase_02 AC 171 ms
22,912 KB
testcase_03 AC 278 ms
23,168 KB
testcase_04 AC 148 ms
22,912 KB
testcase_05 AC 313 ms
23,040 KB
testcase_06 WA -
testcase_07 AC 29 ms
18,816 KB
testcase_08 AC 29 ms
18,816 KB
testcase_09 AC 28 ms
18,560 KB
testcase_10 AC 28 ms
18,560 KB
testcase_11 AC 114 ms
23,040 KB
testcase_12 AC 293 ms
22,912 KB
testcase_13 AC 316 ms
22,656 KB
testcase_14 AC 231 ms
22,912 KB
testcase_15 AC 342 ms
22,912 KB
testcase_16 AC 30 ms
18,560 KB
testcase_17 AC 29 ms
18,944 KB
testcase_18 AC 29 ms
18,944 KB
testcase_19 AC 29 ms
18,816 KB
testcase_20 AC 28 ms
19,072 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 30 ms
18,560 KB
testcase_24 AC 29 ms
18,944 KB
testcase_25 AC 485 ms
22,784 KB
testcase_26 AC 487 ms
22,784 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 360 ms
22,912 KB
testcase_31 AC 467 ms
22,656 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System.Linq;
using System;

public class Hello
{
    public static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        var amin = a.Min();
        var ans = amin;
        for (int i = 0; i < 3; i++) a[i] -= amin;
        Array.Sort(a);
        ans += getAns(a);
        Console.WriteLine(ans);
    }
    public static  int getAns (int[] a)
    {
        var ans = 0;
        while (true)
        {
            if (a[2] - 3 < 0) return ans;
            a[2] -= 3;
            if (a[1] - 1 < 0) return ans;
            a[1] -= 1;
            ans++;
            Array.Sort(a);
        }
    }
}
0