Reduce Ratio
Computer Mathematics
Medium
2 views
Problem Description
Given a and b, print the reduced ratio a:b.
Input Format
Two integers a b.
Output Format
Two integers p q.
Official Solution
Compute g=gcd(a,b). Print a/g and b/g.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!