FastPrepFastPrep
Problem Brief

Calculate y/x using Patch

INTERNOA

Given two integers y and x, compute y / x.

Assume x is non-zero and return the result formatted to exactly two decimal places.

1Example 1

Input
y = 10, x = 2
Output
"5.00"
Explanation

10 / 2 = 5, formatted to two decimal places as 5.00.

Constraints

Limits and guarantees your solution can rely on.

  • x != 0
  • Use two digits after the decimal point in the returned string.
public String calculateRatio(int y, int x) {
  // write your code here
}
Input

y

10

x

2

Output

"5.00"

Sign in to submit your solution.