Skip to content
On this page

01_Expr_08.py

WARNING

โค้ดกาวมากครับ อย่าลอกเลย 😭😭😭

ทำเองเถอะนะครับ จะได้ทำข้อสอบได้ 🥲🥲🥲

py
# pylint: disable=exec-used

import math
from functools import reduce


def sqrt_n_times(x, n):
    return reduce(lambda prev, curr: math.sqrt(prev), range(n), x)


def cube_root(y):
    return reduce(
        lambda prev, curr: prev * sqrt_n_times(prev, 2 ** curr),
        range(1, 6),
        sqrt_n_times(y, 2))


def main():
    q = float(input())
    print(cube_root(q))


exec(input())

People who plagiarize Com Prog HW:

People who do Com Prog HW by themself:

Released under the MIT License