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())
c=(a*b)
if c%2!=0:
  ans=(c/2)+1
else:
  ans=(c/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)

Submission status: Wrong Answer

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

res = 0

#odd : (W+1) // 2
#even : W // 2

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
H, W = map(int, input().split())
# 今いる列の到達可能店
if H % 2 == 0:
    can = H // 2
    ans = can * W
    print(ans)
elif H % 2 == 1:
    can = H
    ans = math.ceil(can * (W / 2))
    print(ans)

Submission status: Wrong Answer

Solution code:
from math import ceil

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

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

Submission status: Wrong Answer

Solution code:
from math import ceil

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

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

Submission status: Wrong Answer

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

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

n = H * W
ans = (n + 1) / 2
print(math.floor(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

H, W = (int(x) for x in input().split())
if H%2 == 0:
    print(H*W//2)
else:
    print((H-1)*W//2 + math.ceil(W/2))

Submission status: Wrong Answer

Solution code:
import math
H, W = map(int, input().split())
x_t = []
y_t = []
if H % 2:
  y_t.append(math.floor(H / 2) + 1)
  y_t.append(H - y_t[0])
else:
  y_t.append(H / 2)
  y_t.append(H / 2)

if W % 2:
  x_t.append(math.floor(W / 2) + 1)
  x_t.append(W - x_t[0])
else:
  x_t.append(W / 2)
  x_t.append(W / 2)

ans = y_t[0] * x_t[0] + y_t[1] * x_t[1]
print(math.floor(ans))

Submission status: Wrong Answer

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

if(h==1):
  print(1)
  quit(0)

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

if(h==1 and w==1):
  print(1)
  quit(0)
if(h==2 and w==1):
  print(2)
  quit(0)
  
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 = map(int,input().split())

if(h==1 and w==1):
  print(1)
  quit(0)
  
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 = 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:
import math
h,w = map(int,input().split())

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

Submission status: Wrong Answer

Solution code:
def bishop(H, W):
    if H==1 or W== 1:
        return 0
    result  = int((H-1)/2 + 1) * int((W-1)/2 + 1) + int(H/2) * int(W/2)
    return result
ans = input().split(" ")
H = int(ans[0])
W = int(ans[1])
print(bishop(H,W))

Submission status: Wrong Answer

Solution code:
n = input().split(" ")
a='1'
if n[0]=='1' and n[1]=='1' :
    print(a)
else :
     print(-(-int(n[0])*int(n[1])//2))

Submission status: Wrong Answer

Solution code:
ans = input().split(" ")
H = int(ans[0])
W = int(ans[1])
result  = int((H-1)/2 + 1) * int((W-1)/2 + 1) + int(H/2) * int(W/2)
print(result)

Submission status: Wrong Answer

Solution code:
n = input().split(" ")
print(-(-int(n[0])*int(n[1])//2))

Submission status: Wrong Answer

Solution code:
from math import floor, ceil


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

    h1 = float(h/2)
    w1 = float(w/2)

    if(h1==1 or w1 == 1):
        print(1)
        exit()

    if (h % 2 and w % 2 is 0) or (h % 2 and w % 2 is not 0):
        tot = ceil(h1) * ceil(w1) + floor(h1) * floor(w1)
    else:
        if h % 2 is 0:
            tot = h1 * w
        elif w % 2 is 0:
            tot = w1 * h

    print(int(tot))


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
N=input().split(" ")
N=list(N)
map(int,N)
S=int(N[0])*int(N[1])
S=-(-S//2)
print(S)

Submission status: Wrong Answer

Solution code:
from math import floor, ceil


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

    h1 = float(h/2)
    w1 = float(w/2)

    if(h or w is 1):
        print(1)
        exit()

    if (h % 2 and w % 2 is 0) or (h % 2 and w % 2 is not 0):
        tot = ceil(h1) * ceil(w1) + floor(h1) * floor(w1)
    else:
        if h % 2 is 0:
            tot = h1 * w
        elif w % 2 is 0:
            tot = w1 * h

    print(int(tot))


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:

num=list(map(int,input().split()))
h=num[0]
w=num[1]
s=[]
c=0
x=int(h/2)
if(h%2!=0 and w%2!=0):
    c1=int(w/2)+1
    c2=c1-1
    print(c1*(int(h/2)+1)+c2*int(h/2))
elif(h%2==0 and w%2!=0):
    c1=int(w/2)+1
    c2=c1-1
    print(c1*x+c2*x)
elif(w%2==0):
    print(int(w/2)*h)

Submission status: Wrong Answer

Solution code:
from math import floor, ceil


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

    h1 = float(h/2)
    w1 = float(w/2)

    if (h % 2 and w % 2 is 0) or (h % 2 and w % 2 is not 0):
        tot = ceil(h1) * ceil(w1) + floor(h1) * floor(w1)
    else:
        if h % 2 is 0:
            tot = h1 * w
        elif w % 2 is 0:
            tot = w1 * h

    print(int(tot))


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(math.ceil((a*b)/2))

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
N=input()
N=N.replace(' ','')
N=list(N)
map(int,N)
S=int(N[0])*int(N[1])
S=-(-S//2)
print(S)

Submission status: Wrong Answer

Solution code:
import math
r,c = input().split()
r = int(r)
c = int(c)
if(r==1 or c==1):
    print(1)
else:    
    ans = r*c/2
    if r%2==1 or c%2==1:
        print(math.floor(ans)+1)
    else:
        print(math.floor(ans))

Submission status: Wrong Answer

Solution code:
import math
r,c = input().split()
r = int(r)
c = int(c)
if(r==1 or c==1):
    print(1)
else:    
    ans = r*c/2
    if r%2==0 and c%2==0:
        print(math.floor(ans))
    else:
        print(math.floor(ans)+1)

Submission status: Wrong Answer

Solution code:
import math
r,c = input().split()
r = int(r)
c = int(c)
ans = r*c/2
if r%2==0 and c%2==0:
    print(math.floor(ans))
else:
    print(math.floor(ans)+1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

c=h*w

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

Submission status: Wrong Answer

Solution code:
#B - Bishop
import math

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

if(H%2 == 0 and W%2 == 0):
    ans = int(W/2)*int(H/2)+int(W/2)*int(H/2)
elif(H%2 == 0 and W%2 == 1):
    ans = math.ceil(W/2)*int(H/2)+int(W/2)*int(H/2)
elif(H%2 == 1 and W%2 == 0):
    ans = int(W/2)*math.ceil(H/2)+int(W/2)*int(H/2)
elif(H%2 == 1 and W%2 == 1):
    ans = math.ceil(W/2)*math.ceil(H/2)+int(W/2)*int(H/2)


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(masu)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

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

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

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

    ans = odd * (H // 2 + 1) + even * (H // 2)
    print(ans)

main()

Submission status: Wrong Answer

Solution code:
import math

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

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

    odd = math.ceil(W / 2)
    even = W // 2

    ans = odd * math.ceil(H / 2) + even * (H // 2)
    print(ans // 1)

main()

Submission status: Wrong Answer

Solution code:
import math

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

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

    odd = math.ceil(W / 2)
    even = W // 2

    ans = odd * math.ceil(H / 2) + even * (H // 2)
    print(ans // 2)

main()

Submission status: Wrong Answer

Solution code:
import math

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

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

    odd = math.ceil(W / 2)
    even = W // 2

    ans = odd * math.ceil(H / 2) + even * (H // 2)
    print(ans)

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

q, r = divmod(H, 2)

if r:
  print(W * q + (W + 1) // 2)
else:
  print(W * q)

Submission status: Wrong Answer

Solution code:
#n=int(input())
h,w=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
m=h//2
n=w//2

if h==1 or w==1:
    ans=0
elif h%2==0:
    ans=m*w
else:
    md=w%2
    ans=n*(m+1+m)+md*(m+1)
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	H,W = MI()
	W1 = (W+1)//2
	W2 = W//2
	H1 = (H+1)//2
	H2 = H//2
	print(H1*W1+H2*W2)

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h,w=map(int,input().split())
if(min(h,w)==1):
	print(1)
	exit()
if(w%2==1):
    w1=(w//2)+1
    w2=w//2
else:
    w1=(w//2)
    w2=(w//2)+1
if(h%2==1):
    h1=(h//2)+1
    h2=(h//2)
else:
    h1=(h//2)
    h2=(h//2)+1

if(w%2==1 and h%2==1):
    ans=w1*h1+w2*h2
elif(w%2==1 and h%2==0):
    ans=w1*h1+w2*h1
elif(w%2==0 and h%2==1):
    ans=w1*h1+w2*h2
else:
    ans=w1*h1+w1*h1
print(ans)

Submission status: Wrong Answer

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

print(-(-a*b//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:
    h, w = w, h
w = min(h * 2 - 1, w)
ans = w * (h // 2)
if h % 2:
    ans += (w + 1) // 2
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
h, x = map(int, input().split())
ho = h // 2
he = ho + (h % 2)
xo = x // 2
xe = xo + (x % 2)

print(ho * xo + he * xe)

Submission status: Wrong Answer

Solution code:
h, x = map(int, input().split())
ho = h // 2
he = ho + h % 2
xo = x // 2
xe = xo + x % 2

print(ho * xo + he * xe)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
H,W=input().split()
h=int(H)
w=int(W)
if h%2!=0 and w%2!=0:
  print(int((h*w/2)+1))
elif h%2==0 or w%2==0:
  print(int(h*w/2))

Submission status: Wrong Answer

Solution code:
H,W=input().split()
h=int(H)
w=int(W)
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:
# B
# 解説みた
w, h = map(int, input().split())

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

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

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

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 = [int(i) for i in input().rstrip().split()]
if H == 1 or W == 1:
    print(0)
print((H*W+1)//2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

print(math.ceil(num/2))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!python3

# import numpy as np


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


def main():
    a = b = H // 2
    if H % 2 == 1:
        a += 1
    ans = (a + b) * (W // 2)
    if W % 2 == 1:
        ans += a
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

w1 = math.ceil(w/2)
w2 = math.floor(w/2)

h1 = math.ceil(h/2)
h2 = math.floor(h/2)

print((h1*w1) + (h2*w2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#2
w,h = (int(i) for i in input().split())
if w%2!=0 and h%2!=0:
    print(int(w*h/2+1))
else:
    print(int(w*h/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())
import math
print(math.ceil(H*W/2))

Submission status: Wrong Answer

Solution code:
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
data=scanf(input(),["int","int"])
if data[0]==1 or data[1]==1:
    print(1)
else:
    print(str(int(round(float(data[0]*data[1])/2.0+0.1))))

Submission status: Wrong Answer

Solution code:
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
data=scanf(input(),["int","int"])
if data[0]!=1 and data[1]!=1:
    print(str(int(round(float(data[0]*data[1])/2.0+0.1))))
else:
    print(1)

Submission status: Wrong Answer

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

more = (W + 1) // 2
less = W // 2

print((H//2)*less + ((H+1)//2) * more)

Submission status: Wrong Answer

Solution code:
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
data=scanf(input(),["int","int"])
if data[0]!=1 and data[1]!=1:
    print(int(str(round(float(data[0]*data[1])/2.0+0.1))))
else:
    print(1)

Submission status: Wrong Answer

Solution code:
def scanf(scanstr,data_format):
    scanstr=scanstr.split(" ")
    if(type(data_format) is not list):
        print("data_format error")
    if(len(scanstr)!=len(data_format)):
        print("Error")
        return -1
    j=0
    for kata in data_format:
        if(kata=="str"):
            scanstr[j]=str(scanstr[j])
        if(kata=="int"):
            scanstr[j]=int(scanstr[j])
        j=j+1
    return scanstr
data=scanf(input(),["int","int"])
if data[0]!=1 and data[1]!=1:
    print(str(round(float(data[0]*data[1])/2.0+0.1)))
else:
    print(1)

Submission status: Wrong Answer

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

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

ans = int(ans)
print(ans)

Submission status: Wrong Answer

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


if H%2 == 0:
  ans = H*W/2
else:
  """
  ans = ((H+1)//2)*((W+1)//2) # 奇数行目
  ans += (H//2)*(W//2) # 偶数行目
  """
  ans = (H-1)*W/2
  ans += (W+1)/2

ans = int(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

a, b = map(int, input().split())
# a縦b横

if a == 1 or b == 1:
    print(1)
    sys.exit()

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

Submission status: Wrong Answer

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

if H%2 == 0:
  ans = H*(W/2)
else:
  ans = ((H+1)//2)*((W+1)//2) # 奇数行目
  ans += (H//2)*(W//2) # 偶数行目

ans = int(ans)
print(ans)

Submission status: Wrong Answer

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

if 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 * 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()]

print(((H + 1) // 2) * ((W + 1) // 2) +
      (H - (H + 1) // 2) * (W - (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 == 1 or w == 1:
    print(1)
elif not h == 0 or w == 0:
    print(round(((h * w + 1) / 2)))
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


def main():
    from math import ceil
    import sys
    input = sys.stdin.readline

    h, w = map(int, input().split())
    ans = h // 2 * w

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a = input().split()

b = [int(s) for s in a]
c = b[0]*b[1]/2

if(b[0] == 1 or b[1] == 1):
  print(1)
elif(int(c)%2 == 1):
  print(int(c+1))
else:
  print(int(c))

Submission status: Wrong Answer

Solution code:
a = input().split()

b = [int(s) for s in a]

if(b[0] == 1 or b[1] == 1):
  print(1)
elif(b[0]*b[1]/2 % 2 != 0):
  print(int(b[0]*b[1]/2+1))
else:
  print(int(b[0]*b[1]/2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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