#P5719. 【深基4.例3】分类平均
【深基4.例3】分类平均
Problem Description
Given and , all positive integers from to can be divided into two groups. Group A consists of numbers that are divisible by (that is, multiples of ), and Group B consists of numbers that are not. Output the average of each group, accurate to digit after the decimal point, separated by a space.
The testdata guarantees that the number of elements in both groups will not be .
Input Format
Input two positive integers and .
Output Format
Output one line with two real numbers, representing the averages of Group A and Group B, respectively. Keep exactly one digit after the decimal point.
100 16
56.0 50.1
Hint
Constraints: , .
Translated by ChatGPT 5