Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/algorithm/lcm_normal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
# NOTE: if already solved GCD, you can use.
# CANNOT use library

def lcm(a, b):
return 0
import math
def lcm(a, b) :
return a * b // math.gcd(a, b)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

すでに実装しているgcdを使ってみてください.