結果

問題 No.431 死亡フラグ
ユーザー eringi103eringi103
提出日時 2016-10-21 10:38:16
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 726 bytes
コンパイル時間 2,194 ms
コンパイル使用メモリ 98,400 KB
実行使用メモリ 22,516 KB
最終ジャッジ日時 2023-08-15 09:45:53
合計ジャッジ時間 3,818 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
20,356 KB
testcase_01 AC 49 ms
20,380 KB
testcase_02 AC 50 ms
20,516 KB
testcase_03 AC 49 ms
20,556 KB
testcase_04 AC 49 ms
20,484 KB
testcase_05 AC 50 ms
22,516 KB
testcase_06 AC 49 ms
20,472 KB
testcase_07 AC 50 ms
22,348 KB
testcase_08 AC 50 ms
18,332 KB
testcase_09 AC 50 ms
20,412 KB
testcase_10 AC 51 ms
22,348 KB
testcase_11 AC 50 ms
22,484 KB
testcase_12 AC 50 ms
20,444 KB
testcase_13 AC 50 ms
20,472 KB
testcase_14 AC 50 ms
20,448 KB
testcase_15 AC 50 ms
20,508 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;

public class Program
{
  static void Main()
  {
    string FLG = Console.ReadLine();
    string D1 = FLG.Substring(0,1);
    string D2 = FLG.Substring(2,1);
    string D3 = FLG.Substring(4,1);
    string SL = FLG.Substring(6,1);
    int DEAD = 0;

    if (SL == "1")
    {
      Console.WriteLine("SURVIVED");
    }
    else 
    {
        if (D1 == "1")
        {
          DEAD++;
        }
        if(D2 == "1")
        {
          DEAD++;
        }
        if(D3 == "1")
        {
          DEAD++;
        }
        if(DEAD > 1)
        {
          Console.WriteLine("DEAD");
        }
        else
        {
          Console.WriteLine("SURVIVED");
        }
    }
  }
}
0