Sahiljawale / CodeChef

This repository contains solutions for problems on codechef.com
https://www.codechef.com/problems/school/
MIT License
17 stars 70 forks source link

GCD and LCM of A and B #114

Closed abhishekb13402 closed 2 years ago

abhishekb13402 commented 2 years ago

/* Problem Two integers A and B are the inputs. Write a program to find GCD and LCM of A and B.

Input Format The first line contains an integer T, total number of testcases. Then follow T lines, each line contains an integer A and B.

Output Format Display the GCD and LCM of A and B separated by space respectively. The answer for each test case must be displayed in a new line.

Input 3 120 140 10213 312 10 30

Output 20 840 1 3186456 10 30 */