結果
問題 | No.264 じゃんけん |
ユーザー |
![]() |
提出日時 | 2019-05-17 09:49:40 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 509 bytes |
コンパイル時間 | 535 ms |
コンパイル使用メモリ | 63,296 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-17 05:49:55 |
合計ジャッジ時間 | 1,045 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> using namespace std; using ll = long long; int main() { int N, K; cin >> N >> K; int ans; if (N == K) ans = 2; else if (N == 2 && K == 0) ans = 0; else if (N == 0 && K == 2) ans = 1; else if (N < K) ans = 0; else ans = 1; switch (ans) { case 0: cout << "Won" << endl; break; case 1: cout << "Lost" << endl; break; case 2: cout << "Drew" << endl; break; default: break; } return 0; }