結果
問題 |
No.431 死亡フラグ
|
ユーザー |
|
提出日時 | 2016-10-21 10:38:16 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 23 ms / 2,000 ms |
コード長 | 726 bytes |
コンパイル時間 | 713 ms |
コンパイル使用メモリ | 106,016 KB |
実行使用メモリ | 25,524 KB |
最終ジャッジ日時 | 2024-11-23 16:03:43 |
合計ジャッジ時間 | 1,647 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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"); } } } }