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:
a,b=map(int,input().split())
print(((a*b)+1)//2)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split())
import math
if H%2==0:
    a=math.ceil(W/2)
    b=math.floor(W/2)
    c=H/2
    print(round(a*c+b*c))
else:
    a = math.ceil(W / 2)
    b = math.floor(W / 2)
    c = math.ceil(H / 2)
    d = math.floor(H / 2)
    print(round((a*c+b*d)))

Submission status: Wrong Answer

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


def main():
    h, w = map(int, input().split())
    ans = (h * w) / 2
    if h % 2 == w % 2 == 1:
        ans = ans + 1
    print("%d" % ans)


if __name__ == '__main__':
    main()

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:
import sys
input = sys.stdin.readline

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

allmas = h*w

if allmas % 2 == 1:
    print(int((allmas/2) + 0.5))
else:
    print(int(allmas/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())

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

Submission status: Wrong Answer

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
H,W = map(int,input().split(' '))
A = W//2+1
if H%2==0:
    print(W*H//2)
else:
    print(W*(H-1)//2+A)

Submission status: Wrong Answer

Solution code:
H,W=[int(x) for x 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())
print(int((H*W)/2+1) if H%2!=0 and W%2!=0 else int((H*W)/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

#整数値龍力　複数の入力
def input_multiple_number():
    return map(int, input().split())

h,w = input_multiple_number()

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

Submission status: Wrong Answer

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

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())
num=H*W/2
print(math.ceil(num))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if H+W == 2:
    print(1)
elif (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 w % 2 == 0:
    a = w//2 * 2
else:
    a = w//2 * 2 + 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

result = math.ceil(H * W / 2)

print(result)

Submission status: Wrong Answer

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

mul = h * w

if mul % 2 == 0 :
    print(mul // 2)
else :
    print(mul // 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+1//2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

all = h*w

if all % 2 == 0:
    ans = all//2
else:
    ans = all//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:
import math
x,y = map(int,input().split())
print(math.ceil(x * y /2))

Submission status: Wrong Answer

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

r_odd = w//2 + w%2
r_even = w//2

r_odd_cnt = h//2 + h%2
r_even_cnt = h//2

print(r_odd * r_odd_cnt + r_even * r_even_cnt)

Submission status: Wrong Answer

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

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:
H, W = map(int, input().split())
print(-(-H * W // 2))

Submission status: Wrong Answer

Solution code:
import numpy as np
H,W = list(map(int, input().split()))

print(int(np.ceil((H*W)/2)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


def solve(H: int, W: int):
    if (H*W)%2 == 0:
        print((H*W)//2)
    else:
        print((H*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:
import math
def main():
    H, W = map(int, input().split())
    a = math.ceil(W/2) * math.ceil(H/2)
    b = math.floor(W/2) * math.floor(H/2)
    print(a+b)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
ans = sum(divmod(h * w, 2))
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a, b = list(map(int, input().split()))
r = math.ceil(a*b/2)
print(r)

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*W % 2 != 0:
  print(H*W//2+1)
else:
  print(H*W//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil
h, w = map(int, input().split())
if min(h,w) >= 1:
    print(0)
    exit()

print(ceil(h * w / 2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

D = H * W

if H == 1 or W == 1:
    print(0)
    exit()

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

Submission status: Wrong Answer

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

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())

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 = map(int, input().split())
even = ceil(H/2)
odd = H-even
ans = H*(W//2) + even*(W%2)

print(max(ans, 1))

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# Code for B - Bishop
# Use input() to fetch data from STDIN
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())
print(int(h*w/2)+1 if type(h*w/2)==float else int(h*w/2) )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

Solution code:
from math import ceil

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

odd = W // 2 + 1
even = W // 2

answer = 0
if H % 2 == 0:
    answer = (odd + even) * (H // 2)
else:
    answer = (odd + even) * (H // 2) + odd

print(answer)

Submission status: Wrong Answer

Solution code:
import sys
l = sys.stdin.readline().strip()

h, w = map(int, l.split())
res = h * w // 2 + h*w % 2 
print(res)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

h, w = map(int, sys.stdin.readline().split())

def main():
    res = h // 2 * w
    if h & 1:
        res += (w + 2 - 1) // 2
    return res

if __name__ == "__main__":
    ans = main()
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h, w = map(int, input().split())
print(((w+1)//2)*((h+1)//2)+(w//2)*(h//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 == 1:
    print(h*w//2 +1)
else:
    print(h *w //2)

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

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

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 itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect, bisect_left, bisect_right

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

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

H, W = MAP()

a = ceil(W / 2)
b = ceil((W-1) / 2)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def sol(h, w):
    a = (w+1) // 2
    b = w // 2
    res = (a+b) * (h//2)
    if h & 1:
        res += a
    return res

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
[h, w] = input().split()

h = int(h)
w = int(w)

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())
A = H * W
if A % 2:
    print(A // 2 + 1)
else:
    print(A // 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
import sys
import math
h, w = map(int, sys.stdin.readline().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
import os
import math


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

    H, W = list(map(int, sys.stdin.readline().split()))
    print(int(((W*H)+1)/2) if (H*W)/2 != 0 else int((W*H)/2) )


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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=input().strip().split(" ")
h,w=[int(h),int(w)]
p=h*w
if p%2:
    print((p//2)+1)
else:
    print(p//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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:
h, w = (int(x) for x in input().split())
ans = h*w >> 1
if (h*w) % 2 == 1:
    ans += 1
print(ans)

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 not(w%2!=0 and h%2!=0):
    print(h*w//2)
else:
    print((h*w+1)//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    h, w = [int(x) for x in input().split()]
    n1 = w//2 + (w&1)
    n2 = w//2

    ans = (n1+n2)*(h//2)
    if h&1:
        ans += n1
    print(ans)


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

Submission status: Wrong Answer

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

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:
import math
N, M = map(int , input().split())
print(math.ceil(N * M / 2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c1 = (h + 1) // 2
c2 = h - c1

w1 = (w + 1) // 2
w2 = w - w1

print(c1 * w1 + c2 * w2)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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())


print(int((H*W)/2+0.5))

Submission status: Wrong Answer

Solution code:
#a, b, m = list(map(int, input().split()))
#a = list(map(int, input().split()))
#b = list(map(int, input().split()))
import math
H, W = list(map(int, input().split()))

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

print(ans)

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(w/2))

Submission status: Wrong Answer

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

if h == 1 or w == 1:
    ans = 1
else:
    if (h*w) % 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())

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!python3.4.3

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

s = h * w

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

Submission status: Wrong Answer

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

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

     ans = ((h * w) + 1) // 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:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if H == 1 or W == 1:
    print(0)
    exit()

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, Counter, deque

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

H2 = H // 2
W2 = W // 2
H3 = H - H2
W3 = W - W2

print(H2 * W2 + H3 * W3)

Submission status: Wrong Answer

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

m=h//2
ans=0

num=w//2
ans+=num*h
if w%2==1:
  ans+=h-m
'''
for i in range(w):
  if i%2==0:
    ans+=h-m
  else:
    ans+=m
'''
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    H, W = [int(x) for x in input().split()]
    ans = 0
    if W % 2 == 0:
        ans = (W // 2) * H
    else:
        ans += -(-W // 2) * -(-H // 2)
        ans += (W // 2) * (H // 2)

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

if area % 2 == 0:
    print(area // 2)
else:
    print(-(-area // 2))

Submission status: Wrong Answer

Solution code:
def div_ceil(x, y): return (x + y - 1) // y

H, W = map(int, input().split())
ans = div_ceil(W, 2) * div_ceil(H, 2) + (W // 2) * (H // 2)
print(ans if H != 1 and W != 1 else 0)

Submission status: Wrong Answer

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

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math
import string
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

H, W = map(int, input().split())
ans = math.ceil(H / 2) * math.ceil(W / 2) + H // 2 * W // 2
print(ans - 1)

Submission status: Wrong Answer

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

temp = (H*W)//2

if (H*W) % 2 == 1:
    temp += 1

print(temp)

Submission status: Wrong Answer

Solution code:
H,W=map(int,input().split(' '))
if H%2==0:
    print(H*W//2)
else:
    print(W*(H-1)//2+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:
import sys
import math
import bisect

def main():
    n, m = map(int, input().split())
    a = (m + 1) // 2
    b = m // 2
    ans = a * (n + 1) // 2 + b * n // 2
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

def solve():
    input = sys.stdin.readline
    H, W = map(int, input().split())
    even = (W + 1) // 2
    odd = W // 2
    Ans = (H + 1) // 2 * even
    if H % 2 == 1: Ans += odd * (H - 1) // 2
    else: Ans += odd * H // 2
    print(Ans)

    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
#!python3.4
# -*- coding: utf-8 -*-
# panasonic2020/panasonic2020_b
import sys, math

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    H, W = i2nn()
    n = math.ceil(H * W / 2)
    print(n)
    return

main()

Submission status: Wrong Answer

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

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 numpy as np
import math
N, M = map(int, input().split())

ans = math.ceil(N/2*M)
print(ans)

#print(*ans, sep='\n')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math



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



if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
h,w= list(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:
(n, m) = map(int, raw_input().split())

res = 0

res += ((n + 1) / 2) * ((m + 1) / 2)
res += (n / 2) * (m / 2)
print res

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())
if (H*W)%2:
    print(int(H*W/2)+1)
else:
    print(int(H*W/2))

Submission status: Wrong Answer

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

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())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    H, W = LI()
    if H * W % 2 > 0:
        cnt = (H * W + 1) // 2
    else:
        cnt = H*W//2
    print(cnt)

main()

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
H, W = [int(i) for i in input().split()]
print(math.ceil(H/2)*math.ceil(W/2)+(H//2)*(W//2))

Submission status: Wrong Answer

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]

H, W = LI()

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