結果
| 問題 | No.264 じゃんけん |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-05 14:42:00 |
| 言語 | JavaScript (node v25.8.2) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 5,000 ms |
| コード長 | 470 bytes |
| 記録 | |
| コンパイル時間 | 131 ms |
| コンパイル使用メモリ | 6,528 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2026-05-16 21:47:40 |
| 合計ジャッジ時間 | 4,408 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
function Main(input) {
// parse input
const data = input.split("\n");
const first_line = data[0].split(" ");
// solve
const c = solve(parseInt(first_line[0]), parseInt(first_line[1]));
// output
console.log(c);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
function solve(n, k) {
const result = k -n;
switch (result) {
case 0:
return 'Drew';
case 1:
case -2:
return 'Won';
default:
return 'Lost';
}
}