結果

問題 No.264 じゃんけん
ユーザー waruo
提出日時 2015-12-06 18:32:23
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 618 bytes
コンパイル時間 600 ms
コンパイル使用メモリ 58,976 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-14 16:00:32
合計ジャッジ時間 1,003 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include <vector>
#include <algorithm>
int main()
{
	int i, y;
	std::cin >> i;
	std::cin >> y;

	if (i == y)
	{
		std::cout << "Drew" << std::endl;
	}
	else
	{
		if (i == 0)
		{
			if (y == 1)
			{
				std::cout << "Won" << std::endl;
			}
			else
			{
				std::cout << "Lost" << std::endl;
			}
		}
		else if (i == 1)
		{
			if (y == 0)
			{
				std::cout << "Lost" << std::endl;
			}
			else
			{
				std::cout << "Won" << std::endl;
			}
		}
		else
		{
			if (y == 0)
			{
				std::cout << "Won" << std::endl;
			}
			else
			{
				std::cout << "Lost" << std::endl;
			}
		}
	}
}
0