問題一覧 > 通常問題

No.926 Average Number of Holidays

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 小数誤差許容問題 絶対誤差または相対誤差が $10^{-6}$ 以下。ただし、ジャッジ側の都合で500桁未満にしてください
タグ : (AC するまで非表示) / 解いたユーザー数 523
作問者 : 👑 CleyL / テスター : tyawanmusi
お気に入りにしたユーザー ProblemId : 3608 / 自分の提出
問題文最終更新日: 2019-11-15 23:12:40
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Show the original
yukicoder contest 231 (順位表) の他の問題:

Problem Statement

In the world where Raki lives, a year has $A$ days, a week has $B$ days, and $C$ days of each week are holidays.

Raki became curious about the average number of holidays in one year.
Please find the average number of holidays in one year for Raki.

Assume that there are no leap years, public holidays, or the like.

It can be proved that the average number of holidays does not change even if the positions of the holidays within a week change.

Input

$A\ B\ C$

$A$ is the number of days in a year ($1 \le A \le 1000$),
$B$ is the number of days in a week ($1 \le B \le 1000$),
and $C$ is the number of holidays in a week (($0 \le C \le B$).

Output

Output the average number of holidays.
Your answer is accepted if at least one of its absolute error or relative error is at most $10^{-6} $.

Sample

Sample 1
Input
365 7 2
Output
104.28571428

This is the ordinary Gregorian calendar.
As this sample shows, there are no leap years, public holidays, or the like.

Sample 2
Input
10 20 20
Output
10.00000000

A week may be longer than the one-year cycle.

Sample 3
Input
1000 7 0
Output
0.0000000

Mon Mon Tue Wed Thu Fri Fri

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。