結果
| 問題 |
No.431 死亡フラグ
|
| コンテスト | |
| ユーザー |
No
|
| 提出日時 | 2016-10-14 22:26:48 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 898 bytes |
| コンパイル時間 | 835 ms |
| コンパイル使用メモリ | 110,528 KB |
| 実行使用メモリ | 18,048 KB |
| 最終ジャッジ日時 | 2024-11-22 07:08:53 |
| 合計ジャッジ時間 | 1,916 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;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace yukikoda
{
class Program
{
static void Main(string[] args)
{
int[] a = ConvertStringArrayToIntArray(Console.ReadLine().Split());
if (a[3] == 1)
{
Console.WriteLine("SURVIVED");
return;
}
int cnt = 0;
if (a[0] == 1) cnt++;
if (a[1] == 1) cnt++;
if (a[2] == 1) cnt++;
if (cnt >= 2)
{
Console.WriteLine("DEAD");
}else
{
Console.WriteLine("SURVIVED");
}
}
static int[] ConvertStringArrayToIntArray(string[] array)
{
return Array.ConvertAll(array, str => int.Parse(str));
}
}
}
No