PAT(Advanced Level)刷题指南 —— 第四弹

一、1104 Sum of Number Segments

1. 问题描述

在这里插入图片描述

2. Sample Input

4
0.1 0.2 0.3 0.4

3. Sample Output

5.00

4. 题解

思路:打表,比如4个数,第一个数出现1*(4) = 4次,第二个数出现2*(4 - 1) 

猜你喜欢

转载自blog.csdn.net/m0_51339444/article/details/132141872
今日推荐