Problem:


Score : 100 points

Problem Statement

You are given a trapezoid. The lengths of its upper base, lower base, and height are a, b, and h, respectively.

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

Output

Print the area of the given trapezoid. It is guaranteed that the area is an integer.

Sample Input 1

3
4
2

Sample 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.

Sample Input 2

4
4
4

Sample Output 2

16

In this case, a parallelogram is given, which is also a trapezoid.



Sample input:
3
4
2


Sample output:
7

Submission status: Accepted

Solution code:
import sys


def getN():
    return int(input())


def getNM():
    return map(int, input().split())


def getList():
    return list(map(int, input().split()))


def input():
    return sys.stdin.readline().rstrip()


#############
# Main Code #
#############
a = getN()
b = getN()
h = getN()
print(h * (a + b) // 2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
a = a*h
b = b*h
ans = (a+b)//2
print(ans)

Submission status: Accepted

Solution code:
l=[int(input())for i in range(3)]
print((l[1]+l[0])*l[2]//2)

Submission status: Accepted

Solution code:
a,b,h=int(input()),int(input()),int(input())
print(int((a+b)*h/2))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())


area = (a+b)*h//2
print(area)

Submission status: Accepted

Solution code:
#入力
a = int(input())
b = int(input())
h = int(input())

#出力
print(int(((a + b) * h) / 2))

Submission status: Accepted

Solution code:
def atcoderA():
    n = []
    for i in range(3):
        n.append(input())
    print(int((int(n[0])+int(n[1]))*int(n[2])/2))

atcoderA()

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())

ans = (a+b) *c /2
print(int(ans))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print((a + b) * h //2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
x = lambda a, b, h: int((a+b)*h/2)
print(x(a, b, h))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())
print(round(((a+b)*h)/2))

Submission status: Accepted

Solution code:
print((int(input()) + int(input())) * int(input()) // 2)

Submission status: Accepted

Solution code:
a,b,h=map(int,open(0))
print((a+b)*h//2)

Submission status: Accepted

Solution code:
#ABC045A
a=int(input())
b=int(input())
c=int(input())

s=(a+b)*c*1/2
print(int(s))

Submission status: Accepted

Solution code:
from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

def main():
    a = int(input())
    b = int(input())
    c = int(input())

    print((a + b) * c // 2)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding:utf-8


def main():
    a = int(input())
    b = int(input())
    h = int(input())
    s = (a + b) * h >> 1
    return s


if __name__ == '__main__':
    s = main()
    print(s)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
#print(a)
#print(b)
#print(h)

ans = (a + b)*h/2
#print(ans)

ans_int = int(ans) #int型に変換
print(ans_int)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print(int((a+b)*h/2))

Submission status: Accepted

Solution code:
a, b, h = [int(input()) for i in range(3)]
print(int((a + b) * h / 2))

Submission status: Accepted

Solution code:
def actual(a, b, h):
    return int((a + b) * h / 2)

a = int(input())
b = int(input())
h = int(input())

print(actual(a, b, h))

Submission status: Accepted

Solution code:
a, b, h = [int(input()) for i in range(3)]

menseki = ((a + b) * h) // 2

print(menseki)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

a = int(input())
b = int(input())
h = int(input())

print(int((a + b) * h / 2))

Submission status: Accepted

Solution code:
n=[int(input()) for _ in range(3)]
print(((n[0]+n[1])*n[2])//2)

Submission status: Accepted

Solution code:
def main():
    a = int(input())
    b = int(input())
    h = int(input())

    square = a * h
    triangle = ((b - a) * h) //2
    print(square + triangle)
main()

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())

A=int(int(a)+int(b))
B=int(int(A)*int(h)/2)

print(int(B))

Submission status: Accepted

Solution code:
def area():
    a =int(input())
    b =int(input())
    h =int(input())
    ans = int(0.5 * (a + b) * h)
    print(ans)

area()

Submission status: Accepted

Solution code:

a = int(input())
b = int(input())
h = int(input())

print(int((a+b)*h/2))

Submission status: Accepted

Solution code:


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    a = read_int()
    b = read_int()
    h = read_int()
    return (a+b)*h//2


if __name__ == '__main__':
    print(solve())

Submission status: Accepted

Solution code:
a,b,c=map(int,open(0).read().split())
print((a+b)*c//2)

Submission status: Accepted

Solution code:
a, b, h = map(int, open(0).read().split())
print((a + b) * h // 2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
 
print( int((a + b) * h / 2) )

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())

print(((a+b)*h)//2)

Submission status: Accepted

Solution code:
a,b,h = map(int,open(0))
print((a+b)*h//2)

Submission status: Accepted

Solution code:
l = [int(input()) for _ in range(3)]
a,b,h = l[0],l[1],l[2]

print(((a+b)*h)//2)

Submission status: Accepted

Solution code:
import sys
import numpy as np
import random
from decimal import Decimal
import itertools
import re
import bisect
from collections import deque, Counter
from functools import lru_cache

sys.setrecursionlimit(10**9)
INF = 10**13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
def SERIES(n): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ')
def GRID(h,w): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ').reshape(h,-1)[:,:w]
def GRIDfromString(h,w): return np.frombuffer(sys.stdin.buffer.read(), 'S1').reshape(h,-1)[:,:w]
MOD = 1000000007

def main():
	a, b, h = IR(3)
	print((a+b)*h//2)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
'''     ##     ##  #######  # #  ######
        ##     ##  ##   ##  ###    ##
        ##     ##  ##    #  # #    ##
        #########  #######  # #    ##    '''

import sys
import math
# sys.setrecursionlimit(10**6)

def get_ints(): return map(int, input().strip().split())
def get_list(): return list(get_ints())

def printspx(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")
def printchk(*args): return print(*args, end=" \ ")

MODPRIME = int(1e9+7); BABYMODPR = 998244353;

ONLINE_JUDGE = 1
if not ONLINE_JUDGE:
    sys.stdin  = open("input.txt","r")
    sys.stdout = open("output.txt","w")
    sys.stderr = open("output.txt","w")

# for _testcases_ in range(int(input())):
a = int(input())
b = int(input())
h = int(input())
print(((a+b)*h)//2)
'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS BY ME @luctivud ( UDIT GUPTA )
SOME PARTS OF THE CODE HAS BEEN TAKEN FROM WEBSITES LIKE::
(I Own the code if no link is provided here or I may have missed mentioning it)
DO NOT PLAGIARISE.
TESTCASES:
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print(int((a + b)*h*0.5))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print(int((a+b)*h /2))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

print( int((a+b)*h/2) )

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print((a+b)*h//2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print(int((a+b)/2*h))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
res = (a + b) * h // 2
print(res)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

a = int(input())
b = int(input())
h = int(input())
print((a+b)*h//2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

ans = ((a+b) * h)/2

print(int(ans))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

S = (a+b) * h / 2
print( int(S))

Submission status: Accepted

Solution code:
a, b, h = [int(input()) for _ in range(3)]
print((a+b)*h//2)

Submission status: Accepted

Solution code:
a, b, h = map(int,[input() for i in range(3)])

s = (a+b)*h/2

print(int(s))

Submission status: Accepted

Solution code:
a = [int(input()) for i in range(3)]
print((a[0]+a[1])*a[2]//2)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here
a, b, h = [int(input()) for _ in range(3)]
print(int((a+b)*h/2))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())
s = (a+b)*c//2
print(s)

Submission status: Accepted

Solution code:
import sys
def I(): return int(sys.stdin.readline().rstrip())
a,b,h = [I() for _ in range(3)]
print((a+b)*h//2)

Submission status: Accepted

Solution code:
import sys

def ans(a, b, h) :
  return int((1 / 2) * (a + b) * h)

lis = list()

for line in sys.stdin : 
  lis.append(int(line))
  
print(ans(lis[0], lis[1], lis[2]))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(a: int, b: int, h: int):
    res = (a + b) * h / 2
    return int(res)


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    h = int(next(tokens))  # type: int
    print(solve(a, b, h))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())

print((a+b)*c//2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

S = (a + b) * h //2

print(S)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

ans = (a + b) * h // 2
print(ans)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())

s=(a+b)*h//2

print(s)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())

print((a+b)*h//2)

Submission status: Accepted

Solution code:
top=int(input())
bottom=int(input())
height=int(input())
 
num=top+bottom
 
ans=int(num*height/2)
 
print(str(ans))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())
print(int((a+b)*h/2))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h =int(input())
print(int((a+b)*h/2))

Submission status: Accepted

Solution code:
#上底の長さ
a = input()
#下底の長さ
b = input()
#高さ
h = input()
#答え
ans = 0
#文字列を数値化しつつ
#(上底+下低)*高さ/2で台形の面積を求める
ans = (int(a) + int(b)) * int(h) / 2
#答えを出力
#小数点以下が表示されるのでround()で非表示にしている
print(round(ans))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print(( a + b ) * h // 2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

print(int((a+b)*h / 2))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print(int((a + b)*h /2))

Submission status: Accepted

Solution code:
#上底
a = int(input())
#下底
b = int(input())
#高さ
h = int(input())
#面積
area = (a+b)*h/2
print(int(area))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())
print(((a+b)*h)//2)

Submission status: Accepted

Solution code:
a,b,h = map(int,open(0).read().split())

print(int((a+b)/2*h))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = 0
e = 0
d = a + b
e = d * c // 2
print(e)

Submission status: Accepted

Solution code:
N=int(input())
K=int(input())
X=int(input())
print((N+K)*X//2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

s = 0
if 1 <= a <= 100 and 1 <= b <= 100 and 1 <= h <= 100 and h % 2 == 0:
  s = (a + b) * h / 2
  print(int(s))

Submission status: Accepted

Solution code:
a,b,h=[int(input()) for i in range(3)]
print(int((a+b)*h/2))

Submission status: Accepted

Solution code:
l = [int(input()) for i in range(3)]
print(int((l[0] + l[1]) * l[2] / 2))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

result = int((a + b) * h /2)
print(result)

Submission status: Accepted

Solution code:
list = [int(input()) for i in range(3)]
print (int((list[0]+list[1]) * list[2] / 2))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

print(int((a + b) * h / 2 ))

Submission status: Accepted

Solution code:
import sys
import math
 
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
 
def main():
  a = int(input())
  b = int(input())
  h = int(input())
  
  print(int((a+b)*h/2))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

result = (a+b) * h /2
print(int(result))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
b = int(input())
h = int(input())

S = 0
S = (a+b)*h/2
print(int(S))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())
ans=(a+b)*h//2
print(ans)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())
sum=(a+b)*h//2
print(sum)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

def area():
    return (a+b)*h/2

print(int(area()))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print((a+b) *h //2)

Submission status: Accepted

Solution code:

a=int(input())
b=int(input())
h=int(input())

print(int((a+b)*h/2))

Submission status: Accepted

Solution code:
import math
a = int(input())
b = int(input())
h = int(input())
print(math.floor((a+b)*h/2))

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

a = int(input())
b = int(input())
c = int(input())
print((a + b) * c // 2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
S = int((a+b)*h/2)

print("{}".format(S))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

ans = int((a+b)*h/2)

print(ans)

Submission status: Accepted

Solution code:
upper, lower, height = (int(input()) for i in range(3))
print(int((upper + lower) * height / 2))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())
print(int(((a+b)*h)/2))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())
i=h*(a+b)//2
print(i)

Submission status: Accepted

Solution code:
a, b, h = map(int, [input() for i in range(3)])
ans = (a + b) * h / 2
print(int(ans))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
 
area = (a + b)*h//2
print(area)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

area = (a + b)*h//2
print(area)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

print((a+b)*h//2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
ans = (a+b)*h//2
print(ans)

Submission status: Accepted

Solution code:
a,b,h = (int(input()) for _ in [0]*3)
print((a+b)*h//2)

Submission status: Accepted

Solution code:
x = int(input())
y = int(input())
z = int(input())
print(int((x+y)*z/2))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print(int((a + b) * h * 0.5))

Submission status: Accepted

Solution code:
from sys import stdin

def I(): return int(stdin.readline().rstrip())

a,b,h = [I() for i in range(3)]

ans = int((a+b)*h/2)

print(ans)

Submission status: Accepted

Solution code:
top, bottom, height = [int(input()) for i in range(3)]
result = (top + bottom) * height // 2
print(result)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
ans = (a+b)*h/2
print(int(ans))

Submission status: Accepted

Solution code:
def main():
    a=int(input())
    b=int(input())
    h=int(input())
    print((a+b)*h//2)
if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys


def input():
    return sys.stdin.readline()


def resolve():
    a = int(input().rstrip())
    b = int(input().rstrip())
    h = int(input().rstrip())

    s = (a+b)*h / 2

    print(int(s))


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()

a = int(input())
b = int(input())
h = int(input())

print(((a+b)*h)//2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
s = int((a + b) * h / 2)
print(s)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
# import math
# from string import ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)


def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1               # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    a = ii()
    b = ii()
    h = ii()
    print((a + b) * h // 2)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a, b, h = [int(input()) for i in range(3)]
print((a + b) * h // 2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
s = int(0.5*(a+b)*h)
print(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri May 15 12:41:57 2020

@author: shinba
"""

a = int(input())
b = int(input())
h = int(input())

print(int((a+b)*h/2))

Submission status: Accepted

Solution code:
def main():
 num =  [int(input()) for i in range(3)]
 print(int((num[0]+num[1])*num[2]/2))

main()

Submission status: Accepted

Solution code:
params = [int(input()) for i in range(3)]

a = params[0]
b = params[1]
h = params[2]

print(int((a + b)*h/2))

Submission status: Accepted

Solution code:
a,b,h = int(input()),int(input()),int(input())
print((a+b)*h//2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print((h*(a+b))//2)

Submission status: Accepted

Solution code:
import sys
from itertools import permutations

def solve():
    input = sys.stdin.readline
    a = int(input())
    b = int(input())
    h = int(input())
    print((a + b) * h // 2)
    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
def main():
    a = int(input())
    b = int(input())
    h = int(input())
    print((a+b)*h//2)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    a=int(input())
    b=int(input())
    h=int(input())
    print(((a+b)*h)//2)
resolve()

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

print((a+b) * h // 2)

Submission status: Accepted

Solution code:
def resolve():
  a = int(input())
  b = int(input())
  h = int(input())
  print(((a+b) * h) // 2)
  return

if __name__ == "__main__":
  resolve()

Submission status: Accepted

Solution code:
a = int(input())
b= int(input())
h = int(input())
 
ans = (a+b)*h//2
 
print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

a = int(input())
b = int(input())
h = int(input())

print((a + b) * h // 2)

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())
k=(a+b)*h//2
print(k)

Submission status: Accepted

Solution code:
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
# from math import gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint

INF = float("inf")

def myinput():
    return map(int,input().split())

def mylistinput(n):
    return [ list(myinput()) for _ in range(n) ]

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

def MS():
    return input().split()

def RS():
    return list(input().split())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input().split()) for _ in range(n) ]

a = I()
b = I()
h = I()

ans = (a+b)*h//2
print(ans)

Submission status: Accepted

Solution code:
from sys import exit
a = int(input())
b = int(input())
h = int(input())

print((a+b)*h//2)

Submission status: Accepted

Solution code:
a, b, h = int(input()), int(input()), int(input())
print((a+b) * h // 2)

Submission status: Accepted

Solution code:
a =int(input())
b = int(input())
h = int(input())
print((a+b)*h//2)

Submission status: Accepted

Solution code:
s = [int(input()) for i in range(3)]
print(int((s[0]+s[1])*s[2]/2))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#############
# Main Code #
#############

a,b,h = inputILs(3)

print(((a+b)*h)//2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
print(((a + b) * h) // 2)

Submission status: Accepted

Solution code:
a, b, h = (int(input()) for _ in range(3))
s = (a + b) * h // 2
print(s)

Submission status: Accepted

Solution code:
s = [int(input())for i in range(3)]
print(int((s[0] + s[1]) * s[2] / 2))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())
print((a+b)*(c//2))

Submission status: Accepted

Solution code:
import sys
import math
import bisect
 
def main():
    a = int(input())
    b = int(input())
    h = int(input())
    print((a + b) * h // 2)
 
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
ue = int(input())
sita = int(input())
takasa = int(input())
men = (ue+sita)*takasa/2
print(int(men))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, b, h = map(int, open(0))


print((a + b) * h >> 1)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

inputs = [int(input()) for i in range(3)]

ans = ((int(inputs[0]) + int(inputs[1]))*int(inputs[2]))/2

print(int(ans))

Submission status: Accepted

Solution code:
def q1():
    a = int(input())
    b = int(input())
    h = int(input())
    ans = (a+b)*h//2
    return ans


if __name__ == '__main__':
    print(q1())

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())

print(int((a + b) * h / 2))

Submission status: Accepted

Solution code:
a=int(input())
b=int(input())
h=int(input())
A=(a+b)/2*h
print(int(A))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())

S = (a + b) * h / 2
print(int(S))

Submission status: Accepted

Solution code:
a= int(input())
b= int(input())
h= int(input())
print((a+b)*h//2)

Submission status: Accepted

Solution code:
a=[int(input()) for i in range(3)]
print(int((a[0]+a[1])*a[2]/2))

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
c = int(input())
print((a+b)*c//2)

Submission status: Accepted

Solution code:
a = int(input())
b = int(input())
h = int(input())
ans = (a + b) * h / 2

print(int(ans))

Submission status: Accepted

Solution code:
def main():
    a = int(input())
    b = int(input())
    h = int(input())

    print((a + b) * h // 2)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a, b, h = int(input()), int(input()), int(input())
print(int((a+b)/2 * h))

Submission status: Accepted

Solution code:
A = int(input())
B = int(input())
H = int(input())
print((A+B)*H//2)