結果

問題 No.431 死亡フラグ
ユーザー kurenai3110kurenai3110
提出日時 2016-10-14 22:22:38
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 416 ms
コンパイル使用メモリ 54,684 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-22 07:00:57
合計ジャッジ時間 1,085 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main()
{
	int cnt = 0;

	for (int i = 0; i < 3; i++) {
		int d; cin >> d;
		if (d)cnt++;
	}

	int s; cin >> s;
	if (s) cout << "SURVIVED" << endl;
	else {
		if (cnt>=2)cout << "DEAD" << endl;
		else cout << "SURVIVED" << endl;
	}

    return 0;
}
0