結果

問題 No.8 N言っちゃダメゲーム
ユーザー pocaristpocarist
提出日時 2015-09-11 14:38:01
言語 F#
(F# 4.0)
結果
AC  
実行時間 83 ms / 5,000 ms
コード長 448 bytes
コンパイル時間 3,825 ms
コンパイル使用メモリ 158,392 KB
実行使用メモリ 24,692 KB
最終ジャッジ日時 2023-09-26 10:29:50
合計ジャッジ時間 5,585 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
22,672 KB
testcase_01 AC 80 ms
22,828 KB
testcase_02 AC 81 ms
22,708 KB
testcase_03 AC 82 ms
24,692 KB
testcase_04 AC 81 ms
22,700 KB
testcase_05 AC 82 ms
22,888 KB
testcase_06 AC 83 ms
22,632 KB
testcase_07 AC 82 ms
22,620 KB
testcase_08 AC 82 ms
22,640 KB
testcase_09 AC 82 ms
22,616 KB
testcase_10 AC 81 ms
22,548 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

// http://yukicoder.me/problems/26
open System

let dprintfn fmt = Printf.kprintf Diagnostics.Debug.WriteLine fmt

[<EntryPoint>]
let main argv = 
    let P = Console.ReadLine().Trim() |> int
    for _ in 1 .. P do
        let N, K = Console.ReadLine().Trim().Split([|' '|]) |> Array.map int |> fun a -> a.[0], a.[1]
        let ans = N%(K+1) <> 1
        match ans with
        | true -> "Win"
        | _ -> "Lose"
        |> printfn "%s"
    0 
0