結果

問題 No.1592 Tenkei 90
ユーザー tcltktcltk
提出日時 2021-11-19 23:51:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 227 ms / 1,000 ms
コード長 681 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 89,600 KB
最終ジャッジ日時 2023-08-30 11:29:57
合計ジャッジ時間 6,998 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 224 ms
89,360 KB
testcase_01 AC 224 ms
89,280 KB
testcase_02 AC 223 ms
89,272 KB
testcase_03 AC 227 ms
89,196 KB
testcase_04 AC 220 ms
89,180 KB
testcase_05 AC 225 ms
89,460 KB
testcase_06 AC 220 ms
89,444 KB
testcase_07 AC 218 ms
89,396 KB
testcase_08 AC 224 ms
89,384 KB
testcase_09 AC 223 ms
89,284 KB
testcase_10 AC 225 ms
89,232 KB
testcase_11 AC 226 ms
89,600 KB
testcase_12 AC 221 ms
89,344 KB
testcase_13 AC 224 ms
89,436 KB
testcase_14 AC 219 ms
89,436 KB
testcase_15 AC 218 ms
89,508 KB
testcase_16 AC 220 ms
89,356 KB
testcase_17 AC 216 ms
89,572 KB
testcase_18 AC 227 ms
89,332 KB
testcase_19 AC 223 ms
89,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# from typing import *

import sys
import io
import math
import collections
import decimal
import itertools
import bisect
import heapq


def input():
    return sys.stdin.readline()[:-1]


# sys.setrecursionlimit(1000000)

# _INPUT = """# paste here...
# """
# sys.stdin = io.StringIO(_INPUT)

INF = 10**10

YES = 'Yes'
NO = 'No'

def solve(S):
    if len(S) != len('kyoprotenkei90'):
        return 'No'

    counter1 = collections.Counter(S)
    counter2 = collections.Counter(list('kyoprotenkei90'))
    for c, n in counter1.items():
        if c not in counter2 or counter2[c] != n:
            return 'No'
    return 'Yes'


S = input()
print(solve(S))
0