룬 알고리즘/Luhn Algorithm
Luhn Algorithm (youtube.com) 일단 나보다 설명을 잘하는 인도아저씨가 나타나 설명을 해주고 있어요 요약 1. Starting from the rightmost digit (the check digit), double the value of every second digit. 2. If doubling a digit results in a number greater than 9, subtract 9 from the product. 3. Sum up all the digits.If the total sum is divisible evenly by 10, then the number is valid according to the Luhn algorithm. 파이썬 코드 def verify..
2023.12.30