結果

問題 No.264 じゃんけん
ユーザー halship
提出日時 2017-06-18 21:59:56
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 349 bytes
コンパイル時間 15,229 ms
コンパイル使用メモリ 388,828 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-01 20:33:33
合計ジャッジ時間 13,597 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::io;

fn main() {
    let mut nk = String::new();
    io::stdin().read_line(&mut nk).unwrap();
    let nk: Vec<u8> = nk.trim().split(' ').map(|s| s.parse().unwrap()).collect();

    if (nk[0] + 1) % 3 == nk[1] {
        println!("Won");
    } else if nk[0] == nk[1] {
        println!("Drew");
    } else {
        println!("Lost");
    }
}
0