BOJ - 1356 - 유진수

Updated:

def solution():
    N = str(input())

    for i in range(1, len(N)):
        a = N[ : i]
        b = N[i : ]

        first = 1
        second = 1
        for i in a:
            first *= int(i)
        for i in b:
            second *= int(i)

        if first == second:
            print("YES")
            return
    print("NO")

solution()

https://www.acmicpc.net/problem/1356

Categories:

Updated:

Leave a comment