# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import random, math

n = int(input('请输入一个大于0的整数，回车结束。'))
m = int(input('请输入一个大于0的整数，回车结束。'))
k = int(input('请输入一个大于m的整数，回车结束。'))

i = 0
sum = 0
total = 0

while i < n:
    i += 1
    number = random.randint(m, k)
    a = math.log(number)
    b = 1/a
    sum += a
    total += b
print(sum)
print(total)


StarcoderdataJupyterScriptsDedupFiltered