結果

問題 No.145 yukiover
ユーザー lllllll88938494
提出日時 2022-06-02 16:11:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 363 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 81,792 KB
最終ジャッジ日時 2024-09-21 02:01:05
合計ジャッジ時間 3,612 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 8 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

from heapq import heappop,heappush 

n=int(input())
s=input()
y='yuki'
h=[]
ans=0

for i in s:
    heappush(h,-ord(i))

f=1
while len(h) > 0 and f == 1:
    f=0
    for i in range(4):
        if len(h) == 0:
            break
        t = heappop(h)
        if -t > ord(y[i]):
            f=1
            ans += 1
            break
            
print(ans)
        
0