with open("./switch-case.c", mode='w') as file:
    num = 100000
    file.write("int comp(int x) {\n    switch (x) {\n")
    for i in range(num):
        s = f"        case {i}: return {i};\n"
        file.write(s)
    file.write("    }\n}")
    file.write(f"\n\nint main(void) {{\n    for (int i = 0; i < {num}; i++) {{\n        comp(i);\n    }}\n    return 0;\n}}\n")
