[2019 QR] forgone solution

정은경·2020년 3월 29일
0

1. 문제

2019년 코드잼 자격문제


2. 나의 풀이

3. 남의 풀이

tc = int(input())

def solve(n):
    a = int(str(n).replace('4','3'))
    b = n-a
    return str(a) + " " + str(b)

for t in range(1, tc+1):
    n = int(input())
    ans=solve(n)
    print("Case #" + str(t) + ": " + ans)

4. Reference

5. 느낀점

  • 입력되는 수가 10**100 까지임으로! 계산의 복잡도를 줄이는 것이 포인트!
profile
#의식의흐름 #순간순간 #생각의스냅샷

0개의 댓글