結果

問題 No.264 じゃんけん
ユーザー matsuyoshi30matsuyoshi30
提出日時 2016-04-05 21:20:15
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 438 bytes
コンパイル時間 562 ms
コンパイル使用メモリ 63,092 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-19 07:14:29
合計ジャッジ時間 1,080 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

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