请在 下方输入 要搜索的题目:

Lao Wang sold apples in n days (n < = 5).For example, n is five days. On the first day, he sold half of all the apples plus half an apple; The next day, he sold one third of the remaining apples plus one third of an apple; On the third day, he sold 1/4 of the remaining apples plus 1/4 of an apple; On the fourth day, he sold 1/5 of the remaining apples and 1/5 of an apple, and on the last day, he sold the remaining 11 apples.Input n and output the number of apples at the beginning (you can't cut the apples when you sell them).The intput is an integer which is no more than 5The output is an integer.We will test 5 kinds of data. Your will get all the scores if your code pass 5 times of judge.Submit your porgram here.

Lao Wang sold apples in n days (n < = 5).For example, n is five days. On the first day, he sold half of all the apples plus half an apple; The next day, he sold one third of the remaining apples plus one third of an apple; On the third day, he sold 1/4 of the remaining apples plus 1/4 of an apple; On the fourth day, he sold 1/5 of the remaining apples and 1/5 of an apple, and on the last day, he sold the remaining 11 apples.Input n and output the number of apples at the beginning (you can't cut the apples when you sell them).The intput is an integer which is no more than 5The output is an integer.We will test 5 kinds of data. Your will get all the scores if your code pass 5 times of judge.Submit your porgram here.

发布时间:2024-09-30 13:35:23
推荐参考答案 ( 由 搜搜题库网 官方老师解答 )
联系客服
答案:
专业技术学习
搜搜题找答案
用户信息
没有账号?点我注册
专业技术学习
登录 - 搜搜题库网
立即注册
注册 - 搜搜题库网
验证码
立即登录