목록배수판정법 (1)
이야기박스
Quiz) 3의 배수인지 확인해보자
Problem Given a string str representing a number having N digits, the task is to calculate the number of ways to make the given number divisible by 3 by changing at most one digit of the number. 특정 정수 N이 주어집니다. 그리고 우리는 이 정수 N에서 하나의 자릿수의 숫자를 변경할 수 있습니다. 이때 변경할 수 있는 숫자 중, 3으로 나누어질 수 있는 숫자는 몇 개인지 확인해보는 문제입니다. Example 예시는 다음과 같습니다. Input: str[] = “23” Output: 7 Explanation: Below are the numbers tha..
Computer & Data/Algorithm
2022. 3. 13. 15:34