結果

問題 No.1367 文字列門松
ユーザー ThetaTheta
提出日時 2022-10-13 10:12:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 8,488 KB
最終ジャッジ日時 2023-09-08 18:59:02
合計ジャッジ時間 2,361 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,480 KB
testcase_01 AC 17 ms
8,400 KB
testcase_02 AC 18 ms
8,444 KB
testcase_03 AC 18 ms
8,400 KB
testcase_04 AC 19 ms
8,384 KB
testcase_05 AC 18 ms
8,380 KB
testcase_06 AC 18 ms
8,488 KB
testcase_07 AC 18 ms
8,432 KB
testcase_08 AC 18 ms
8,368 KB
testcase_09 AC 17 ms
8,360 KB
testcase_10 AC 18 ms
8,456 KB
testcase_11 AC 18 ms
8,488 KB
testcase_12 AC 18 ms
8,396 KB
testcase_13 AC 17 ms
8,384 KB
testcase_14 AC 18 ms
8,404 KB
testcase_15 WA -
testcase_16 AC 18 ms
8,388 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 18 ms
8,348 KB
testcase_24 AC 18 ms
8,480 KB
testcase_25 AC 17 ms
8,392 KB
testcase_26 AC 18 ms
8,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter, defaultdict


def main():
    S = input()
    kadomatsu_letter_num = defaultdict(int)
    kadomatsu_letter_num.update(Counter("kadomatsu"))

    partial_letter_num = Counter(S)

    for letter, value in partial_letter_num.items():
        if kadomatsu_letter_num[letter] < value:
            print("No")
            break

    else:
        print("Yes")


if __name__ == "__main__":
    main()
0