





import json
import sys
def      A__       (    SCREAMING_SNAKE_CASE_   :      Union[str, Any]				,	SCREAMING_SNAKE_CASE_   :      List[Any]						)  ->  Union[str, Any]:






   """simple docstring"""







   with open(SCREAMING_SNAKE_CASE_				,	encoding='''utf-8'''						) as f:
      _UpperCAmelCase           =   json.load(SCREAMING_SNAKE_CASE_						)

   _UpperCAmelCase           =   ['''<details>''', '''<summary>Show updated benchmarks!</summary>''', ''' ''']

   for benchmark_name in sorted(SCREAMING_SNAKE_CASE_						):
      _UpperCAmelCase           =   results[benchmark_name]

      _UpperCAmelCase           =   benchmark_name.split('''/'''						)[-1]
      output_md.append(F'''### Benchmark: {benchmark_file_name}'''						)

      _UpperCAmelCase           =   '''| metric |'''
      _UpperCAmelCase           =   '''|--------|'''
      _UpperCAmelCase           =   '''| new / old (diff) |'''
      for metric_name in sorted(SCREAMING_SNAKE_CASE_						):
         _UpperCAmelCase           =   benchmark_res[metric_name]
         _UpperCAmelCase           =   metric_vals['''new''']
         _UpperCAmelCase           =   metric_vals.get('''old'''				,	SCREAMING_SNAKE_CASE_						)
         _UpperCAmelCase           =   metric_vals.get('''diff'''				,	SCREAMING_SNAKE_CASE_						)

         _UpperCAmelCase           =   F''' {new_val:f}''' if isinstance(SCREAMING_SNAKE_CASE_				,	(int, float)						) else '''None'''

         if old_val is not None:
            val_str += F''' / {old_val:f}''' if isinstance(SCREAMING_SNAKE_CASE_				,	(int, float)						) else "None"
         if dif_val is not None:
            val_str += F''' ({dif_val:f})''' if isinstance(SCREAMING_SNAKE_CASE_				,	(int, float)						) else "None"

         title += " " + metric_name + " |"
         lines += "---|"
         value += val_str + " |"

      output_md += [title, lines, value, " "]

   output_md.append('''</details>'''						)

   with open(SCREAMING_SNAKE_CASE_				,	'''w'''				,	encoding='''utf-8'''						) as f:
      f.writelines('''\n'''.join(SCREAMING_SNAKE_CASE_						)						)


if __name__ == "__main__":
   UpperCAmelCase_           =	sys.argv[1]
   UpperCAmelCase_           =	sys.argv[2]

   format_json_to_md(input_json_file, output_md_file)






from __future__ import annotations
def      A__       (    SCREAMING_SNAKE_CASE_   :      int						)  ->  bool:






   """simple docstring"""







   _UpperCAmelCase           =   str(SCREAMING_SNAKE_CASE_						)
   return len(SCREAMING_SNAKE_CASE_						) == 9 and set(SCREAMING_SNAKE_CASE_						) == set('''123456789'''						)
def      A__       (    )  ->  int | None:






   """simple docstring"""







   for base_num in range(99_99				,	49_99				,	-1						):
      _UpperCAmelCase           =   10_00_02 * base_num
      if is_9_pandigital(SCREAMING_SNAKE_CASE_						):
         return candidate

   for base_num in range(3_33				,	99				,	-1						):
      _UpperCAmelCase           =   1_00_20_03 * base_num
      if is_9_pandigital(SCREAMING_SNAKE_CASE_						):
         return candidate

   return None


if __name__ == "__main__":
   print(f'''{solution() = }''')