QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 128 MB Total points: 10

#10635. Stół [B]

統計

Bajtazar 在网上购买家具。他已经找到了一张漂亮的桌子和一套椅子。现在他在思考,可以购买多少把椅子,使得它们都能放在桌子旁边。

桌子的桌面是一个长方形,尺寸为 $A \times B$ 厘米。而椅子的座位从上方看是一个边长为 $K \times K$ 厘米的正方形。接下来我们将把桌子看作一个矩形,把椅子看作正方形。

在椅子的某一条边上(正方形的一边)有一个靠背。每把椅子都必须用靠背那一边靠着桌子,也就是说,带靠背的那一边必须与桌子的某一边重合。此外,椅子的座位必须 完全 位于桌面之下。当然,任何两把椅子不得重叠。在我们的讨论中,将忽略桌子的腿(我们可以假设它们无限细,并位于桌面的四角)。那么,有多少把椅子可以放在桌子旁边呢?

输入格式

输入的唯一一行包含三个整数 $A$、$B$ 和 $K$($1 \le A, B, K \le 500,000,000$),分别表示桌面尺寸和椅子座位的边长。

输出格式

你的程序应该输出可以放在桌子旁边的最大椅子数量。

示例

输入

15 18 4

输出

10

图示展示了椅子在桌子旁边的一个示例摆放方式。靠背用加粗的线段表示。不可能再放第十一把椅子。

problem_10635_1.gif

输入 2

12 8 4

输出 2

6
About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.