結果
| 問題 |
No.3290 Encrypt Failed, but Decrypt Succeeded
|
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2025-10-03 22:17:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 407 bytes |
| コンパイル時間 | 268 ms |
| コンパイル使用メモリ | 82,800 KB |
| 実行使用メモリ | 848,756 KB |
| 最終ジャッジ日時 | 2025-10-03 22:17:55 |
| 合計ジャッジ時間 | 3,582 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 MLE * 1 -- * 16 |
ソースコード
n,K=map(int,input().split())
T=input()
q=[0]*n+[1]
for i in reversed(range(n)):
c=0
if i+1<=n and 1<=int(T[i:i+1])<=26 and T[i]!="0":
c+=q[i+1]
if i+2<=n and 1<=int(T[i:i+2])<=26 and T[i]!="0":
c+=q[i+2]
q[i]=c
S=[]
l=0
while l<n:
c=q[l+1]
if K<=c:
S+=[int(T[l:l+1])]
l+=1
continue
K-=c
c=q[l+2]
S+=[int(T[l:l+2])]
l+=2
print("".join(chr(v-1+ord("a")) for v in S))
sasa8uyauya