結果

問題 No.361 門松ゲーム2
コンテスト
ユーザー yaoshimax
提出日時 2016-04-18 00:20:27
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 432 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 133 ms
コンパイル使用メモリ 77,752 KB
最終ジャッジ日時 2025-12-03 20:28:43
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

L,D=map(int,raw_input().split())

ans=[0,0,0,0,0,0]
for i in range(6,L+1):
    grundy=0
    for j in range(1,i+1):
        for k in range(j+1,i+1):
            l=i-j-k
            if l<=k: 
                continue
            if l-j > D:
                continue
            num=ans[j]^ans[k]^ans[l]
            if( num == 0 ):
                grundy=1
    ans.append(grundy)
if ans[L]==0:
    print "matsu"
else:
    print "kado"
0