小张想变强
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
小张刚上小学三年级,需要高效的练习分数加减法,小张想你帮忙写一个程序,能快速给出结果,用来验证他的答案是否正确
输入格式
第一行,一个整数 n,表示分数的个数;
第二行,n个字符串, 表示为,即一个分数;
输出格式
一行,一个字符串,表示求和后的最简分数(答案确保不为0)
输入输出样例 #1
输入 #1
2
1/4 1/4
输出 #1
1/2
输入输出样例 #2
输入 #2
5
-1/2 1/2 -1/2 1/2 -1/2
输出 #2
-1/2
说明/提示
数据范围 对于100%的数据 , ,
第三届吉利学院大学生程序设计竞赛
- Status
- Done
- Rule
- XCPC
- Problem
- 10
- Start at
- 2025-11-23 9:00
- End at
- 2025-11-23 12:00
- Duration
- 3 hour(s)
- Host
- Partic.
- 68