제출 #328085

#제출 시각아이디문제언어결과실행 시간메모리
328085model_codeEuklid (COCI20_euklid)Cpython 3
110 / 110
23 ms2944 KiB
#!/usr/bin/python3
import math

T = int(input())
for _ in range(T):
    g, h = list(map(int, input().split()))

    h_pow = h
    while h_pow <= g:
        h_pow *= h

    b = g * math.ceil(h_pow / g) 
    a = h * b + g

    print(a, b)
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...