#PCBBAY0000035. Tỉ lệ phần trăm từ hai đại lượng (Percentage from Two Quantities)
Tỉ lệ phần trăm từ hai đại lượng (Percentage from Two Quantities)
Percentage from Two Quantities
Version: Phuoc Hung OJ Extended
Problem Statement
Given real quantities and , where is a part of total , compute the ratio and display it as a percentage. Print with exactly 2 decimal places and a trailing % character.
Input
The only line contains real numbers and , in that order.
Output
Print as a percentage with exactly 2 decimal places and a trailing %.
Subtasks
- Subtask 1 (100 points): ; .
Examples
Example 1
Input
3 8
Output
37.50%
Explanation. Substituting 3, 8 into (a / b) × 100% gives approximately 37.5. The required output formatting produces 37.50%.
Example 2
Input
1 3
Output
33.33%
Explanation. Substituting 1, 3 into (a / b) × 100% gives approximately 33.3333333333. The required output formatting produces 33.33%.
Example 3
Input
0 10
Output
0.00%
Explanation. Substituting 0, 10 into (a / b) × 100% gives approximately 0. The required output formatting produces 0.00%.