結果

問題 No.8 N言っちゃダメゲーム
ユーザー a_tena_ten
提出日時 2016-04-07 17:39:32
言語 Python2
(2.7.18)
結果
AC  
実行時間 55 ms / 5,000 ms
コード長 374 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-14 22:23:53
合計ジャッジ時間 883 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,812 KB
testcase_01 AC 11 ms
6,944 KB
testcase_02 AC 11 ms
6,940 KB
testcase_03 AC 21 ms
6,940 KB
testcase_04 AC 55 ms
6,940 KB
testcase_05 AC 12 ms
6,944 KB
testcase_06 AC 11 ms
6,940 KB
testcase_07 AC 11 ms
6,944 KB
testcase_08 AC 12 ms
6,944 KB
testcase_09 AC 11 ms
6,940 KB
testcase_10 AC 11 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding:utf-8

P=input()
ope=[raw_input().split() for i in range(P)]

game=[]
for i in ope:
        game.append(map(int,i))

for N,K in game:
        if N <=K:
                print 'Win'
                continue
        n=N-1
        k=K+1
        while k < n:
                n-=k

        if n <= K:
                print 'Win'
        else:
                print 'Lose'
0