結果
問題 | No.145 yukiover |
ユーザー | lllllll88938494 |
提出日時 | 2022-06-02 16:11:43 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 363 bytes |
コンパイル時間 | 151 ms |
コンパイル使用メモリ | 81,732 KB |
実行使用メモリ | 81,632 KB |
最終ジャッジ日時 | 2023-10-21 01:11:46 |
合計ジャッジ時間 | 3,562 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 35 ms
53,484 KB |
testcase_01 | AC | 34 ms
53,484 KB |
testcase_02 | AC | 36 ms
53,484 KB |
testcase_03 | AC | 35 ms
53,484 KB |
testcase_04 | AC | 36 ms
53,484 KB |
testcase_05 | AC | 35 ms
53,484 KB |
testcase_06 | AC | 36 ms
53,484 KB |
testcase_07 | WA | - |
testcase_08 | AC | 37 ms
53,484 KB |
testcase_09 | AC | 37 ms
53,484 KB |
testcase_10 | WA | - |
testcase_11 | AC | 47 ms
68,248 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 134 ms
80,416 KB |
testcase_16 | AC | 76 ms
81,632 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
ソースコード
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)