diff --git a/code_study/Baekjoon/python/13241.py b/code_study/Baekjoon/python/13241.py new file mode 100644 index 0000000..3ffa4ed --- /dev/null +++ b/code_study/Baekjoon/python/13241.py @@ -0,0 +1,5 @@ +A, B = map(int, input().split()) +temp = A*B +while B != 0 : + A, B = B, A%B +print(temp//A) \ No newline at end of file diff --git a/code_study/Baekjoon/python/1735.py b/code_study/Baekjoon/python/1735.py new file mode 100644 index 0000000..c73f773 --- /dev/null +++ b/code_study/Baekjoon/python/1735.py @@ -0,0 +1,18 @@ +def gcd(n,m) : + temp = [n,m] + n = max(temp) + m = min(temp) + if m==0 : + return n + return gcd(m,n%m) + +def lcm(n,m) : + return n*m//gcd(n,m) + +a,b = map(int,input().split()) +c,d = map(int,input().split()) +denom = lcm(b,d) +num = a*(denom//b) + c*(denom//d) + +factor = gcd(num, denom) +print(num//factor, denom//factor) \ No newline at end of file diff --git a/code_study/Baekjoon/python/1934.py b/code_study/Baekjoon/python/1934.py new file mode 100644 index 0000000..c924a6b --- /dev/null +++ b/code_study/Baekjoon/python/1934.py @@ -0,0 +1,6 @@ +for _ in range(int(input())) : + A, B = map(int, input().split()) + temp = A*B + while B != 0 : + A, B = B, A%B + print(temp//A) \ No newline at end of file