Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n = int(input())
    a_list = input_to_int_tuple()

    ret = ""
    for i in range(n):
        my = 0
        for j, v in enumerate(a_list):
            if i == j:
                continue

            my ^= v

        ret += str(my) + " "

    print(ret.rstrip())


if __name__ == "__main__":
    main()


Fixed submission:
# -*- coding: utf-8 -*-

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n = int(input())
    a_list = input_to_int_tuple()

    all = 0
    for v in a_list:
        all ^= v

    ret = ""
    for v in a_list:
        ret += str(all ^ v) + " "

    print(ret.rstrip())


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n = int(input())
    a_list = input_to_int_tuple()

    ret = []
    for i in range(n):
        my = 0
        for j, v in enumerate(a_list):
            if i == j:
                continue

            my ^= v

        ret.append(my)

    print(" ".join(map(str, ret)))


if __name__ == "__main__":
    main()


Fixed submission:
# -*- coding: utf-8 -*-

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n = int(input())
    a_list = input_to_int_tuple()

    all = 0
    for v in a_list:
        all ^= v

    ret = ""
    for v in a_list:
        ret += str(all ^ v) + " "

    print(ret.rstrip())


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


import itertools
import math
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(math.sqrt(n)) + 1):
       if temp%i == 0:
           cnt=0
           while temp%i == 0:
               temp //= i
               arr.append(i)

    arr.append(temp)

    ret = set()
    for val in itertools.product([0, 1], repeat = len(arr)):
        cal = 1
        for i, v in enumerate(val):
            if v == 1:
                cal *= arr[i]

        ret.add(cal)
    return ret - set([n])


def main():
    n = input_int()
    a_list = input_to_int_tuple()

    a_set = set(a_list)
    cnt = 0

    import collections
    for val, val_cnt in collections.Counter(a_list).items():
        if val_cnt > 1:
            continue

        flg = False
        for i in factorization(val):
            if i in a_set:
                flg = True
                break

        if not flg:
            cnt += 1

    # for i, val in enumerate(a_sorted_list):
    #     flg = True
    #
    #     for devide_val in a_sorted_list[:i]:
    #         if val % devide_val == 0:
    #             flg = False
    #
    #     if flg:
    #         cnt += 1

    return cnt


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


Fixed submission:
# -*- coding: utf-8 -*-

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    n = input_int()
    a_list = input_to_int_tuple()

    a_sorted = list(sorted(a_list))

    max_val = a_sorted[-1]
    cands = [0] * max_val

    for num in a_sorted:
        # if cands[num - 1] >= 2:
        #     continue
        for i in range(num, max_val + 1, num):
            cands[i - 1] += 1

    ans = 0
    for num in a_sorted:
        if cands[num - 1] == 1:
            ans += 1

    return ans


if __name__ == "__main__":
    print(main())
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import math


def gcd(a, b, c):
    temp = math.gcd(a, b)
    return math.gcd(temp, c)


def main():
    k = int(input())

    total = 0
    temp = {}
    for i in range(1, k + 1):
        for j in range(1, k + 1):
            for l in range(1, k + 1):

                join_str = "".join(sorted([str(i).zfill(3), str(j).zfill(3), str(l).zfill(3)]))
                gcd_val = temp.get(join_str, 0)
                if gcd_val == 0:
                    gcd_val = gcd(i, j, l)
                    temp[join_str] = gcd_val
                total += gcd_val

    return total


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


Fixed submission:
# -*- coding: utf-8 -*-
import math


def gcd(a, b, c):
    temp = math.gcd(a, b)
    return math.gcd(temp, c)


def main():
    k = int(input())

    total = 0
    temp = {}
    for i in range(1, k + 1):
        for j in range(1, k + 1):
            for l in range(1, k + 1):
                # join_str = "".join(sorted([str(i).zfill(3), str(j).zfill(3), str(l).zfill(3)]))
                # gcd_val = temp.get(join_str, 0)
                # if gcd_val == 0:
                gcd_val = gcd(i, j, l)
                total += gcd_val

    return total


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

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import math


def gcd(a, b, c):
    temp = math.gcd(a, b)
    return math.gcd(temp, c)


def main():
    k = int(input())

    total = 0
    temp = {}
    for i in range(1, k + 1):
        for j in range(1, k + 1):
            for l in range(1, k + 1):
                join_str = "".join(sorted([str(i).zfill(3), str(j).zfill(3), str(l).zfill(3)]))
                gcd_val = temp.get(join_str, 0)
                if gcd_val == 0:
                    gcd_val = gcd(i, j, l)
                total += gcd_val

    return total


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


Fixed submission:
# -*- coding: utf-8 -*-
import math


def gcd(a, b, c):
    temp = math.gcd(a, b)
    return math.gcd(temp, c)


def main():
    k = int(input())

    total = 0
    temp = {}
    for i in range(1, k + 1):
        for j in range(1, k + 1):
            for l in range(1, k + 1):
                # join_str = "".join(sorted([str(i).zfill(3), str(j).zfill(3), str(l).zfill(3)]))
                # gcd_val = temp.get(join_str, 0)
                # if gcd_val == 0:
                gcd_val = gcd(i, j, l)
                total += gcd_val

    return total


if __name__ == '__main__':
    print(main())
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import collections
import itertools


def main():
    n = int(input())
    a_i = tuple(map(int, input().split()))

    count_item = {}
    all_cnt = 0
    for items in collections.Counter(a_i).items():
        if items[1] >= 2:
            pre_cnt = 0
            if items[1] >= 3:
                pre_cnt = len(list(itertools.combinations(range(items[1] - 1), 2)))

            now_cnt = len(list(itertools.combinations(range(items[1]), 2)))
            count_item[items[0]] = (now_cnt, pre_cnt)
            all_cnt += now_cnt
        else:
            count_item[items[0]] = (0, 0)

    for k in a_i:
        items = count_item[k]
        print(all_cnt - (items[0] - items[1]))


if __name__ == '__main__':
    main()


Fixed submission:
# -*- coding: utf-8 -*-
import collections
import itertools


def main():
    n = int(input())
    a_i = tuple(map(int, input().split()))

    count_item = {}
    all_cnt = 0
    for items in collections.Counter(a_i).items():
        if items[1] >= 2:
            now_cnt = int(items[1] * (items[1] - 1) / 2)
            pre_cnt = now_cnt - items[1] + 1
            count_item[items[0]] = (now_cnt, pre_cnt)
            all_cnt += now_cnt
        else:
            count_item[items[0]] = (0, 0)

    for k in a_i:
        items = count_item[k]
        print(all_cnt - (items[0] - items[1]))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n, a, b = map(int, input().split())

temp_plus = ("1" * a) + ("0" * b)
temp = ""
while len(temp) <= n:
    temp += temp_plus

print(temp[0:n].count("1"))


Fixed submission:
# -*- coding: utf-8 -*-

n, a, b = map(int, input().split())

temp = n // (a + b)
amari = n % (a + b)
result = temp * a

if amari >= a:
    result += a
else:
    result += amari

print(result)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
from collections import deque

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


monster = deque()
def main():
    h = input_int()

    monster.append(h)

    cnt = 0
    while len(monster) != 0:
        cnt += 1
        temp = monster.popleft()
        if temp != 1:
            val = temp // 2
            monster.append(val)
            monster.append(val)

    return cnt


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


Fixed submission:
# -*- coding: utf-8 -*-

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    h = input_int()

    result = 0
    mon_cnt = 1
    while h != 0:
        result += mon_cnt
        mon_cnt *= 2
        h = (h // 2)

    return result


if __name__ == "__main__":
    print(main())
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    h, n = input_to_int_map()
    ab = [input_to_int_tuple() for i in range(n)]

    x = max(a for a, b in ab)

    dp = [0] * (h + x)
    for i in range(1, h + 1):

        min_val = 9999999999
        for a, b in ab:
                min_val = min(min_val, dp[i - a] + b)

        dp[i] = min_val

    return dp[h]


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


Fixed submission:
# -*- coding: utf-8 -*-

# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    h, n = input_to_int_map()
    ab = [input_to_int_tuple() for i in range(n)]

    x = max(a for a, b in ab)

    dp = [0] * (h + x)
    for i in range(1, h + 1):

        dp[i] = min(dp[i - a] + b for a, b in ab)

    return dp[h]


if __name__ == "__main__":
    print(main())
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    a, b = input_to_int_map()
    import itertools
    _a = itertools.repeat(str(a), b)
    _b = itertools.repeat(str(b), a)
    ret = _b
    if _a < _b:
        ret = _a

    return ret


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


Fixed submission:
# -*- coding: utf-8 -*-


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    a, b = input_to_int_map()
    import itertools
    _a = "".join(itertools.repeat(str(a), b))
    _b = "".join(itertools.repeat(str(b), a))
    ret = _b
    if _a < _b:
        ret = _a

    return ret


if __name__ == "__main__":
    print(main())
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-


def main():
    n, k = map(int, input().split())
    h_list = list(map(int, input().split()))

    dp = [0] + [9999999999] * (n - 1)

    for i in range(n):
        for j in range(1, k + 1):
            if i - j >= 0:
                dp[i] = min(dp[i], dp[i - j] + abs(h_list[i] - h_list[i - j]))

    print(dp[-1])


if __name__ == '__main__':
    main()


Fixed submission:
# -*- coding: utf-8 -*-


def main():
    n, k = map(int, input().split())
    h_list = list(map(int, input().split()))

    dp = [0] + [9999999999] * (n - 1)

    for i in range(n):
        for j in range(1, k + 1):
            if i - j >= 0:
                dp[i] = min(dp[i], dp[i - j] + abs(h_list[i] - h_list[i - j]))

    print(dp[-1])


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-


def main():
    n, w = map(int, input().split())
    items = [tuple(map(int, input().split())) for i in range(n)]

    dp = [{} for i in range(n + 1)]

    for i, item in enumerate(items):
        for i_w in range(w + 1):
            if i_w >= item[0]:
                dp[i + 1][i_w] = max(dp[i].get(i_w - item[0], 0) + item[1], dp[i].get(i_w, 0))
            else:
                dp[i + 1][i_w] = dp[i].get(i_w, 0)

    print(dp[n][w])


if __name__ == '__main__':
    main()


Fixed submission:
# -*- coding: utf-8 -*-


def main():
    n, w = map(int, input().split())
    items = [tuple(map(int, input().split())) for i in range(n)]

    dp = [[0] * (w + 1) for i in range(n + 1)]

    for i, item in enumerate(items):
        for i_w in range(w + 1):
            if i_w >= item[0]:
                dp[i + 1][i_w] = max(dp[i][i_w - item[0]] + item[1], dp[i][i_w])
            else:
                dp[i + 1][i_w] = dp[i][i_w]

    print(dp[n][w])


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-


def main():
    n, w = map(int, input().split())
    items = [tuple(map(int, input().split())) for i in range(n)]

    dp = [[0] * (w + 1) for i in range(n + 1)]

    for i, item in enumerate(items):
        for i_w in range(w + 1):
            if i_w >= item[0]:
                dp[i + 1][i_w] = max(dp[i][i_w - item[0]] + item[1], dp[i][i_w])
            else:
                dp[i + 1][i_w] = dp[i][i_w]

    print(dp[n][w])


if __name__ == '__main__':
    main()


Fixed submission:
# -*- coding: utf-8 -*-


def main():
    n, w = map(int, input().split())
    items = [tuple(map(int, input().split())) for i in range(n)]

    dp = [[0] * (w + 1) for i in range(n + 1)]

    for i, item in enumerate(items):
        for i_w in range(w + 1):
            if i_w >= item[0]:
                dp[i + 1][i_w] = max(dp[i][i_w - item[0]] + item[1], dp[i][i_w])
            else:
                dp[i + 1][i_w] = dp[i][i_w]

    print(dp[n][w])


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-


def main():
    n, y = map(int, input().split())

    a, b, c = -1, -1, -1
    for ia in range(n + 1):
        for ib in range(n - ia + 1):
            ic = n - ia - ib
            total = ia * 10000 + ib * 5000 + ic * 1000
            if total == y and (ia + ib + ic) == n:
                a = ia
                b = ib
                c = ic
                break

    print(f"{a} {b} {c}")


if __name__ == '__main__':
    main()




Fixed submission:
# -*- coding: utf-8 -*-


def main():
    n, y = map(int, input().split())

    a, b, c = -1, -1, -1
    for ia in range(n + 1):
        for ib in range(n - ia + 1):
            ic = n - ia - ib
            total = ia * 10000 + ib * 5000 + ic * 1000
            if total == y and (ia + ib + ic) == n:
                a = ia
                b = ib
                c = ic
                break

    print(" ".join(map(str, (a, b, c))))


if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math


def main():
    n, y = map(int, input().split())

    a, b, c = -1, -1, -1
    for ia in range(n + 1):
        for ib in range(n - ia + 1):
            ic = n - ia - ib
            total = ia * 10000 + ib * 5000 + ic * 1000
            if total == y and (ia + ib + ic) == n:
                a = ia
                b = ib
                c = ic
                break

    print(f"{a} {b} {c}")


if __name__ == '__main__':
    main()




Fixed submission:
# -*- coding: utf-8 -*-


def main():
    n, y = map(int, input().split())

    a, b, c = -1, -1, -1
    for ia in range(n + 1):
        for ib in range(n - ia + 1):
            ic = n - ia - ib
            total = ia * 10000 + ib * 5000 + ic * 1000
            if total == y and (ia + ib + ic) == n:
                a = ia
                b = ib
                c = ic
                break

    print(" ".join(map(str, (a, b, c))))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
X, N = map(int,input().split())
p = sorted(list(map(int, input().split())))
P = list(range(1, 101))
[P.remove(pp) for pp in p]
p_min_abs = 10000000
for pp in P:
    if abs(pp - X) < p_min_abs:
        p_min_abs = abs(pp - X)
        p_min = pp
print(p_min)

Fixed submission:
X, N = map(int,input().split())
p = sorted(list(map(int, input().split())))
P = list(range(-1, 103))
[P.remove(pp) for pp in p]
p_min_abs = 10000000

for pp in P:
    if abs(pp - X) < p_min_abs:
        p_min_abs = abs(pp - X)
        p_min = pp
print(p_min)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

if 0 in A:
    print(0)
else:
    ans = 1
    for a in A:
        ans *= a
    
    if ans > 10**18:
        print(-1)
    else:
        print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))

flag = 0

if 0 in A:
    print(0)
else:
    ans = 1
    for a in A:
        ans *= a
        if ans > 10**18:
            flag = 1
            break
    if flag == 0:
        print(ans)
    else:
        print(-1)
Buggy python submission (verdict: Runtime Error):
import math
A, B, H, M=map(int,input().split())

if (H == 0) & (M == 0):
    print(0)
else:
    ang_m = M * 6
    ang_h = H　* 30 + M * 0.5
    ang = max(ang_h, ang_m) - min(ang_h, ang_m)

    C = math.sqrt(A**2 + B**2 - 2*A*B * math.cos(math.radians(ang)))
    print(C)

Fixed submission:
import math
A, B, H, M=map(int,input().split())

ang_m = M * 6
ang_h = H * 30 + M * 0.5
ang = max(ang_h, ang_m) - min(ang_h, ang_m)

C = math.sqrt(A**2 + B**2 - 2*A*B * math.cos(math.radians(ang)))
print(C)

Buggy python submission (verdict: Runtime Error):
import math
A, B, H, M=map(int,input().split())
if (H == 0) & (M == 0):
    print(0)
elif ()
else:
    if M != 0:
        ang_m = M / 60 * 360
    else:
        ang_m = 0
    ang_h = (H + M / 60) / 12 * 360
    ang = max(ang_h, ang_m) - min(ang_h, ang_m)
    if ang > 180:
        ang = 360 - ang
    C = math.sqrt(A**2 + B**2 - 2*A*B * math.cos(math.radians(ang)))
    print(C)

Fixed submission:
import math
A, B, H, M=map(int,input().split())

ang_m = M * 6
ang_h = H * 30 + M * 0.5
ang = max(ang_h, ang_m) - min(ang_h, ang_m)

C = math.sqrt(A**2 + B**2 - 2*A*B * math.cos(math.radians(ang)))
print(C)