結果

問題 No.1367 文字列門松
ユーザー 👑 KazunKazun
提出日時 2021-01-29 21:49:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 76,528 KB
最終ジャッジ日時 2023-09-09 15:12:06
合計ジャッジ時間 3,704 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,328 KB
testcase_01 AC 81 ms
75,248 KB
testcase_02 AC 84 ms
76,340 KB
testcase_03 AC 80 ms
76,504 KB
testcase_04 AC 82 ms
76,460 KB
testcase_05 AC 82 ms
76,304 KB
testcase_06 AC 80 ms
75,588 KB
testcase_07 AC 78 ms
75,664 KB
testcase_08 AC 79 ms
75,796 KB
testcase_09 AC 76 ms
75,424 KB
testcase_10 AC 78 ms
75,420 KB
testcase_11 AC 79 ms
75,404 KB
testcase_12 AC 81 ms
75,768 KB
testcase_13 AC 81 ms
76,504 KB
testcase_14 AC 81 ms
76,404 KB
testcase_15 AC 81 ms
76,440 KB
testcase_16 AC 82 ms
76,316 KB
testcase_17 AC 82 ms
76,404 KB
testcase_18 AC 79 ms
76,512 KB
testcase_19 AC 80 ms
76,436 KB
testcase_20 AC 79 ms
76,508 KB
testcase_21 AC 80 ms
76,428 KB
testcase_22 AC 81 ms
76,440 KB
testcase_23 AC 81 ms
76,176 KB
testcase_24 AC 81 ms
76,528 KB
testcase_25 AC 81 ms
76,308 KB
testcase_26 AC 81 ms
76,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import product

def f(S):
    X="kadomatsu"
    for t in product([0,1],repeat=len(X)):
        Y=""
        for i in range(len(X)):
            if t[i]:
                Y+=X[i]
        if S==Y:
            return True
    return False

S=input()
print("Yes" if f(S) else "No")
0