結果
問題 | No.361 門松ゲーム2 |
ユーザー |
![]() |
提出日時 | 2016-04-18 00:20:27 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 432 bytes |
コンパイル時間 | 204 ms |
コンパイル使用メモリ | 7,200 KB |
実行使用メモリ | 11,392 KB |
最終ジャッジ日時 | 2024-10-04 11:59:36 |
合計ジャッジ時間 | 6,825 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 15 WA * 2 TLE * 6 -- * 5 |
ソースコード
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"