結果

問題 No.361 門松ゲーム2
ユーザー lllllll88938494lllllll88938494
提出日時 2023-05-08 08:05:07
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 384 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 82,620 KB
実行使用メモリ 75,260 KB
最終ジャッジ日時 2024-05-03 22:16:51
合計ジャッジ時間 3,663 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,328 KB
testcase_01 WA -
testcase_02 AC 36 ms
53,228 KB
testcase_03 AC 37 ms
52,240 KB
testcase_04 AC 36 ms
52,280 KB
testcase_05 AC 35 ms
52,472 KB
testcase_06 AC 36 ms
52,168 KB
testcase_07 AC 35 ms
52,128 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 44 ms
60,896 KB
testcase_12 AC 48 ms
64,100 KB
testcase_13 WA -
testcase_14 AC 106 ms
71,716 KB
testcase_15 WA -
testcase_16 AC 142 ms
73,396 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 136 ms
73,036 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 159 ms
74,108 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 158 ms
74,124 KB
testcase_26 WA -
testcase_27 AC 158 ms
74,408 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,d = map(int,input().split())
g = [0]*(n+1)

for x in range(1,n+1):
    s = set()
    for i in range(1,x+1):
        for k in range(i+1,x+1):
            if i + k >= x:
                break
            t =x - (i + k)
            if i < t < k:
                s.add(g[i]^g[t]^g[k])
    t = 0
    while t in s:
        t += 1
    g[x] = t
    
print('kado' if g[n] != 0 else 'matsu' )
0