-
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
-
Design of Filters using GUI
Design of Filters using GUI -The code provides the user friendly GUI usage in filter design
- 2022-03-21 10:44:06下载
- 积分:1
-
ng加载动画特效
是一款HTML5和CSS3炫酷彩色long加载动画特效。(HTML5 and CSS3 are cool color long loading animation effects.)
- 2019-02-11 13:32:30下载
- 积分:1
-
MVO
说明: 多元宇宙优化算法,实现对CEC 2017目标函数的求值(multi universe optimization)
- 2021-03-29 10:25:43下载
- 积分:1
-
MF2002_PureX
轮胎魔术公式的纯纵向力工况的轮胎模型仿真(Pure longitudinal force condition of tire magic formula)
- 2017-07-10 00:19:13下载
- 积分:1
-
pmsg+erjiguan
永磁同步风力发电机+二极管整流+boost升压控制,实现直流电能输出。(Permanent magnet synchronous wind generator + diode rectifier +boost boost control to achieve DC power output.)
- 2017-12-12 15:09:20下载
- 积分:1
-
使用蒙特卡洛采样 MonteCarlo
说明: 使用蒙特卡洛采样,计算圆柱体、立方体和四棱锥三个物体相交部分的体积(Monte Carlo sampling is used to calculate the volume of the intersecting parts of a cylinder, a cube and a quadripyramid.)
- 2020-12-10 14:19:20下载
- 积分:1
-
Linux_3.x.x_4.x.x_VCP_Driver_Source
usb can 驱动程序,用于调试运行usb can(USB can driver, so you can use it to debug usb can)
- 2020-06-15 22:22:58下载
- 积分:1
-
导热matlab
实现二维非稳态导热计算, 使用有限差分法(Calculation of two-dimensional unsteady thermal conduction)
- 2021-03-19 09:29:20下载
- 积分:1
-
Golf game sources. Operational system: DOS. Compiles OK in Quickbasic.
Golf game sources. Operational system: DOS. Compiles OK in Quickbasic.
- 2022-02-12 02:33:38下载
- 积分:1