This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 트리 노드 | |
function Node(value, parent = null) { | |
this.value = value; // 덧셈사슬을 구할 수 | |
this.parent = parent; // 부모 노드 | |
this.count = 0; // 최소덧셈 | |
} | |
function getAdditionChain(to = 99) { | |
const minCounts = new Array(to + 1).fill(to); | |
minCounts[0] = null; // 배열은 1부터 사용합니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 숫자를 한글발음대로 표기 | |
* 구글 스프레드시트에서는 아래의 함수가 없어서 구현함. | |
* 한글만 지원. (원래 함수는 한자 등의 다양한 타입을 지원함) | |
*/ | |
function numberstring(num) { | |
var namesInSeat = ['', '일', '이', '삼', '사', '오', '육', '칠', '팔', '구'], | |
namesInSeats = ['', '십', '백', '천'], | |
namesInFourSeat = ['', '만', '억', '조'], |