F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

a/b + c/d

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 26517    Accepted Submission(s): 13650


Problem Description
����2�������������ǵĺͣ���Ҫ���Ϊ�����ʽ��
 

Input
�������Ȱ���һ��������T��T<=1000������ʾ��T��������ݣ�Ȼ����T�����ݣ�ÿ�а����ĸ�������a,b,c,d��0<a,b,c,d<1000������ʾ��������a/b �� c/d��
 

Output
����ÿ��������ݣ������������e��f����ʾa/b + c/d����򻯽����e/f��ÿ�����ռһ�С�
 

Sample Input
2 1 2 1 3 4 3 2 3
 

Sample Output
5 6 2 1
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-08-07 10:00:42, Gzip enabled