Buggy python submission (verdict: Time Limit Exceeded):
url = "https://atcoder.jp/contests/abc090/tasks/arc091_a"
import copy
def main():
    tate, yoko = list(map(int, input().split()))
    count = 0
    if tate == 1 and yoko == 1:
        print("1")
        exit()
    elif tate == 1:
        print(yoko - 2)
        exit()
    elif yoko == 1:
        print(tate - 2)
        exit()
    for t in range(1, tate + 1):
        if t == 1 or t == tate:
            count += 0
        else:
            count += yoko - 2
    print(count)




if __name__ == '__main__':
    main()




Fixed submission:
url = "https://atcoder.jp/contests/abc090/tasks/arc091_a"
import copy
def main():
    tate, yoko = list(map(int, input().split()))
    count = 0
    if tate == 1 and yoko == 1:
        print("1")
        exit()
    elif tate == 1:
        print(yoko - 2)
        exit()
    elif yoko == 1:
        print(tate - 2)
        exit()
    count += (yoko - 2) * (tate - 2)
    print(count)




if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
url = "https://atcoder.jp/contests/abc090/tasks/arc091_a"
import copy
def main():
    tate, yoko = list(map(int, input().split()))
    count = 0
    if tate == 1 and yoko == 1:
        print("1")
        exit()
    elif tate == 1:
        print(yoko - 2)
        exit()
    elif yoko == 1:
        print(tate - 2)
        exit()
    for t in range(1, tate + 1):
        if t == 1 or t == tate:
            count += 0
        else:
            count += yoko - 2
    print(count)




if __name__ == '__main__':
    main()




Fixed submission:
url = "https://atcoder.jp/contests/abc090/tasks/arc091_a"
import copy
def main():
    tate, yoko = list(map(int, input().split()))
    count = 0
    if tate == 1 and yoko == 1:
        print("1")
        exit()
    elif tate == 1:
        print(yoko - 2)
        exit()
    elif yoko == 1:
        print(tate - 2)
        exit()
    count += (yoko - 2) * (tate - 2)
    print(count)




if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
url = "https://atcoder.jp/contests/abc090/tasks/arc091_a"
import copy
def main():
    tate, yoko = list(map(int, input().split()))
    count = 0
    for t in range(1, tate + 1):

        for y in range(1, yoko + 1):
            arround = 0
            if tate == 1 and yoko == 1:
                arround += 1
            elif (t == 1 and t == tate) or (y == 1 and y == yoko):
                if (1 < t < tate) or (1 < y < yoko):
                    arround += 3
                else:
                    arround += 2
            elif (t == 1 or t == tate) and (y == 1 or y == yoko):
                arround += 4
            elif (t == 1 or t == tate) or (y == 1 or y == yoko):
                arround += 6
            else:
                arround += 9
            if arround % 2 != 0:
                count += 1
    print(count)




if __name__ == '__main__':
    main()




Fixed submission:
url = "https://atcoder.jp/contests/abc090/tasks/arc091_a"
import copy
def main():
    tate, yoko = list(map(int, input().split()))
    count = 0
    if tate == 1 and yoko == 1:
        print("1")
        exit()
    elif tate == 1:
        print(yoko - 2)
        exit()
    elif yoko == 1:
        print(tate - 2)
        exit()
    count += (yoko - 2) * (tate - 2)
    print(count)




if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
url = "https://atcoder.jp/contests/abc090/tasks/arc091_a"
import copy
def main():
    tate, yoko = list(map(int, input().split()))
    count = 0
    for t in range(1, tate + 1):

        for y in range(1, yoko + 1):
            arround = 0
            if tate == 1 and yoko == 1:
                arround += 1
            elif (t == 1 and t == tate) or (y == 1 and y == yoko):
                if (1 < t < tate) or (1 < y < yoko):
                    arround += 3
                else:
                    arround += 2
            elif (t == 1 or t == tate) and (y == 1 or y == yoko):
                arround += 4
            elif (t == 1 or t == tate) or (y == 1 or y == yoko):
                arround += 6
            else:
                arround += 9
            if arround % 2 != 0:
                count += 1
    print(count)




if __name__ == '__main__':
    main()




Fixed submission:
url = "https://atcoder.jp/contests/abc090/tasks/arc091_a"
import copy
def main():
    tate, yoko = list(map(int, input().split()))
    count = 0
    if tate == 1 and yoko == 1:
        print("1")
        exit()
    elif tate == 1:
        print(yoko - 2)
        exit()
    elif yoko == 1:
        print(tate - 2)
        exit()
    count += (yoko - 2) * (tate - 2)
    print(count)




if __name__ == '__main__':
    main()