output_description: Find the number of strings, modulo 998244353, that can result from applying
  the operation on S between 0 and K times (inclusive).
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S K
attempt: import sys
  
  n = int(input())
  alpha = [
      "a",
      "b",
      "c",
      "d",
      "e",
      "f",
      "g",
      "h",
      "i",
      "j",
      "k",
      "l",
      "m",
      "n",
      "o",
      "p",
      "q",
      "r",
      "s",
      "t",
      "u",
      "v",
      "w",
      "x",
      "y",
      "z",
  ]
  lst = []
  Lst = []
  
  
  def Base_10_to_n_(X, n):
      X_dumy = X
      while X_dumy > 0:
          Lst.append((X_dumy % n))
          X_dumy = int(X_dumy / n)
      return Lst
  
  
  if sum(Base_10_to_n_(n, 26)) == 1:
      p = ""
      for i in range(len(Base_10_to_n_(n, 26)) - 3):
          p += "z"
      print(p)
      sys.exit()
  
  
  def Base_10_to_n(X, n):
      X_dumy = X
      ku = 0
      while X_dumy > 0:
          if ku:
              lst.append(max(0, (X_dumy % n) - 1))
              if X_dumy % n == 0:
                  ku = 1
              else:
                  ku = 0
              X_dumy = int(X_dumy / n)
          else:
              lst.append((X_dumy % n))
              if X_dumy % n == 0:
                  ku = 1
              else:
                  ku = 0
              X_dumy = int(X_dumy / n)
  
      return lst
  
  
  lst = Base_10_to_n(n, 26)
  lst.reverse()
  t = ""
  for i in range(len(lst)):
      t += alpha[lst[i] - 1]
  print(t)
  
problem_description: Statement
  
  Given is a string S consisting of `0` and `1`. Find the number of strings,
  modulo 998244353, that can result from applying the following operation on S
  between 0 and K times (inclusive):
  
    * Choose a pair of integers i, j (1\leq i < j\leq |S|) such that the i-th and j-th characters of S are `0` and `1`, respectively. Remove the j-th character from S and insert it to the immediate left of the i-th character.
samples: [{"input": "0101 1", "output": "4\n    \n\nFour strings, `0101`, `0110`, `1001`, and `1010`, can result.\n\n* * *"}, {"input": "01100110 2", "output": "14\n    \n\n* * *"}, {"input": "1101010010101101110111100011011111011000111101110101010010101010101 20", "output": "113434815"}]