-
PAT
Given N rational numbers in the form "numerator/denominator", you are supposed to calculate their sum.
输入描述:
Each input file contains one test case. Each case starts with a positive integer N (<=100), followed in the next line N rational numbers "a1/b1 a2/b2 ..." where all the numerators and denominators are in the range of "long int". If there is a negative number, then the sign must appear in front of the numerator.
输出描述:
For each test case, output the sum in the simplest form "integer numerator/denominator" where "integer" is the integer part of the sum, "numerator" < "denominator", and the numerator and the denominator have no common factor. You must output only the fractional part if the integer part is 0.(Input Description:
Each input file contains one test case. Each case starts with a positive integer N (<=100), followed in the next line N rational numbers "a1/b1 a2/b2 ..." where all the numerators and denominators are in the range of "long int". If there is a negative number, then the sign must appear in front of the numerator.
Output Description:
For each test case, output the sum in the simplest form "integer numerator/denominator" where "integer" is the integer part of the sum, "numerator" < "denominator", and the numerator and the denominator have no common factor. You must output only the fractional part if the integer part is 0.)
- 2019-03-02 14:33:27下载
- 积分:1
-
MIS&COMPOS-GMC参数配置
银联POS设置教程啊啊啊,MIS,POS,GMC(UnionPay POS Setup Course)
- 2020-06-16 06:00:02下载
- 积分:1
-
有限元模拟后,节点数据提取,marc二次开发程序
有限元模拟后,节点数据提取,marc二次开发程序-Finite element simulation, the node data extraction, marc secondary development program
- 2022-05-15 17:17:01下载
- 积分:1
-
比较完善的CRC编码VerilogHDL描述
比较完善的CRC编码VerilogHDL描述-more perfect description of CRC coding VerilogHDL
- 2023-08-15 20:00:03下载
- 积分:1
-
c++编程的几个小例子
c++编程的几个小例子-several small examples
- 2022-12-13 01:20:02下载
- 积分:1
-
260_260
回归用的系统语句语言,可用于多元线性中的阶层回归或逐步帝景回归,控制变量等皆已设置(for regression lkjdfjaslkfklasdjfl;kj;adsf)
- 2018-02-09 11:43:47下载
- 积分:1
-
VB6.0的USB HID访问示例代码和通用模块文件
vb6.0 访问USB HID设备的示例代码和通用模块文件-vb6.0 USB HID visit the sample code modules and common document
- 2022-12-28 12:50:03下载
- 积分:1
-
自做的时钟原码,看看吧
自做的时钟原码,看看吧-done clock since the original code, let"s see it
- 2022-05-17 06:56:16下载
- 积分:1
-
0306_mic
说明: 使用第三方库minepy进行MIC相关性分析,通过导入minepy中的MINE计算MIC。(Use the third-party library minepy for MIC correlation analysis.)
- 2020-03-27 14:57:12下载
- 积分:1
-
实现简单的分割视图并在其中实现计数器功能,以及简单的绘图...
实现简单的分割视图并在其中实现计数器功能,以及简单的绘图-simple segmentation View in which to achieve and counter functions, and simple graphics
- 2022-04-08 23:14:07下载
- 积分:1