結果
| 問題 |
No.1592 Tenkei 90
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-09 23:03:15 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 1,000 ms |
| コード長 | 719 bytes |
| コンパイル時間 | 154 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2024-07-01 18:07:08 |
| 合計ジャッジ時間 | 1,508 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
nsa = lambda: list(map(str, stdin.readline().split()))
ntp = lambda: tuple(map(int, stdin.readline().split()))
mod = 10 ** 9 + 7
inf = 10 ** 18
S = ns()
T = 'kyoprotenkei90'
ansdict = {}
for t in T:
if t in ansdict:
ansdict[t] += 1
else:
ansdict[t] = 1
dict = {}
for s in S:
if s in dict:
dict[s] += 1
else:
dict[s] = 1
ok = True
for t in ansdict.keys():
if t in dict:
if dict[t] == ansdict[t]:
continue
ok = False
if ok:
print('Yes')
else:
print('No')