【AtCoder-4245】解题报告(水题)
原始题目
A - Garden
- Time limit : 2sec / Memory limit : 1000MB
- Score: 100 points
Problem Statement
There is a farm whose length and width are A yard and B yard, respectively. A farmer, John, made a vertical road and a horizontal road inside the farm from one border to another, as shown below: (The gray part represents the roads.) 1.jpg
Note
It can be proved that the positions of the roads do not affect the area.
Constraints
- A is an integer between 2 and 100 (inclusive).
- B is an integer between 2 and 100 (inclusive).
Input
Input is given from Standard Input in the following format:
A B
Output
Print the area of this yard excluding the roads (in square yards).
Sample Input 1
2 2
Sample Output 1
1
In this case, the area is 1 square yard.
Sample Input 2
5 7
Sample Output 2
24
In this case, the area is 24 square yards.
题目大意
一个矩形哇横纵两条宽度为1的道路,问剩下的面积
解题思路
小学计算题,秒之
解题代码
1 |
|
收获与反思
无
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!