結果

問題 No.264 じゃんけん
ユーザー kurante5kurante5
提出日時 2021-03-14 19:15:43
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 638 bytes
コンパイル時間 644 ms
コンパイル使用メモリ 64,212 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-24 01:54:23
合計ジャッジ時間 1,044 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2 ms
6,940 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:8:5: warning: 'N' is used uninitialized [-Wuninitialized]
    8 |     if (N == K) {
      |     ^~
main.cpp:7:9: note: 'N' was declared here
    7 |     int N, K;
      |         ^
main.cpp:8:5: warning: 'K' is used uninitialized [-Wuninitialized]
    8 |     if (N == K) {
      |     ^~
main.cpp:7:12: note: 'K' was declared here
    7 |     int N, K;
      |            ^

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main() {
    int N, K;
    if (N == K) {
        cout << "Drew" << endl;
    }
    else if (N == 0) {
        if (K == 1){
            cout << "Win" << endl;
        }
        else if (K == 2) {
            cout << "Lose" << endl;
        }
    }
    else if (N == 1) {
        if(K == 0) {
            cout << "Lose" << endl;
        }
        else if (K == 2) {
            cout << "Win" << endl;
        }
    }
    else {
        if (K == 0) {
            cout << "Win" << endl;
        }
        else if (K == 1) {
            cout << "Lose" << endl;
        }
    }
}
0