英语翻译17

https://www.luogu.com.cn/problem/CF13A

题目描述

Little Petya likes numbers a lot. He found that number 123 in base 16 consists of two digits: the first is 7 and the second is 11. So the sum of digits of 123 in base 16 is equal to 18.

 

Now he wonders what is an average value of sum of digits of the number AA written in all bases from 22 to A-1A−1 .

 

Note that all computations should be done in base 10. You should find the result as an irreducible fraction, written in base 10.

 

输入格式

Input contains one integer number AA ( 3<=A<=10003<=A<=1000 ).

 

输出格式

Output should contain required average value in format «X/Y», where X is the numerator and Y is the denominator.

L喜欢一写数字,他发现数字123在16进制下第一个数是7第二个数是11这两个数之和为18。现在他想知道数字A在进制2到A-1之下每位数字之和的平均数输出数字用十进制表示

输入一个整数A

输出结果为X/Y,X表示数字之和,Y为分母

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值