結果

問題 No.431 死亡フラグ
ユーザー Charlotte8687Charlotte8687
提出日時 2018-12-03 15:12:15
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 680 bytes
コンパイル時間 1,958 ms
コンパイル使用メモリ 100,232 KB
実行使用メモリ 22,544 KB
最終ジャッジ日時 2023-09-13 21:08:35
合計ジャッジ時間 3,731 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
20,408 KB
testcase_01 AC 51 ms
20,564 KB
testcase_02 AC 50 ms
20,416 KB
testcase_03 AC 51 ms
20,608 KB
testcase_04 AC 51 ms
20,552 KB
testcase_05 AC 51 ms
20,392 KB
testcase_06 AC 52 ms
20,396 KB
testcase_07 AC 51 ms
20,464 KB
testcase_08 AC 51 ms
20,464 KB
testcase_09 AC 49 ms
20,404 KB
testcase_10 AC 52 ms
22,428 KB
testcase_11 AC 51 ms
18,420 KB
testcase_12 AC 51 ms
20,552 KB
testcase_13 AC 50 ms
20,472 KB
testcase_14 AC 51 ms
22,468 KB
testcase_15 AC 51 ms
22,544 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace StudyApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var inputs = Console.ReadLine().Trim().Split(' ');

            if (inputs[3].Equals("1"))
                Console.WriteLine("SURVIVED");
            else
            {
                int deathCount = 0;
                for (int i = 0; i < 3; i++)
                {
                    if (inputs[i].Equals("1"))
                        deathCount++;
                }

                if (deathCount >= 2)
                    Console.WriteLine("DEAD");
                else
                    Console.WriteLine("SURVIVED");
            }
        }
    }
}
0