結果

問題 No.8 N言っちゃダメゲーム
ユーザー sue_charosue_charo
提出日時 2017-04-21 17:05:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 28 ms / 5,000 ms
コード長 776 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 10,996 KB
実行使用メモリ 9,976 KB
最終ジャッジ日時 2023-09-27 10:58:43
合計ジャッジ時間 1,074 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
9,916 KB
testcase_01 AC 27 ms
9,924 KB
testcase_02 AC 26 ms
9,868 KB
testcase_03 AC 26 ms
9,868 KB
testcase_04 AC 27 ms
9,936 KB
testcase_05 AC 28 ms
9,852 KB
testcase_06 AC 27 ms
9,872 KB
testcase_07 AC 26 ms
9,976 KB
testcase_08 AC 27 ms
9,844 KB
testcase_09 AC 28 ms
9,888 KB
testcase_10 AC 27 ms
9,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
import array, bisect, collections, heapq, itertools, math, random, re, string, sys, time

sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
MOD = 10 ** 9 + 7


def II(): return int(input())
def ILI(): return list(map(int, input().split()))
def IAI(LINE): return [ILI() for __ in range(LINE)]
def IDI(): return {key: value for key, value in ILI()}


def solve(P, N, K):
    ans = []
    for n, k in zip(N, K):
        if (n % (k + 1)) == 1:
            ans.append("Lose")
        else:
            ans.append("Win")
    return ans


def main():
    P = II()
    N = []
    K = []
    for __ in range(P):
        n, k = ILI()
        N.append(n)
        K.append(k)
    ans = solve(P, N, K)
    for i in ans:
        print(i)


if __name__ == "__main__":
    main()
0