結果

問題 No.264 じゃんけん
ユーザー matsuyoshi30
提出日時 2016-04-05 21:20:15
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 438 bytes
コンパイル時間 539 ms
コンパイル使用メモリ 63,732 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-10 23:53:56
合計ジャッジ時間 1,024 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main() {
	int n, k;
	cin >> n >> k;
	int judge = 1;

	if(n == 0) {
		if(k == 1) judge = 0;
		if(k == 2) judge = 2;
	} else if(n == 1) {
		if(k == 0) judge = 2;
		if(k == 2) judge = 0;
	} else {
		if(k == 0) judge = 0;
		if(k == 1) judge = 2;
	}

	if(judge == 0) {
		cout << "Won" << endl;
	} else if(judge == 1) {
		cout << "Drew" << endl;
	} else {
		cout << "Lost" << endl;
	}

	return 0;
}
0