Trapezoids

AtCoder
IDabc045_a
Time2000ms
Memory256MB
Difficulty
You are given a trapezoid. The lengths of its upper base, lower base, and height are $a$, $b$, and $h$, respectively. ![image](https://atcoder.jp/img/arc061/1158e37155d46a42e90f31566478e6da.png)An example of a trapezoid Find the area of this trapezoid. ## Constraints * $1≦a≦100$ * $1≦b≦100$ * $1≦h≦100$ * All input values are integers. * $h$ is even. ## Input The input is given from Standard Input in the following format: $a$ $b$ $h$ [samples]
Samples
Input #1
3
4
2
Output #1
7

When the lengths of the upper base, lower base, and height are $3$, $4$, and $2$, respectively, the area of the trapezoid is $(3+4)×2/2 = 7$.
Input #2
4
4
4
Output #2
16

In this case, a parallelogram is given, which is also a trapezoid.
API Response (JSON)
{
  "problem": {
    "name": "Trapezoids",
    "description": {
      "content": "You are given a trapezoid. The lengths of its upper base, lower base, and height are $a$, $b$, and $h$, respectively. ![image](https://atcoder.jp/img/arc061/1158e37155d46a42e90f31566478e6da.png)An ex",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc045_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a trapezoid. The lengths of its upper base, lower base, and height are $a$, $b$, and $h$, respectively.\n\n![image](https://atcoder.jp/img/arc061/1158e37155d46a42e90f31566478e6da.png)An ex...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments