Compare Fractions a/b and c/d
Computer Mathematics
Hard
3 views
Problem Description
Compare two fractions without floating point. Print , or =.
Input Format
Four integers a b c d.
Output Format
One char: < or > or =.
Constraints
b,d != 0, values fit in 64-bit
Official Solution
Compare a*d and c*b using integer multiplication. If a*d < c*b print < etc.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!