• + 0 comments

    Python3

    dr, mr, yr = map(int, input().split())
    dd, md, yd = map(int, input().split())
    fine = 0
    if yr > yd:
        fine = 10000
    elif yr == yd:
        if mr > md:
            fine = 500 * (mr-md)
        elif mr == md:
            if dr > dd:
                fine = 15 * (dr-dd)
    print(fine)