結果

問題 No.8 N言っちゃダメゲーム
ユーザー miztommiztom
提出日時 2024-03-12 15:31:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 374 ms / 5,000 ms
コード長 215 bytes
コンパイル時間 338 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 218,724 KB
最終ジャッジ日時 2024-03-12 15:31:24
合計ジャッジ時間 3,092 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,460 KB
testcase_01 AC 31 ms
53,460 KB
testcase_02 AC 32 ms
53,456 KB
testcase_03 AC 204 ms
148,404 KB
testcase_04 AC 374 ms
218,724 KB
testcase_05 AC 291 ms
216,468 KB
testcase_06 AC 151 ms
115,316 KB
testcase_07 AC 157 ms
122,176 KB
testcase_08 AC 167 ms
133,576 KB
testcase_09 AC 180 ms
134,212 KB
testcase_10 AC 185 ms
139,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for i in range(int(input())):
    n,k=map(int,input().split())
    dp=[0]*n
    c=0
    for i in range(n):
        x=c<min(i,k)
        dp[i]=x
        c+=x
        if i>=k:c-=dp[i-k]
    print("LWoisne"[dp[-1]::2])
0