Problem:


Score : 200 points

Problem Statement

We have a board with H horizontal rows and W vertical columns of squares.
There is a bishop at the top-left square on this board.
How many squares can this bishop reach by zero or more movements?

Here the bishop can only move diagonally.
More formally, the bishop can move from the square at the r_1-th row (from the top) and the c_1-th column (from the left) to the square at the r_2-th row and the c_2-th column if and only if exactly one of the following holds:

r_1 + c_1 = r_2 + c_2

r_1 - c_1 = r_2 - c_2

For example, in the following figure, the bishop can move to any of the red squares in one move:

Constraints

1 \leq H, W \leq 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

H \ W

Output

Print the number of squares the bishop can reach.

Sample Input 1

4 5

Sample Output 1

10

The bishop can reach the cyan squares in the following figure:

Sample Input 2

7 3

Sample Output 2

11

The bishop can reach the cyan squares in the following figure:

Sample Input 3

1000000000 1000000000

Sample Output 3

500000000000000000



Sample input:
4 5


Sample output:
10

Submission status: Wrong Answer

Solution code:
from math import ceil
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    h,w = map(int, readline().split())

    print(ceil(h/2)*ceil(w/2) + (h//2) * (w //2) )



if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())

mm1 = (W+1)//2
mm2 = W//2

mm3 = (H+1)//2
mm4 = H//2

print(mm1*mm3+mm2*mm4)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())

if W % 2 == 0 or H % 2 == 0:
    print(H * W // 2)
else:
    print(H * (W+1) // 2 - (H-1) // 2)

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    H, W = map(int, input().split())

    m = H*W // 2 + (H*W) % 2

    print(m)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
h,w = map(int,input().split())

print((h*w//2) + 1)

Submission status: Wrong Answer

Solution code:
def main():
    H, W = (int(i) for i in input().split())
    line = (W+1)//2
    print(line*((H+1)//2) + (W//2)*(H//2))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
H,W = list(map(int, input().split()))

if H*W%2 == 0:
    print(H*W//2)
else:
    print(H*W//2+1)

Submission status: Wrong Answer

Solution code:
h,w = map(int,input().split())
tot = h*w
if tot %2 == 0:
  print(tot/2)
else:
  print(tot//2+1)

Submission status: Wrong Answer

Solution code:
H, W = map(int,input().split())
if H * W % 2 == 0:
    print(H * W // 2)
else:
    print(H * W // 2 + 1)

Submission status: Wrong Answer

Solution code:
h, w = [int(i) for i in input().split()]
ans = 0
ans += (h // 2) * (w // 2) * 2
if h % 2 == 1:
    ans += (w + 1) // 2
if w % 2 == 1:
    ans += (h + 1) // 2
if h % 2 == 1 and w % 2 == 1:
    ans-=1
print(ans)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
hw = h*w
if hw % 2 == 1:
    hw += 1
print(hw // 2)

Submission status: Wrong Answer

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

h,w = inpl()
if h%2 and w%2:
    print(h*w//2+1)
else:
    print(h*w//2)

Submission status: Wrong Answer

Solution code:
def main():
    H, W = map(int, input().split(" "))
    # print(a, b)
    # r1 + c1 = r2 + c2
    # r1 - c1 = r2 - c2
    c = H * W
    if c % 2 == 0:
        print(c // 2)
    else:
        print((c // 2) + 1)

    # 500000000000000000
    # 500000000000000000


main()

Submission status: Wrong Answer

Solution code:
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left #bisect_left(list, value)
#from fractions import gcd
enu = enumerate

sys.setrecursionlimit(10**7)
H, W = map(int, input().split())

al = H*W // 2

if H%2==1 and W%2==1:
    print(al+1)
else:
    print(al)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())

D = H * W

if D % 2:
    print(D//2+1)
else:
    print(D//2)

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
print((h//2+h%2)*(w//2+w%2)+(h//2)*(w//2))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

def main():
    H,W=map(int,input().split())
    ans=W*(H//2)
    if H%2:
        ans+=-(-W//2)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())

if (h*w) % 2 == 0:
    print(h * w // 2)
else:
    print(h*w//2 + 1)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
A = H*W
print(int((A+2-1)/2))

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
print(h*w//2+h*w%2)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
print(H // 2 * W + (H % 2) * (-(-W // 2)))

Submission status: Wrong Answer

Solution code:
h,w = map(int,input().split())
import math
print(math.ceil(h*w/2))

Submission status: Wrong Answer

Solution code:
h,w = map(int, input().split())

if h%2 and w%2:
    print((h*w+1)//2)
else:
    print(h*w//2)

Submission status: Wrong Answer

Solution code:
from math import ceil 
H,W = map(int,input().split())

print(ceil(H*W/2))

Submission status: Wrong Answer

Solution code:
from sys import exit, setrecursionlimit
setrecursionlimit(10**6)

def array2D(row, col ,val=0):
    return [[val]*col for i in range(row)]

from math import ceil
h,w = map(int, input().split())
ans = 0

print(ceil(h/2)*ceil(w/2) + (h//2) * (w//2))

Submission status: Wrong Answer

Solution code:
h,w = map(int, input().split())

print(-(-h*w//2))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())

a = H * W
print((H * W + 2 - 1) // 2)

Submission status: Wrong Answer

Solution code:
#B
h, w = map(int, input().split())
if (h * w )%2:
    print((h*w)//2+1)
else:
    print((h*w)//2)

Submission status: Wrong Answer

Solution code:
def solve(h, w):
    return (h * w + 1)// 2


def main():
    h, w = map(int, input().split())
    res = solve(h, w)
    print(res)


def test():
    assert solve(4, 5) == 10
    assert solve(7, 3) == 11
    assert solve(1000000000, 1000000000) == 500000000000000000


if __name__ == "__main__":
    test()
    main()

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
import math
if H%2==0:
  print((H//2)*W)
else:
  print(((H-1)//2)*W+math.ceil(W/2))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
Ho = H // 2
He = H - Ho
Wo = W // 2
We = W - Wo
print(Ho * Wo + He * We)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())

a = h * w

if a % 2 == 0:
    print(a//2)
else:
    print(a//2 + 1)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
from collections import deque, Counter
def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math
INF = 10 ** 20

def main():
    h,w = getList()
    yoko1 = h // 2 + (h % 2)
    yoko2 = (h // 2)
    ans = (w // 2) * (yoko1 + yoko2)
    if w % 2 == 1:
        ans += yoko1

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
H, W = map(int, input().split())
ans = math.ceil(H/2) * math.ceil(W / 2) + math.floor(H/2) * math.floor(W/2)
print(ans)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
if H*W % 2 == 0:
    print(H*W // 2)
else:
    print(H*W // 2 + 1)

Submission status: Wrong Answer

Solution code:
h,w = map(int,input().split())
if h*w%2 == 0:
    ans = h*w//2
else:
    ans = h*w//2+1
print(ans)

Submission status: Wrong Answer

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

def solve(H: int, W: int):
    decimal.getcontext().prec = 10
    if(H*W%2==0):
        print(decimal.Decimal(H*W/2))
    else:
        print(decimal.Decimal(H*W//2+1))
    return


# Generated by 1.1.6 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()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    solve(H, W)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
import math
from fractions import gcd
import sys
#input = sys.stdin.readline


#N=int(input())

#A=list(map(int,input().split()))
#XY=[list(map(int,input().split())) for i in range(N)]

H,Y=map(int,input().split())
print(H*Y//2)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
Z = H * W
if Z % 2 == 0:
    ans = Z // 2
else:
    ans = Z // 2 + 1
print(ans)

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
print(-(-h//2)*(-(-w//2))+(h//2)*(w//2))

Submission status: Wrong Answer

Solution code:
h,w = list(map(int, input().split(' ')))
if w*h % 2 == 1:
    print((w*h)//2 + 1)
else:
    print((w*h)//2)

Submission status: Wrong Answer

Solution code:
h,w = map(int,input().split())
print(int((h*w+2-1)/2))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math
#input = sys.stdin.buffer.readline

def inn(func=int):
    return list(map(func,input().split()))

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

a,b = inn()
c=a*b
print(math.floor(c/2)+c%2)

Submission status: Wrong Answer

Solution code:
h,w = map(int,input().split())

print((h*w+1)//2)

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
H=i[0]
W=i[1]
x=H*W
if x%2==0:
    print(x//2)
else:
    print((x+1)//2)

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())
hw = H * W
if hw % 2 == 0:
  print(int(hw/2))
else:
  print(int(hw/2)+1)

Submission status: Wrong Answer

Solution code:
H, W = [int(i) for i in input().strip().split()]

N = H * W
if N % 2 == 0:
  print(N // 2)
else:
  print(N // 2 + 1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
ans = (a*b)//2
if (a*b)%2==0:
    print(ans)
else:
    print(ans+1)

Submission status: Wrong Answer

Solution code:
import sys
import math
import copy
import queue
input = sys.stdin.readline
def LI(): return [int(x) for x in input().split()]

H,W = LI()

ans = math.ceil(H*W/2)
print (ans)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
if H*W%2 == 1:
    print((H*W//2)+1)
else:
    print(H*W//2)

Submission status: Wrong Answer

Solution code:
h=list(map(int,input().split()))

a=max(h)
b=min(h)
ans=0
if a%2==0:
    ans=a*b/2
else:
    ans+=(a-1)*b/2
    ans+=(b+1)//2

print(int(ans))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
if (H*W)%2==1:
    print((H*W+1)//2)
else:
    print((H*W)//2)

Submission status: Wrong Answer

Solution code:
H,W = map(int, input().split())

ans = ((H + 2 - 1)//2) * ((W + 2 - 1)//2)
ans += (H // 2) * (W//2)
print(ans)

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
print((n//2+n%2)*(m//2+m%2))

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
print(h // 2 * w + h % 2 * ((w + 1) // 2))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
if H * W % 2 == 0:
    print(H * W // 2)
else:
    print((H * W + 1) // 2)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())

print(-(-H // 2) * -(-W // 2) + (H // 2) * (W // 2))

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())

if min(H, W) == 1 :
    print(1)

if (H*W)%2 == 0 :
    print((H*W)//2)
else :
    print((H*W)//2 + 1)

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split(' '))
if n==1 or m==1:
	print(1)
print((n*m+1)//2)

Submission status: Wrong Answer

Solution code:
H, W = [int(x) for x in input().split()]

if H * W % 2 == 0:
    ans = H * W // 2
else:
    ans = (H * W + 1) // 2

print(ans)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())

if h % 2 != 0 and w % 2 != 0:
    print(int(h*w/2 + 1))
else:
    print(int(h*w/2))

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
x = (w+1)//2
y = h//2
print(w*y+(h-2*y)*x)

Submission status: Wrong Answer

Solution code:
h, w = [int(x) for x in input().split()]
print((h * w + 1) // 2)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())

if(h*w % 2 == 0):
    print(h*w // 2)
else:
    print(h*w//2 + 1)

Submission status: Wrong Answer

Solution code:
import sys
from math import ceil, floor
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def main():
    h,w = map(int, input().split())
    if h*w % 2 == 0:
        print(h*w//2)
    else:
        print(h*w//2 + 1)
    return

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())

if h * w % 2 == 1:
    print(h*w//2 + 1)
else:
    print(h*w//2)

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

h,w = na()

print((h*w+1)//2)

Submission status: Wrong Answer

Solution code:
def main():
    H, W = map(int, input().split())
    print(-(-H*W // 2))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
H, W = list(map(int, input().split()))
n1 = None
n2 = None
if W % 2 == 0:
    n1 = W // 2
    n2 = n1
else:
    n1 = W // 2 + 1
    n2 = n1 - 1
o1 = None
o2 = None
if H % 2 == 0:
    o1 = H // 2
    o2 = H // 2
else:
    o1 = H // 2 + 1
    o2 = H // 2
print(n1 * o1 + n2 * o2)

Submission status: Wrong Answer

Solution code:
h,w=[int(x) for x in input().split()]

print(int((h*w+0.1)//2))

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())

num = h*w

if num % 2 == 1:
    print((num+1)//2)
else:
    print(num//2)

Submission status: Wrong Answer

Solution code:
import math

h, w = map(int, input().split())

ans = h // 2 * w

if h % 2 == 1:
    ans += math.ceil(w/2)

print(ans)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
w1 = -(-W//2)
w2 = -(-(W-1)//2)

h1 = -(-H//2)
h2 = H - h1

print(w1*h1 + w2*h2)

Submission status: Wrong Answer

Solution code:
h,w=[int(j) for j in input().split()]
if h%2==0:
    print(h*w//2)
else:
    if w%2==0:
        print(h*w//2)
    else:
        print((h*w+1)//2)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
if H*W%2 == 0:
    print (H*W//2)
else:
    print (H*W//2+1)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
if H %2 == 0:
  print(W * H//2)
else:
  print(W * (H//2) + (W+1)//2)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(H: int, W: int):
    if W%2 == 0:
        print(H*W//2)
    else:
        if H%2 == 0:
            print(W*(H//2))
        else:
            print(W*(H//2)+W//2+1)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    solve(H, W)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from math import ceil

H, W = map(int, input().split())
print(ceil(H*W/2))

Submission status: Wrong Answer

Solution code:
h,w =  map(int, input().split())

if (h*w)%2==0:
    print((h*w)/2)
else:
    print(((h*w)+1)/2)

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())

if W % 2 == 0 or H % 2 == 0:
    print(H*W//2)
else:
    print(H*W//2 + 1)

Submission status: Wrong Answer

Solution code:
input = raw_input

h, w = map(int, input().split(" "))
t =  h *w 
if t % 2 == 0:
    out = t // 2
else:
    out = 1 + (t // 2)
print(out)

Submission status: Wrong Answer

Solution code:
from math import ceil

H, W = [int(i) for i in input().split()]
c = 0
for i in range(H):
    if i%2==0:
        c += ceil(W/2)
    else:
        c += W//2

print(c)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
print((-(-(h*w)//2)))

Submission status: Wrong Answer

Solution code:
h,w = map(int,input().split())
print(h*w//2 if h*w%2 == 0 else h*w//2+1)

Submission status: Wrong Answer

Solution code:
print((int.__mul__(*map(int,input().split()))+1)//2)

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
p = H*W
print((p+1)//2)

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

# 改行またはスペース区切りの入力をすべて読み込んでイテレータを返します。
def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

h,w = get_nums_l()

ans = 0

ans += ((h+1)//2) * ((w+1) //2)
ans += (h//2) * (w // 2)

print(ans)

Submission status: Wrong Answer

Solution code:
from math import ceil
h, w = [int(i) for i in input().split()]
print(ceil(h*w/2))

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
print(-(-H*W//2))

Submission status: Wrong Answer

Solution code:
import sys
import itertools
import math
from collections import deque
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

H,W = IL()

numa = math.ceil(W/2)
numb = W - numa

numc = math.ceil(H/2)
numd = H - numc
ans = numa * numc + numb * numd

print(ans)

Submission status: Wrong Answer

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

H, W = map(int, readline().split())

print(-(-H*W//2))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

h,w = map(int,input().split())
if (h * w) % 2 == 0:
  print((h*w)//2)
else:
  print((h*w)//2+1)

Submission status: Wrong Answer

Solution code:
import sys

# S = input()
# N, M = map(int, input().split())
# nums = list(map(int, input().split()))
# nums_2d = [list(map(int, input().split())) for _ in range(N)]


def main():
    print(solve())


def solve():
    h, w = map(int, input().split())

    if h == 1 or w == 1:
        return 0

    return ((h * w) + 1) // 2


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
print(((h+1)//2)*((w+1)//2)+(h//2)*(w//2))

Submission status: Wrong Answer

Solution code:
H,W = map(int,input().split())
if W%2 == 1 and H%2 ==1:
    print((W*H+1)//2)
else:
    print(W*H//2)

Submission status: Wrong Answer

Solution code:
def main():
    a, b = map(int, input().split())
    n = a*b
    if n&1==0:
        print(a*b//2)
    else:
        print(a*b//2+1)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
H, W = map(int, input().split())
if H*W % 2 != 0:
    print(H*W//2+1)
else:
    print(H*W//2)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
if h * w % 2 == 0:
    print(h * w // 2)
else:
    print(h * w // 2 + 1)

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
if (h*w)%2==0:
  print(h*w//2)
else:
  print(h*w//2+1)

Submission status: Wrong Answer

Solution code:
import math

h,w = [int(x) for x in input().split()]
ans = math.ceil(h*w/2)
print(ans)

Submission status: Wrong Answer

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

h,w = LI()
H, W = math.ceil(h/2), math.ceil(w/2)
ans = H * W + (h//2) * (w // 2)
print(ans)

Submission status: Wrong Answer

Solution code:
class Solution:
    def solve(self, H: int, W: int) -> int:

        return (H*W + 1) // 2


if __name__ == '__main__':

    # standard input
    H, W = map(int, input().split())

    # solve
    solution = Solution()
    print(solution.solve(H, W))

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
ans = n*m
if ans%2 ==0:
  ans=ans//2
else:
  ans=ans//2
  ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import math
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np

n,w = map(int, input().split())
# n = int(input())
# p = list(map(int, input().split()))


if (n * w) % 2 == 0:
    ans = n * w // 2

else:
    ans = n * w // 2 + 1

print(ans)

Submission status: Wrong Answer

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
# from fractions import gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    H, W = MAP()
    print(ceil(H*W/2))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
H,W=list(map(int,input().split()))
HW=H*W
if HW%2==0:
    print(int(HW/2))
else:
    print(int(HW/2)+1)

Submission status: Wrong Answer

Solution code:
import math
H, W = map(int, input().split())
print(math.ceil(W / 2) * math.ceil(H / 2) + W // 2 * H // 2)

Submission status: Wrong Answer

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

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

H, W = map(int, input().split())
if H % 2 == 1:
    ans = (H // 2) * W + (W + 1) // 2
else:
    ans = (H // 2) * W
print(ans)

Submission status: Wrong Answer

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

h, w = map(int, input().split())

ans = math.ceil(h*w/2)
print(ans)

Submission status: Wrong Answer

Solution code:
import os
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

H, W = list(map(int, sys.stdin.buffer.readline().split()))

h1 = (H + 1) // 2
h2 = H // 2
w1 = (W + 1) // 2
w2 = W // 2
ans = h1 * w1 + h2 * w2
print(ans)

Submission status: Wrong Answer

Solution code:
h, w = list(map(int, input().split()))

if h % 2 == 1 and w % 2 == 1:
	print((h * w) // 2 + 1)
else:
	print((h * w) // 2)

Submission status: Wrong Answer

Solution code:
w,h = map(int,input().split())

a = (w+1)//2
b = w//2

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

Submission status: Wrong Answer

Solution code:
h, w = [ int(v) for v in input().split() ]
print((h*w+1)//2)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
H, W = map(int, input().split())
if H*W%2==0:
    print((H*W)//2)
else:
    print((H*W)//2+1)

Submission status: Wrong Answer

Solution code:
import math


def main():
    H, W = map(int, input().split())
    n = H * W
    if n%2 == 0:
        print(int(n/2))
    else:
        print((n//2) + 1)
    return 0


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
H, W = map(int, input().split())

ans = math.ceil((H * W) / 2)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
h,w = map(int, input().split())
print(math.ceil(h*w/2))

Submission status: Wrong Answer

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

import sys
from collections import Counter

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

H, W = MAP()

ans = ceil(H*W, 2)
print(ans)

Submission status: Wrong Answer

Solution code:
H, W = map(int,input().split())
ans = H*(W//2) + (H+1)//2*(W%2)
print(ans)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split(" "))
kake = h*w

if kake%2 == 0:
    print(kake//2)
else:
    print((kake+1)//2)

Submission status: Wrong Answer

Solution code:
from math import ceil

h, w = map(int, input().split())
if h % 2 == 0:
    print(w * h // 2)
else:
    print(w * (h // 2) + ceil(3/2))

Submission status: Wrong Answer

Solution code:
H, W=map(int, input().split())
if W%2==0:
  print(H*W//2)
else:
  if H%2==0:
    print(W*H//2)
  else:
    print(W*(H//2)+W//2+1)

Submission status: Wrong Answer

Solution code:
import math

H, W = map(int, input().split())

SP = H * W

print(math.ceil(SP / 2))

Submission status: Wrong Answer

Solution code:
H, W = [int(i) for i in input().split()]
if((H*W)%2==0):
    print(H*W//2)
else:
    print(H*W//2+1)

Submission status: Wrong Answer

Solution code:
H, W = list(map(int, input().split()))

print(H * W // 2)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
print(a * b // 2 + 1 if a % 2 == 1 and b % 2 == 1 else a * b // 2)

Submission status: Wrong Answer

Solution code:
h,w = map(int, input().strip().split())
print((h*w+1)//2)

Submission status: Wrong Answer

Solution code:
import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

H, W = map(int, read().split())

if (H % 2 == 1) & (W % 2 == 1):
    print((H * W + 1) // 2)
else:
    print(H * W // 2)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())


if (h * w) % 2 == 0:
    print(h*w//2)
else:
    print((h*w+1)//2)

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
if h*w%2==0:
    print(h*w//2)
else:
    print((h*w+1)//2)

Submission status: Wrong Answer

Solution code:
from collections import deque, defaultdict, Counter
from math import ceil, floor
import sys
def input():
    return sys.stdin.readline().strip()

H, W = map(int, input().split())

ans = ceil(H / 2) *  ceil(W / 2) + floor(H / 2) * floor(W / 2)
print(ans)

Submission status: Wrong Answer

Solution code:
def main():

    H, W = map(int, input().split())
    return (H * W + 1) //2
if __name__ == '__main__':
    print(main())

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    h, w = tuple([int(n) for n in input().split()])

    print(h * w // 2 + (0 if h * w % 2 == 0 else 1))

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
print((h//2)*w + (h % 2)*(w+1)//2)

Submission status: Wrong Answer

Solution code:
# 2020/03/14
# パナソニックプログラミングコンテスト2020 - B

# Input
h, w = map(int,input().split())

# Calc
hw = h * w
if hw % 2 == 0:
    ans = hw // 2
else:
    ans = hw // 2 + 1

# Output
print(ans)

Submission status: Wrong Answer

Solution code:
H,W = list(map(int,input().split()))
if H%2 == 1 & W%2 == 1:
    print((H*W)//2 + 1)
else:
    print((H*W)//2)

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
ans = 0
ans += ((w // 2) + (w % 2)) * (h // 2 + h % 2) + (w // 2) * (h // 2)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
h, w = map(int, input().split())
ans = math.ceil(h * w / 2)
print(ans)