import json import os def run_lc_sync(mode): # Your LeetCode logic here... output_filename = f"lc_{mode}_data.json" # Dummy data for example data = {"status": "success", "mode": mode, "problems": []} with open(output_filename, "w") as f: json.dump(data, f) return os.path.abspath(output_filename)