結果

問題 No.264 じゃんけん
ユーザー megane_ankomegane_anko
提出日時 2021-02-06 00:42:01
言語 JavaScript
(node v21.7.1)
結果
AC  
実行時間 84 ms / 5,000 ms
コード長 385 bytes
コンパイル時間 67 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 42,312 KB
最終ジャッジ日時 2023-09-15 11:04:55
合計ジャッジ時間 1,477 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
42,048 KB
testcase_01 AC 78 ms
42,268 KB
testcase_02 AC 83 ms
42,256 KB
testcase_03 AC 78 ms
42,172 KB
testcase_04 AC 78 ms
42,312 KB
testcase_05 AC 78 ms
42,060 KB
testcase_06 AC 78 ms
42,136 KB
testcase_07 AC 77 ms
42,052 KB
testcase_08 AC 77 ms
42,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

const input = require('fs').readFileSync('/dev/stdin', 'utf8');

const arr = input.split(' ');
let me = parseInt(arr[0]);
let opp = parseInt(arr[1]);
//console.log(me);
//console.log(opp);

if ( me === opp ) {
    console.log('Drew');
} else if ((me === 0 && opp === 1) || (me === 1 && opp ===2) || (me === 2 && opp === 0)) {
    console.log('Won');
} else {
    console.log('Lost');
}
0