snake_case__				= range(2, 20 + 1)
snake_case__				= [10**k for k in range(ks[-1] + 1)]
snake_case__				= {}
def       __magic_name__(  __UpperCAmelCase ,						__UpperCAmelCase ,						__UpperCAmelCase ,						__UpperCAmelCase		)						->    Tuple:



      '''simple docstring'''

      _lowerCamelCase			    =				sum(a_i[j] for j in range(__UpperCAmelCase ,						len(__UpperCAmelCase		)		)		)
      _lowerCamelCase			    =				sum(a_i[j] * base[j] for j in range(min(len(__UpperCAmelCase		) ,						__UpperCAmelCase		)		)		)

      _lowerCamelCase    ,					_lowerCamelCase			    =				0, 0
      _lowerCamelCase			    =				n - i

      _lowerCamelCase			    =				memo.get(__UpperCAmelCase		)

      if sub_memo is not None:
            _lowerCamelCase			    =				sub_memo.get(__UpperCAmelCase		)

            if jumps is not None and len(__UpperCAmelCase		) > 0:
                  # find and make the largest jump without going over
                  _lowerCamelCase			    =				-1
                  for _k in range(len(__UpperCAmelCase		) - 1 ,						-1 ,						-1		):
                        if jumps[_k][2] <= k and jumps[_k][1] <= max_dn:
                              _lowerCamelCase			    =				_k
                              break

                  if max_jump >= 0:
                        _lowerCamelCase    ,					_lowerCamelCase    ,					_lowerCamelCase			    =				jumps[max_jump]
                        # since the difference between jumps is cached, add c
                        _lowerCamelCase			    =				diff + c
                        for j in range(min(__UpperCAmelCase ,						len(__UpperCAmelCase		)		)		):
                              _lowerCamelCase    ,					_lowerCamelCase			    =				divmod(__UpperCAmelCase ,						10		)
                        if new_c > 0:
                              add(__UpperCAmelCase ,						__UpperCAmelCase ,						__UpperCAmelCase		)

            else:
                  _lowerCamelCase			    =				[]
      else:
            _lowerCamelCase			    =				{c: []}
            _lowerCamelCase			    =				sub_memo

      if dn >= max_dn or c + diff >= base[k]:
            return diff, dn

      if k > ks[0]:
            while True:
                  # keep doing smaller jumps
                  _lowerCamelCase    ,					_lowerCamelCase			    =				next_term(__UpperCAmelCase ,						k - 1 ,						i + dn ,						__UpperCAmelCase		)
                  diff += _diff
                  dn += terms_jumped

                  if dn >= max_dn or c + diff >= base[k]:
                        break
      else:
            # would be too small a jump, just compute sequential terms instead
            _lowerCamelCase    ,					_lowerCamelCase			    =				compute(__UpperCAmelCase ,						__UpperCAmelCase ,						i + dn ,						__UpperCAmelCase		)
            diff += _diff
            dn += terms_jumped

      _lowerCamelCase			    =				sub_memo[c]

      # keep jumps sorted by # of terms skipped
      _lowerCamelCase			    =				0
      while j < len(__UpperCAmelCase		):
            if jumps[j][1] > dn:
                  break
            j += 1

      # cache the jump for this value digitsum(b) and c
      sub_memo[c].insert(__UpperCAmelCase ,						(diff, dn, k)		)
      return (diff, dn)
def       __magic_name__(  __UpperCAmelCase ,						__UpperCAmelCase ,						__UpperCAmelCase ,						__UpperCAmelCase		)						->    Tuple:



      '''simple docstring'''

      if i >= n:
            return 0, i
      if k > len(__UpperCAmelCase		):
            a_i.extend([0 for _ in range(k - len(__UpperCAmelCase		)		)]		)

      # note: a_i -> b * 10^k + c
      # ds_b -> digitsum(b)
      # ds_c -> digitsum(c)
      _lowerCamelCase			    =				i
      _lowerCamelCase    ,					_lowerCamelCase    ,					_lowerCamelCase			    =				0, 0, 0
      for j in range(len(__UpperCAmelCase		)		):
            if j >= k:
                  ds_b += a_i[j]
            else:
                  ds_c += a_i[j]

      while i < n:
            i += 1
            _lowerCamelCase			    =				ds_c + ds_b
            diff += addend
            _lowerCamelCase			    =				0
            for j in range(__UpperCAmelCase		):
                  _lowerCamelCase			    =				a_i[j] + addend
                  _lowerCamelCase    ,					_lowerCamelCase			    =				divmod(__UpperCAmelCase ,						10		)

                  ds_c += a_i[j]

            if addend > 0:
                  break

      if addend > 0:
            add(__UpperCAmelCase ,						__UpperCAmelCase ,						__UpperCAmelCase		)
      return diff, i - start_i
def       __magic_name__(  __UpperCAmelCase ,						__UpperCAmelCase ,						__UpperCAmelCase		)						->    Tuple:



      '''simple docstring'''

      for j in range(__UpperCAmelCase ,						len(__UpperCAmelCase		)		):
            _lowerCamelCase			    =				digits[j] + addend
            if s >= 10:
                  _lowerCamelCase    ,					_lowerCamelCase			    =				divmod(__UpperCAmelCase ,						10		)
                  _lowerCamelCase			    =				addend // 10 + quotient
            else:
                  _lowerCamelCase			    =				s
                  _lowerCamelCase			    =				addend // 10

            if addend == 0:
                  break

      while addend > 0:
            _lowerCamelCase    ,					_lowerCamelCase			    =				divmod(__UpperCAmelCase ,						10		)
            digits.append(__UpperCAmelCase		)
def       __magic_name__(  __UpperCAmelCase = 10**15		)						->    int:



      '''simple docstring'''

      _lowerCamelCase			    =				[1]
      _lowerCamelCase			    =				1
      _lowerCamelCase			    =				0
      while True:
            _lowerCamelCase    ,					_lowerCamelCase			    =				next_term(__UpperCAmelCase ,						20 ,						i + dn ,						__UpperCAmelCase		)
            dn += terms_jumped
            if dn == n - i:
                  break

      _lowerCamelCase			    =				0
      for j in range(len(__UpperCAmelCase		)		):
            a_n += digits[j] * 10**j
      return a_n


if __name__ == "__main__":
     print(f'''{solution() = }''')
import argparse
import json
import subprocess
def       __magic_name__(  __UpperCAmelCase ,						__UpperCAmelCase		)						->    int:



      '''simple docstring'''

      _lowerCamelCase			    =				[]

      _lowerCamelCase			    =				(
          F'curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer {token}"'
          ''' https://api.github.com/repos/huggingface/transformers/actions/runners'''
      )
      _lowerCamelCase			    =				subprocess.run(__UpperCAmelCase ,						shell=__UpperCAmelCase ,						stdout=subprocess.PIPE		)
      _lowerCamelCase			    =				output.stdout.decode('''utf-8'''		)
      _lowerCamelCase			    =				json.loads(__UpperCAmelCase		)

      _lowerCamelCase			    =				status['''runners''']
      for runner in runners:
            if runner["name"] in target_runners:
                  if runner["status"] == "offline":
                        offline_runners.append(__UpperCAmelCase		)

    # save the result so we can report them on Slack
      with open('''offline_runners.txt''' ,						'''w'''		) as fp:
            fp.write(json.dumps(__UpperCAmelCase		)		)

      if len(__UpperCAmelCase		) > 0:
            _lowerCamelCase			    =				'''\n'''.join([x['''name'''] for x in offline_runners]		)
            raise ValueError(F'The following runners are offline:\n{failed}'		)


if __name__ == "__main__":
     def       __magic_name__(  __UpperCAmelCase		)						->    str:



           '''simple docstring'''

           return values.split(''','''		)

     snake_case__				= argparse.ArgumentParser()
     # Required parameters
     parser.add_argument(
         '--target_runners',
         default=None,
         type=list_str,
         required=True,
         help='Comma-separated list of runners to check status.',
     )

     parser.add_argument(
         '--token', default=None, type=str, required=True, help='A token that has actions:read permission.'
     )
     snake_case__				= parser.parse_args()




     get_runner_status(args.target_runners, args.token)