結果

問題 No.1592 Tenkei 90
ユーザー Yuu Eguci
提出日時 2021-07-25 22:00:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 30 ms / 1,000 ms
コード長 788 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-21 06:27:18
合計ジャッジ時間 1,264 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

def foo(S):
    """
    文字列 S を適切に並び替えることで、文字列 kyoprotenkei90 を作ることができますか?
    """

    S_list = list(S)
    try:
        assert S_list.count('k') == 2, None
        assert S_list.count('y') == 1, None
        assert S_list.count('o') == 2, None
        assert S_list.count('p') == 1, None
        assert S_list.count('r') == 1, None
        assert S_list.count('t') == 1, None
        assert S_list.count('e') == 2, None
        assert S_list.count('n') == 1, None
        assert S_list.count('i') == 1, None
        assert S_list.count('9') == 1, None
        assert S_list.count('0') == 1, None
    except AssertionError:
        return 'No'
    return 'Yes'


if __name__ == '__main__':
    S = input()
    print(foo(S))
0