728x90

어렵지 않은 문제였는데, 1로 바꾼뒤 1의 개수를 구하느라고 메모리 초과가 났다.

from collections import deque
import sys
import math
 
 
A, B = map(int, input().split())
print('1' * math.gcd(A, B))
728x90

+ Recent posts