結果

問題 No.264 じゃんけん
コンテスト
ユーザー vjudge1
提出日時 2025-11-24 21:03:20
言語 Crystal
(1.14.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 546 bytes
コンパイル時間 11,613 ms
コンパイル使用メモリ 307,040 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-11-24 21:03:34
合計ジャッジ時間 12,595 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

lib C
    fun getchar_unlocked : Int32
end
def read_i : Int32
    ans = 0
    f = 1
    c = C.getchar_unlocked()
    while [9, 10, 11, 12, 13, 32].includes?(c)
        c = C.getchar_unlocked()
    end
    if c == 45
        f = -1
        c = C.getchar_unlocked()
    end
    while (48 .. 57).includes?(c)
        ans = (ans << 1) + (ans << 3) + (c ^ 48)
        c = C.getchar_unlocked()
    end
    return ans * f
end
a, b = read_i, read_i
puts(a == b ? "Drew" : ((a == 0 && b == 1) || (a == 1 && b == 2) || (a == 2 && b == 0) ? "Won" : "Lost"))
0