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:
#pypyは内包表記使わない, rstrip注意
#提出前に見返すこと！
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate
    #from itertools import product
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
from pprint import pprint

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

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

Submission status: Wrong Answer

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

if(h%2==0 or w%2==0):
    print((w*h)//2)
    exit()

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from math import ceil

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
H = input().split()
if int(H[0]) % 2 == 1 and int(H[1]) % 2 ==1:
    print((int(H[0])*int(H[1])/2)+0.5)
else:
    print(int(H[0])*int(H[1])/2)

Submission status: Wrong Answer

Solution code:
import numpy as np
import math as m

def main(**kwargs):
    if h % 2 == 1 and w % 2 == 1:
        res = (h * w + 1) // 2
    else:
        res = h * w // 2

    return res

if __name__ == "__main__":
    cin = np.array(input().split(" ")).astype("int")
    h, w, *_ = cin

    cout = main(h=h, w=w)
    print(cout)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# from fractions import gcd
# mod = 10 ** 9 + 7
# N = int(input())
# a = list(map(int,input().split()))
# a,b,c = map(int,input().split())
# ans = [0] * N
# math.ceilで切り上げ
# dp = [[0] * 4 for i in range(3)] #2次元配列初期化
# dp = [[[0] * 2 for i in range(3)] for j in range(5)]
# (ord('A'))でASCII出力 Aは65
import math
import numpy as np
import statistics
import string
import sys
from array import array
from collections import deque

def intinput():
    return int(input())
def listintinput():
    return list(map(int, input().split()))
def splitintinput():
    return map(int, input().split())
def factorialsurplus(x, y, z):  # xからyまでの階乗をzで割ったあまりを求める
    ret = 1
    for i in range(x, y + 1):
        ret = (ret * i) % z
    return (ret)
def isprime(x):
    if x == 1:
        return False
    if x == 2:
        return True
    sq = int(math.sqrt(x))
    for i in range(2,sq+1):
        if x % i == 0:
            return False
    return True
def hcfnaive(a,b):#最大公約数 math.gcdが使えない時の手段として入れとく。pythonが更新されたらいらなくなるはず
    if(b==0):
        return a
    else:
        return hcfnaive(b,a%b)

H,W = splitintinput()
if H % 2 == 0:
    print(int(H*W/2))
else:
    print(int((H-1)*W/2 + math.ceil(W/2)))

Submission status: Wrong Answer

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

odd = math.ceil(H/2)
even = math.floor(H/2)

res = odd*math.ceil(W/2) + even*math.floor(W/2)
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(str((H * W + 1) // 2))

Submission status: Wrong Answer

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

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

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())
print(int(H*W/2+0.5))

Submission status: Wrong Answer

Solution code:
from math import ceil
h,w=map(int,input().split())
if h%2:
  print(ceil(h/2)*ceil(w/2)+(h//2)*(w-ceil(w/2)))
else:
  print((h//2)*w)

Submission status: Wrong Answer

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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def resolve():
    a, b = map(int, input().split())
    if a ==1 or b==1:
        print(1)
    print((a*b+1)//2)
resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if (h*w)%2==0:
    print(int(h*w/2))
else:
    print(int(h*w/2-0.5))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


def main():

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

    temp = int(h * w / 2)

    if h * w % 2 == 1:
        temp += 1

    print(temp)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
h,w = map(int,input().split())
if h%2 == 0:
    print(h//2 * w)
else:
    tmp1 = math.floor(h/2)
    tmp2 = math.ceil(h/2)
    buf = w//2
    print(tmp2 * (w-buf) + tmp1 * (buf))

Submission status: Wrong Answer

Solution code:
[H,W] = [int(s) for s in input().rstrip().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==1 and W%2==1:
    print(H*W//2+1)
else:
    print(H*W//2)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

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

# print(H * W // 2)

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
menseki = a*b
c = menseki // 2 
d = menseki % 2
print(c+d)

Submission status: Wrong Answer

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

a = H*W

if a%2==1:
    ans = a//2  + 1

else:
    ans = a//2

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict
from collections import deque
def load(vtype=int):
    return vtype(input().strip())
def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]
def exit():
    import sys
    sys.exit(0)
def perm_sub(li, used):
    if len(li) == len(used):
        return [deque()]
    k = []
    for i in range(len(li)):
        if i in used:
            continue
        used.add(i)
        sub_list = perm_sub(li, used)
        for sub in sub_list:
            sub.appendleft(li[i])
        k.extend(sub_list)
        used.discard(i)
    return k
def perm_li(li):
    return perm_sub(li, set())
def perm_n(n):
    return perm_sub(list(range(n)), set())
def join_i(li, sep=""):
    return sep.join([str(e) for e in li])
def li2n(li):
    n, base = 0, 1
    for i in range(len(li)-1, -1, -1):
        n += li[i] * base
        base *= 10
    return n
def sli2ili(li):
    return [int(s) for s in li] 

h, w = load_list()

if h*w % 2 == 0:
    print(int(h*w/2))
else:
    print(int((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=map(int, input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
list = input().split(" ")
H = int(list[0])
W = int(list[1])

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    h, w = [int(s) for s in input().strip().split()]
    result = h * (w // 2) + (w % 2) * (h + 1) // 2
    print(result)


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

ans = H // 2 * W + H % 2 * (W // 2 + W % 2)
print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin

def main():

    input = stdin.readline

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

    ans = H * W

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

input_str = input()
h, w = input_str.split(" ")
h = int(h)
w = int(w)

print((math.floor(h/2)*math.floor(w/2)) + (math.ceil(h/2)*math.ceil(w/2)))

Submission status: Wrong Answer

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

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
def ceil(x,y):
  return (x-1)//y+1
h,w = map(int,input().split())
yoko = ceil(w,2)
yokoteki = w-ceil(w,2)
ans += yoko * ceil(h,2)
ans += yokoteki * (h-ceil(h,2))
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
from collections import deque
from string import ascii_uppercase
import sys, bisect, math, heapq

stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

H, W = read_int()

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import bisect, collections

def solution():
    h, w = [int(x) for x in input().strip().split(" ")]
    print(((h+1)//2)*((w+1)//2)+(h//2)*(w//2))
    



def main():    
    # T = int(input().strip())
    for _ in range(1):
        solution()
    

main()

Submission status: Wrong Answer

Solution code:
import math

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

cx0 = math.ceil(w / 2)
cx1 = w // 2

print(math.ceil(h / 2) * cx0 + (h // 2) * cx1)

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:
h, w = map(int, input().split())

if h%2 == 0 or 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())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from math import ceil
h,w=map(int,input().split())
a,b=ceil(w/2),w//2
c,d=ceil(h/2),h//2
print(a*c+b*d)

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
k = a[0] * a[1]
if a[0]==1 or a[1] ==1:
  print(0)
elif k % 2 == 0:
  print(k//2)
else:
  print((k // 2) + 1)

Submission status: Wrong Answer

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

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+1)//2)

Submission status: Wrong Answer

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

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

if H % 2 == 0:
    x = (a + b) * H // 2
else:
    x = a * ((H // 2) + 1) + b * (H // 2)

print(x)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n, m = [int(s) for s in input().split()]
if not n%2:
    ans = (n//2)*m
else:
    ans = (n//2)*m+m//2
    if m%2:
        ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = input().split()
h, w = int(a[0]), int(a[1])

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

Submission status: Wrong Answer

Solution code:

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

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

print(ans)

Submission status: Wrong Answer

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

x = h//2 if h%2==0 else h//2+1
y = w//2 if w%2==0 else w//2+1

print(x*y+(h-x)*(w-y))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
H, W = [int(_) for _ in input().split(" ")]
if (H % 2 == 0):
  print(H/2*W)
else:
  print(int(H/2)*W+math.ceil(W/2))

Submission status: Wrong Answer

Solution code:
a=input().split(" ")
b=int(a[0])*int(a[1])
if int(a[0])==1 or int(a[1])==1:
    print(0)
else:
    if b%2==0:
        print(b//2)
    else:
        print(b//2+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

mini_w = int(w/2)
maxi_w = math.ceil(w/2)
mini_h = int(h/2)
maxi_h = math.ceil(h/2)
print(maxi_w*maxi_h + mini_w*mini_h)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
h, w = map(int,input().split())

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

Submission status: Wrong Answer

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

w1 = math.ceil(W/2)*math.ceil(H/2)
w2 = math.floor(W/2)*math.floor(H/2)

print(w1+w2)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
def solve():
    N, M = map(int, input().split())
    if N*M % 2 == 0:
        return N*M/2
    else:
        return (N*M//2)+1
print(solve())

Submission status: Wrong Answer

Solution code:
def main():

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = int(w/2)

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

Submission status: Wrong Answer

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

big=math.ceil(W/2)
sml=math.floor(W/2)

ans=big*math.ceil(H/2)+sml*math.floor(H/2)

print(int(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 = [int(i) for i in input().split()]

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

Submission status: Wrong Answer

Solution code:

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

if H * W % 2 == 0:
    print(int(H * W / 2))

else:
    print(int(H * W / 2 + 1))

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
H, W = 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:
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())

boad = H*W
ans = boad//2
if boad % 2 == 1:
    ans += 1

print(ans)

Submission status: Wrong Answer

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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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:
H, W = map(int, input().split())
if W % 2 == 0:
    print(H * W // 2)
elif H % 2 == 0:
    print(W * H // 2)
else:
    print((H - 1) * (W - 1) // 2 + (H - 1) // 2 + (W - 1) // 2 + 1)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
H, W = [int(str) for str in input().strip().split()]

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

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())
boad = h * w
if boad % 2 == 1:
  print(boad // 2 + 1)
else:
  print(boad // 2)

Submission status: Wrong Answer

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

panels = W * H

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
HW = input().split()
H = int(HW[0])
W = int(HW[1])

tmp = H // 2
tmp2 = H - tmp
wt = W // 2
wt2 = W - wt
ans = tmp * wt + tmp2 * wt2
print(ans)

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

Solution code:
import math
hw=list(map(int, input().split())) 
h=hw[0]
w=hw[1]
answer=int(math.ceil(h*w/2))
print(answer)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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((h//2)*w)
    else:
        print(((h//2)*w)+((w//2)+1))

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
hw = h * w
if hw % 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:
c = [int(i) for i in input().split()]
a = c[0]
b = c[1]

r1 = (int(b/2) + b%2)*(int(a/2 + a%2))
r2 = (int(b/2)) * (int(a/2))

print(r1+r2)

Submission status: Wrong Answer

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

print(N)

Submission status: Wrong Answer

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

A = (H * W + 1) // 2

print(A)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    H,W=map(int,readline().split())

    if H%2==0:
        print(H*W//2)
    elif H%2==1:
        if W%2==0:
            print(H*W//2)
        elif W%2==1:
            print((H//2)*(W//2)+(H//2+1)*(W//2+1))
if __name__=="__main__":
    main()

Submission status: Wrong Answer

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

N = [int(_) for _ in input().split()]

H, W = N[0], N[1]


def solve(H, W):
    cnt = 0
    
    for i in range(H):
        if i % 2 == 0:
            cnt += int(W / 2) + 1
        else:
            cnt += W - (int(W / 2) + 1)
            
    return cnt

Submission status: Wrong Answer

Solution code:
def inpl():
    return list(map(int, input().split()))


H, W = inpl()

print(H * W // 2 + int(H % 2 == 1 and W % 2 == 1))