結果
問題 |
No.3290 Encrypt Failed, but Decrypt Succeeded
|
ユーザー |
|
提出日時 | 2025-10-03 22:58:35 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 373 bytes |
コンパイル時間 | 273 ms |
コンパイル使用メモリ | 82,660 KB |
実行使用メモリ | 848,992 KB |
最終ジャッジ日時 | 2025-10-03 22:58:39 |
合計ジャッジ時間 | 3,848 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 MLE * 1 -- * 16 |
ソースコード
n,k=map(int,input().split()) t=[*map(int,input())] d=[0]*(1+n) d[n]=1 for i in range(n)[::-1]: if t[i]==0: continue if i+1>=n or t[i+1]: d[i]+=d[i+1] if i+1<n and 10<=t[i]*10+t[i+1]<=26: d[i]+=d[i+2] i=0 a=ord('a') while i<n: if k<=d[i+1]: print(chr(t[i]+a-1),end='') i+=1 else: print(chr(t[i]*10+t[i+1]+a-1),end='') k-=d[i+1] i+=2