본문으로 건너뛰기

계산기2(r253판 Blame)

r253
r192
1[[분류:냥]][[분류:계산용 틀]][Include(틀:상세 내용, 설명대상=원본, 문서명=틀\:구 계산기2)][Include(틀:상세 내용, 설명대상=떼어낸 계산기, 문서명=틀\:계산기2-1)]{{{#!wiki style="display: none;"
r129
2##디버그용 if 문법 ("문자열" 값으로 정의해야 합니다.)
3{{{#!if a= ,b= ,f=
r182
4}}}
r209
5##== 변수 설명 ==
r50
6'''as''' : "a" value to string; '''bs''' : "b" value to string;
r51
7'''al''' : "a" string length (integer); '''bl''' : "b" string length (integer)
8'''ad''' : "a" decimal point (integer); '''bd''' : "b" decimal point (integer);
9'''au''' : --gold-- "a" upper value (string→integer); '''bu''' : "b" upper value (string→integer);
10'''ab''' : "a" below value (string→integer); '''bb''' : "b" below value (string→integer);
r202
11'''ap''' : "a" # of places of decimal (for addition or subtraction);
r207
12'''ac''' : a '''c'''onstant of "a" for division (integer);
r202
13'''bp''' : "b" # of places of decimal (for addition or subtraction);
r207
14'''bc''' : a '''c'''onstant of "b" for division (integer);
r50
150.303과 0.0303은 다른 수이므로 자리수가 다름을 표시할 용도
r73
16'''ru''' : "result" upper value (integer→string); '''rb''' : "result" below value (integer→string);
17'''rp''' : "result" # of places of decimal (integer);
r117
18'''rs''' : "result" suprerior value (integer→string); '''ri''' : "result" inferior value (integer→string);
r209
19'''i''' : index;
20'''tu''' : temporary value 1 (integer); '''tv''' : temporary value 2 (integer);
r235
21'''tw''' : temporary value 3 (integer); '''tx''' : temporary value 4 (integer→string);
22'''ty''' : temporary value 5 (integer); '''tz''' : temporary value 6 (integer);
r228
23'''pd''' : padding with zeros. (string)
r208
24'''ps''' : pass (logical); '''ts''' : --not about gender-- test (logical) ; '''br''' : break (logical);
r209
25'''ea''' : error code about "a" (integer); '''eb''' : error code about "b" (integer);
26'''wa''' : warning code about "a" (integer); '''wb''' : warning code about "b" (integer);
27'''ma''' : message about "a" (string); '''mb''' : message about "b" (string);
28'''tm''' : temporary string, or transaction message (string); '''tn''' : temporary string 2 (string);
r158
29'''ns''' : negative sign for multiplication and division (string);
r209
30
31##== 초기화 ==
32값을 미리 정의하여 초기화합니다. 중간에 --장난으로-- 계산에 사용되는 변수에 값을 부여한 채로 include 하더라도 이를 무시합니다.
r231
33{{{#!if this.as=a.toString(), this.bs=b.toString(), this.rs=0+0, this.ru=0+0, this.rb=0+0, this.ri=0+0, this.rp=0+0, this.i=0+0, this.tu=0, this.tv=1+0, this.tw=0, this.tx=0, this.ty=0, this.ea=0+0, this.eb=0+0, this.wa=0+0, this.wb=0+0, this.ps=false, this.ts=false, this.br=false, this.ns="", this.ma="", this.mb="", this.tm="", this.tn="", this.pd="000000000000000000"
r135
34}}}{{{#!if this.al=as.length, this.bl=bs.length, this.ad=as.indexOf("."), this.bd=bs.indexOf(".")
r48
35}}}{{{#!if ad!=-1
r126
36소수점이 발견되는 자리 번호가 ad이므로 ad+1번에 해당되는 자리부터 끝까지 표기합니다.
r51
37{{{#!if this.au=as.substr(0,ad), this.ab=as.substr(ad+1, al-ad-1), this.ap=ab.length
r59
38}}}{{{#!if (au=="")||(au=="-")||(au=="+")
r125
39.12345 식으로 또는 -.12345 식으로 기입할 경우 upper 값을 0으로 부여합니다.
r57
40{{{#!if au="0"
r51
41}}}}}}}}}{{{#!if ad==-1
r126
42소수점이 존재하지 않을 경우 au 문자열 길이값을 ad로 정의합니다. au의 마지막 문자열 index는 ad-1이 됩니다.
r125
43{{{#!if this.au=as, ab="", ap=0+0, ad=au.length
r48
44}}}}}}{{{#!if bd!=-1
r92
45{{{#!if this.bu=bs.substr(0,bd), this.bb=bs.substr(bd+1, bl-bd-1), this.bp=bb.length
r59
46}}}{{{#!if (bu=="")||(bu=="-")||(bu=="+")
r57
47{{{#!if bu="0"
r48
48}}}}}}}}}{{{#!if bd==-1
r125
49{{{#!if this.bu=bs, bb="", bp=0+0, bd=bu.length
r46
50}}}}}}
r54
51
r207
52##== 유효성 검사 ==
r212
53the seed에서 지원되는 long(integer)가 unsigned였으면 1844경까지 가서 충분히 19자리로 놀 수 있었는데, signed long이므로 922경까지 가능한 공간에서 18자리로 잘라내기를 합니다. (소수점 위 최대 18자리, 소수점 아래 최대 18자리)
r55
54
r207
55(반점(,)을 자동적으로 생략하고 들어가는 것은 나중에 생각하겠습니다.)
r212
56
r218
57{{{#!if (as!=null)&&(bs!=null)
58a와 b 모두 입력되었을 때, br와 ts 변수를 이용하여 순차적으로 검사를 진행합니다. 도중 문제가 있으면 (br를 true로 반환하고) 오류 코드를 내도록 만듭니다. a를 먼저 보며, 소수점 윗부분을 먼저 본 다음 소수점 아랫부분을 봅니다.
r211
59변수 tm와 tn을 가져와 유효성 검사를 실행합니다.
60먼저 소수점을 2개 이상 입력했음이 탐지된다면 오류코드 5번(이중 소수점 표기)을 반환합니다.
61소수점을 입력하면 indexOf와 lastIndexOf는 서로 다른 값을 가리키게 됩니다. 소수점을 입력하지 않았을 경우 indexOf와 lastIndexOf는 -1로 서로 같은 값을 가리키게 됩니다.
r217
62{{{#!if ts=(as.indexOf(".")==as.lastIndexOf(".")),
r211
63}}}{{{#!if !ts&&!br
64{{{#!if br=true, ea=5
65}}}}}}
r209
66
r211
67문제가 없으면 au를 tm으로 복제하고 검사를 계속 합니다.
68앞자리가 마이너스(-)일 경우 이를 잘라냅니다.
69{{{#!if ts&&!br
r215
70{{{#!if tm=au, tm[0]==45
r214
71{{{#!if tm=tm.substr(1)
r215
72}}}}}}
r209
73소수점 윗자릿수가 넘치면 오류코드 1번(오버플로)를 반환합니다.
r211
74{{{#!if ts=(tm.length<=18)
75}}}}}}
76{{{#!if !ts&&!br
r208
77{{{#!if br=true, ea=1
78}}}}}}
r209
79
r244
80의도적으로 00을 적어놓았을 수 있으므로 tm 앞에 숫자 1을 더 붙인 다음, 이를 값으로 바꾼 다음 다시 텍스트 값으로 바꾼 문자열을 tn으로 정의합니다. 중간에 숫자가 아닌 문구가 들어갔다면 숫자가 아닌 문구가 들어간 부분부터 값이 잘려 나오게 됩니다.
r211
81숫자가 아닌 문구를 섞어넣었음이 탐지될 경우 오류코드 6번(소수점 윗자리 오류)을 반환합니다. (반점(,)도 걸릴 수 있습니다.)
r208
82{{{#!if ts&&!br
r211
83{{{#!if tm="1"+tm, tn=+tm, tn=tn.toString(), ts=(tm==tn)
r208
84}}}}}}
r211
85{{{#!if !ts&&!br
86{{{#!if br=true, ea=6
87}}}}}}
r209
88
r211
89소수점 아래 부분을 검사합니다. 앞에서 소수점 개수를 검사했으므로 소수점 아래 부분에 점(.)이 더 이상 나올 수 없습니다.
90소수점 아래 입력한 자릿수가 19자리를 넘어가면 오류 대신 경고코드 1번(소수점 아래 자릿수 너무 많음)을 반환하고 소수점 아래 자릿수를 최대 18자리로 잘라냅니다. (이하 이상한 문구를 섞어도 이를 계산에 넣지 않게 됩니다.)
r208
91{{{#!if ts&&!br
r211
92{{{#!if ab.length>=19
93{{{#!if wa=1, ab=ab.substr(0,18), ap=18
r199
94}}}}}}
r211
95
r212
96앞에서 소수점 아래 자릿수를 18자 이하로 줄였습니다. 문자열에서 자릿수에 해당하는 index가 비어있다면 해당 문자열의 주소값은 null이 나옵니다. (예:"테스트"[3]==null) 숫자는 문자열 각 자릿수 문자열의 유니코드 값이 null이 아닌 이상 48 이상 57 이하이며, 이를 이용하여 소수점 아래 18자리에 대해 유효성 검사를 합니다.
97{{{#!if ts=(((ab[0]==null)||((ab[0]>=48)&&(ab[0]<=57)))&&((ab[1]==null)||((ab[1]>=48)&&(ab[1]<=57)))&&((ab[2]==null)||((ab[2]>=48)&&(ab[2]<=57)))&&((ab[3]==null)||((ab[3]>=48)&&(ab[3]<=57)))&&((ab[4]==null)||((ab[4]>=48)&&(ab[4]<=57)))&&((ab[5]==null)||((ab[5]>=48)&&(ab[5]<=57)))&&((ab[6]==null)||((ab[6]>=48)&&(ab[6]<=57)))&&((ab[7]==null)||((ab[7]>=48)&&(ab[7]<=57)))&&((ab[8]==null)||((ab[8]>=48)&&(ab[8]<=57)))&&((ab[9]==null)||((ab[9]>=48)&&(ab[9]<=57)))&&((ab[10]==null)||((ab[10]>=48)&&(ab[10]<=57)))&&((ab[11]==null)||((ab[11]>=48)&&(ab[11]<=57)))&&((ab[12]==null)||((ab[12]>=48)&&(ab[12]<=57)))&&((ab[13]==null)||((ab[13]>=48)&&(ab[13]<=57)))&&((ab[14]==null)||((ab[14]>=48)&&(ab[14]<=57)))&&((ab[15]==null)||((ab[15]>=48)&&(ab[15]<=57)))&&((ab[16]==null)||((ab[16]>=48)&&(ab[16]<=57)))&&((ab[17]==null)||((ab[17]>=48)&&(ab[17]<=57))))
r199
98}}}}}}
r211
99소수점 아래 자리에 입력한 부분이 문제가 있으면 오류코드 7번(소수점 아랫자리 오류)를 반환합니다.
r209
100{{{#!if !ts&&!br
r211
101{{{#!if br=true, ea=7
r209
102}}}}}}
103
r212
104이와 같은 방법으로 b도 bu를 tm으로 복제하는 과정을 포함하여 유효성 검사를 실행합니다. 오류코드는 동일합니다.
r213
105a와 b를 각각 진단해야 하므로 br를 false로 초기화합니다.
106{{{#!if br=false, ts=(bs.indexOf(".")==bs.lastIndexOf("."))
107}}}{{{#!if !ts&&!br
r212
108{{{#!if br=true, eb=5
109}}}}}}
110{{{#!if ts&&!br
r215
111{{{#!if tm=bu, tm[0]==45
r214
112{{{#!if tm=tm.substr(1)
r212
113}}}}}}{{{#!if ts=(tm.length<=18)
114}}}}}}{{{#!if !ts&&!br
115{{{#!if br=true, eb=1
116}}}}}}
117{{{#!if ts&&!br
118{{{#!if tm="1"+tm, tn=+tm, tn=tn.toString(), ts=(tm==tn)
119}}}}}}{{{#!if !ts&&!br
120{{{#!if br=true, eb=6
121}}}}}}
122{{{#!if ts&&!br
123{{{#!if bb.length>=19
124{{{#!if wb=1, bb=bb.substr(0,18), bp=18
125}}}}}}{{{#!if ts=(((bb[0]==null)||((bb[0]>=48)&&(bb[0]<=57)))&&((bb[1]==null)||((bb[1]>=48)&&(bb[1]<=57)))&&((bb[2]==null)||((bb[2]>=48)&&(bb[2]<=57)))&&((bb[3]==null)||((bb[3]>=48)&&(bb[3]<=57)))&&((bb[4]==null)||((bb[4]>=48)&&(bb[4]<=57)))&&((bb[5]==null)||((bb[5]>=48)&&(bb[5]<=57)))&&((bb[6]==null)||((bb[6]>=48)&&(bb[6]<=57)))&&((bb[7]==null)||((bb[7]>=48)&&(bb[7]<=57)))&&((bb[8]==null)||((bb[8]>=48)&&(bb[8]<=57)))&&((bb[9]==null)||((bb[9]>=48)&&(bb[9]<=57)))&&((bb[10]==null)||((bb[10]>=48)&&(bb[10]<=57)))&&((bb[11]==null)||((bb[11]>=48)&&(bb[11]<=57)))&&((bb[12]==null)||((bb[12]>=48)&&(bb[12]<=57)))&&((bb[13]==null)||((bb[13]>=48)&&(bb[13]<=57)))&&((bb[14]==null)||((bb[14]>=48)&&(bb[14]<=57)))&&((bb[15]==null)||((bb[15]>=48)&&(bb[15]<=57)))&&((bb[16]==null)||((bb[16]>=48)&&(bb[16]<=57)))&&((bb[17]==null)||((bb[17]>=48)&&(bb[17]<=57))))
126}}}}}}{{{#!if !ts&&!br
127{{{#!if br=true, eb=7
r218
128}}}}}}}}}
r211
129
r209
130##== 2차 초기화 ==
131입력한 소수점 아래에 입력한 값을 정리합니다. 이에 따라 ap, bp값도 다시 조정됩니다.
r223
132{{{#!if (ap>9)&&(ab.substr(ap-9,9)=="000000000")
r221
133{{{#!if ab=ab.substr(0,ap-9), ap=ap-9
r209
134}}}}}}
r223
135{{{#!if (ap>4)&&(ab.substr(ap-4,4)=="0000")
r209
136{{{#!if ab=ab.substr(0,ap-4), ap=ap-4
137}}}}}}
r223
138{{{#!if (ap>2)&&(ab.substr(ap-2,2)=="00")
r209
139{{{#!if ab=ab.substr(0,ap-2), ap=ap-2
140}}}}}}
r223
141{{{#!if (ap>2)&&(ab.substr(ap-2,2)=="00")
r209
142{{{#!if ab=ab.substr(0,ap-2), ap=ap-2
143}}}}}}
r223
144{{{#!if (ap>1)&&(ab.substr(ap-1,1)=="0")
r209
145{{{#!if ab=ab.substr(0,ap-1), ap=ap-1
146}}}}}}
r223
147{{{#!if (bp>9)&&(bb.substr(bp-9,9)=="000000000")
r221
148{{{#!if bb=bb.substr(0,bp-9), bp=bp-9
r209
149}}}}}}
r223
150{{{#!if (bp>4)&&(bb.substr(bp-4,4)=="0000")
r209
151{{{#!if bb=bb.substr(0,bp-4), bp=bp-4
152}}}}}}
r223
153{{{#!if (bp>2)&&(bb.substr(bp-2,2)=="00")
r209
154{{{#!if bb=bb.substr(0,bp-2), bp=bp-2
155}}}}}}
r223
156{{{#!if (bp>2)&&(bb.substr(bp-2,2)=="00")
r209
157{{{#!if bb=bb.substr(0,bp-2), bp=bp-2
158}}}}}}
r223
159{{{#!if (bp>1)&&(bb.substr(bp-1,1)=="0")
r209
160{{{#!if bb=bb.substr(0,bp-1), bp=bp-1
161}}}}}}
r207
162
r231
163유효성 검사에 쓰인 tm과 tn 값을 빈 문자열 값으로 초기화합니다.
164{{{#!if tm="", tn=""
165}}}
166
r207
167##== 덧셈, 뺄셈 ==
r66
168덧셈과 뺄셈 계산과정을 적어봅니다.
169{{{#!if (f=="+")||(f=="-")
r76
170
171a과 b의 소수점 윗부분은 정수이므로 쉽게 계산할 수 있습니다.
172{{{#!if f=="+"
173{{{#!if ru=(+au)+(+bu)
174}}}}}}
175{{{#!if f=="-"
176{{{#!if ru=(+au)-(+bu)
177}}}}}}
178
r125
179a와 b 모두가 정수이면 ap==0, bp==0이 되며, 이런 경우에는 소수점 아래 자릿수를 검산할 필요가 없습니다. a와 b 중 소수점 아래 자릿수가 있는 수가 있을 때에만 소수점 윗자리의 계산값이 얼마가 나오느냐를 보면서 소수점 아래의 자릿수를 정리하는 과정이 의미가 있습니다.
r76
180{{{#!if (ap>0)||(bp>0)
r142
181만약 소수점 아래를 계산한다면 자릿수를 똑같이 맞춰야 의미가 있으므로, 자릿수가 다른 경우 자릿수가 같게 만드는 과정을 먼저 거칩니다. 이를테면 a의 소수점 자릿수가 b의 소수점 자릿수보다 많으면 b뒤에 0을 더 추가하는 방식으로 변경합니다. b 자체가 정수여도 앞에 (소수점이 없을 경우) 이미 bb="", bp=0+0으로 초기화했으므로 동작될 것입니다.
182소수점 아래 최대 18자리까지의 수를 취급하므로 최대 18칸 차이가 나게 됩니다.
183○○○○○○○○○□□□□○○□□○ 과 같이 9칸, 4칸, 2칸, 2칸, 1칸씩 차이가 나면 그 정도를 보정하게 됩니다.
184ap>bp에서 ap-bp>0이 됩니다. ap-bp는 곧 ap가 bp보다 몇 칸만큼 더 많은지를 나타냅니다.
r161
185{{{#!if ap>bp
r228
186{{{#!if bp=ap, bb+=pd
r161
187}}}{{{#!if bb=bb.substr(0,ap)
r66
188}}}}}}
r67
189
190반대로 b의 소수점 자릿수가 많은 경우도 있습니다.
r161
191{{{#!if bp>ap
r228
192{{{#!if ap=bp, ab=ab+pd
r161
193}}}{{{#!if ab=ab.substr(0,bp)
r67
194}}}}}}
r161
195
r71
196위의 과정을 거치게 되면 소수점 아래 최대 자릿수를 똑같이 맞춘 상태에서 계산하게 되므로 ap==bp가 됩니다.
r66
197
r71
198a가 음수인 경우 소수점 아래 값은 순 숫자만 표기된 상태이므로 양수 취급으로 되지 않게 소수점 아래 값인 ab에 음수 표기를 남깁니다.
r68
199{{{#!if as[0]==45
200{{{#!if ab="-"+ab
201}}}}}}
r123
202마찬가지로 b가 음수인 경우 b의 소수점 아래 값은 음수이므로 소수점 아래 값인 bb에 음수 표기를 남깁니다. 10을 소수점 아래 자릿수만큼 제곱한 값으로 저장합니다.
r68
203{{{#!if bs[0]==45
204{{{#!if bb="-"+bb
205}}}}}}
206
r76
207이때 rb를 계산합니다.
r65
208{{{#!if f=="+"
r76
209{{{#!if rb=(+ab)+(+bb)
r65
210}}}}}}
211{{{#!if f=="-"
r76
212{{{#!if rb=(+ab)-(+bb)
r65
213}}}}}}
r75
214
r69
215소수점 아래끼리 더한 자릿수가 얼마나 되는지 보기 위해 rb를 문자열로 바꿉니다.
r86
216이 때 rb가 0이 아닐 경우에만 문자열로 변환합니다.
217{{{#!if (+rb>0)||(+rb<0)
r69
218{{{#!if this.rb=rb.toString()
219}}}
r71
220문자열로 된 rb의 길이를 rp로 정의합니다.
r69
221{{{#!if this.rp=rb.length
222}}}
r86
223}}}
r94
224
r73
225rb가 음수이면 rb의 첫번째(0번 index)의 문자열에는 마이너스(-)가 들어갑니다. 이 때는 rp를 rb의 마이너스 문자열을 세지 않은 자릿수가 되도록 앞에서 정의했던 rb.length에서 1만큼 줄여 정의합니다. ap, bp는 마이너스를 붙이기 전에 값이 고정되어 있으므로 rp처럼 줄일 필요가 없습니다.
r69
226{{{#!if rb[0]==45
r70
227{{{#!if rp=rp-1
r69
228}}}}}}
r57
229
r94
230ru값이 어떤지 보고 각 경우 rb값이 어떠한가에 따라 rb만 정리하거나 rb와 ru 모두 정리합니다.
r149
231중복 처리를 막기 위해 초기화된 ps 변수 하나를 가져옵니다.
r111
232
233소수점 아래 값의 부호와 소수점 위의 값의 부호가 서로 다른 경우 계산을 하기 위해 값을 하나 정의합니다.
234
r235
235{{{#!if tv=+(("1"+pd).substr(0,ap+1))
r162
236}}}
r111
237
r75
238Case 1 : ru가 0보다 큰 경우
r71
239ru는 정수이므로 ru가 0보다 크면 곧 ru는 1 이상의 정수이며, 1 이상이면 a+b 또는 a-b가 양수+음수 꼴이 되더라도 소수점 아래 정리를 하면 됩니다. rb를 정리하는 과정에서 ru에서 1을 빌려오거나 ru에 1이 더해질 수도 있습니다. 앞에서 rb를 string으로 바꿨으므로 +rb를 다룹니다.
r65
240{{{#!if ru>0
r75
241Case 1-1 : rb가 0 이상인 경우
r232
242{{{#!if (+rb>=0)&&!ps
r73
243rb가 소수점 아래 자릿수를 초과하여 소수점 위의 수를 계산하게 생겼다면 ap=bp인 상황에서 rp>ap가 됩니다. rb는 첫 숫자가 1인 정수가 되므로 첫 숫자인 1을 삭제한 문자열로 정의합니다.
r71
244{{{#!if rp>ap
245{{{#!if ru=ru+1, rb=rb.substr(1, rp-1)
r69
246}}}}}}
r73
247rb가 소수점 아래 자릿수를 초과하지 않을 경우 rb를 다시 정의할 필요 없이 그대로 둡니다.
r71
248{{{#!if rp<=ap
r72
249}}}
r104
250{{{#!if ps=true
r73
251}}}
r104
252}}}
r73
253
r94
254Case 1-2 : rb가 음수인 경우 ru에서 1을 빌려옵니다. 1보다 작은 양수값에서 1보다 작은 양수값을 빼면 -1보다 작을 수 없으며, 소수점 아래 자릿수가 초과되지 않습니다.
r232
255{{{#!if (+rb<0)&&!ps
r73
256{{{#!if ru=ru-1
257}}}
r111
258소수점 아래 자릿수인 ap만큼 10을 제곱한 값(tv)을 rb에서 증가시켜 rb를 재정의합니다. 그러면 rb는 양수가 됩니다. 그리고 rb를 다시 문자열로 변환합니다.
259{{{#!if rb=tv+(+rb)
r73
260}}}{{{#!if rb=rb.toString()
261}}}
r104
262{{{#!if ps=true
263}}}}}}
r73
264정리과정을 끝냈으면 ru를 string으로 변환합니다.
265{{{#!if this.ru=ru.toString()
r71
266}}}}}}
267
r75
268Case 2 : ru가 0인 경우 ru가 0이 되면 rb의 값이 양수인지 음수인지에 따라 달라집니다.
r65
269{{{#!if ru==0
r75
270Case 2-1 : rb가 0 이상인 경우
r232
271{{{#!if (+rb>=0)&&!ps
r73
272rb가 양수이면서 rb가 자릿수를 초과한 경우 rb는 첫 숫자가 1인 정수가 되므로 첫 숫자인 1을 삭제한 문자열로 정의합니다.
273{{{#!if rp>ap
274{{{#!if ru=ru+1, rb=rb.substr(1, rp-1)
r104
275}}}}}}{{{#!if ps=true
276}}}}}}
r75
277Case 2-2 : rb가 음수인 경우
r232
278{{{#!if (+rb<0)&&!ps
r75
279rb가 음수이면서 rb가 자릿수를 초과한 경우 값이 0인 ru에 1을 빼야 합니다. 그리고 rb가 "-"+숫자 꼴이므로 문자열의 1번 index에 해당하는 1을 지워야 합니다. 앞에서 rb가 음수인 경우 rp는 rb의 마이너스(-)가 차지하는 자릿수를 계산하지 않은 값 곧 숫자들이 차지하는 자릿수이므로, rb를 길이가 rp-1인 숫자들로 다시 정의합니다.
r73
280{{{#!if rp>ap
r75
281{{{#!if ru=ru-1, rb=rb.substr(2, rp-1)
282}}}}}}
283rb가 자릿수를 초과하지 않은 경우 rb에서 "-"를 뺀 문자열로 rb를 다시 정의합니다.
r101
284{{{#!if rp<=ap
r76
285{{{#!if rb=rb.substr(1, rp)
r104
286}}}}}}{{{#!if ps=true
287}}}}}}
r73
288정리과정을 끝냈으면 ru를 string으로 변환합니다.
289{{{#!if this.ru=ru.toString()
r65
290}}}
r75
291-0.xxxx 같이 (ru==0인데) 연산결과가 -1보다 큰 음수로 나오는 경우 ru 문자열 앞에 "-"를 붙입니다.
292f가 "+"인지 "-"인지에 따라 처음 rb를 정의할 때 적었던 식을 다시 불러옵니다.
293{{{#!if ((f=="+")&&((+ab)+(+bb)<0))||((f=="-")&&((+ab)-(+bb)<0))
294{{{#!if ru="-"+ru
295}}}}}}
r73
296}}}
r74
297
r75
298Case 3 : ru가 0보다 작은 경우. 곧 -1 이하인 음수가 되는 경우.
r65
299{{{#!if ru<0
r76
300Case 3-1 : rb가 0 이하인 경우
r232
301{{{#!if (+rb<=0)&&!ps
r76
302rb가 음수이면서 자릿수를 초과한 경우 ru에 -1을 빼고, rb의 음수기호(-)와 첫번째 숫자인 문자열 "1"을 뺀 문자열로 rb를 다시 정의합니다.
303{{{#!if rp>ap
r80
304{{{#!if rb=rb.substr(2, rp-1)
r65
305}}}
r80
306}}}
r107
307rb가 자릿수를 초과하지 않은 경우 rp는 음수기호를 제외한 숫자 자릿수이므로 rb를 음수기호만을 뺀 문자열로 다시 정의합니다. 단, rb가 0이 되면 rp==1이 되므로 rb==0인 경우는 제외합니다.
r101
308{{{#!if (rp<=ap)&&(+rb<0)
r106
309{{{#!if rb=rb.substr(1, rp)
r104
310}}}}}}{{{#!if ps=true
311}}}}}}
r82
312Case 3-2 : rb가 0보다 큰 경우. 소수점 아래 부분을 보면 -1보다 큰 음수값에서 -1보다 큰 음수값을 빼면 1보다 클 수 없으며, 소수점 아래 자릿수가 초과되지 않습니다.
r232
313{{{#!if (+rb>0)&&!ps
r82
314ru<=-1이므로 ru+1를 해도 최대 0이 됩니다.
315{{{#!if ru=ru+1
r75
316}}}
r111
317rb>0에서 rb은 음수(계산결과)의 음수(마이너스값이 줄어듦)이므로 rb의 자릿수인 rp만큼 10을 제곱한 값(tv)에서 rb을 '''뺀''' 값으로 rb를 재정의합니다. 그러면 rb는 양수이지만 계산결과인 음수에 맞춘 값이 됩니다. 그리고 rb를 다시 문자열로 변환합니다. 변환합니다.
318{{{#!if rb=tv-(+rb)
r82
319}}}{{{#!if rb=rb.toString()
r104
320}}}{{{#!if ps=true
321}}}}}}
r76
322정리과정을 끝냈으면 ru를 string으로 변환합니다.
323{{{#!if this.ru=ru.toString()
324}}}
325-0.xxxx 같이 (ru==0인데) 연산결과가 -1보다 큰 음수로 나오는 경우가 된다면 ru 문자열 앞에 "-"를 붙입니다.
326{{{#!if +ru==0
327{{{#!if ru="-"+ru
328}}}}}}
329}}}
330여기까지가 소수점 아래 자릿수 숫자들의 계산과정입니다.
331}}}
r71
332
r94
333a와 b 모두 정수인 경우 ap, bp는 모두 0이 되므로 ru만을 그대로 문자열로 바꾸면 되며 소수점 아래(rb)는 표기해야 할 필요가 없으므로 rb="", (소수점 아래 자릿수)rp=0을 반환합니다.
334{{{#!if (ap==0)&&(bp==0)
335{{{#!if this.ru=ru.toString(), rb="", rp=0+0
336}}}}}}
337
r95
338rb==0인 경우 rb="", rp=0을 반환합니다.
339{{{#!if +rb==0
340{{{#!if rb="", rp=0+0
341}}}}}}
342
r99
343이제 rb=""이 아닌 경우 소수점 아래 숫자 정리를 합니다.
344rp를 rb의 문자열 길이로 다시 정의합니다.
r97
345{{{#!if rb!=""
346{{{#!if this.rp=rb.length
r103
347}}}
r97
348
r99
349+"000100"을 숫자로 바꾸면 100이 되는 문제가 있습니다. 이처럼 소수점 아래 자릿수를 연산한 결과를 문자열로 바꿨을 때 기존 소수점 아래 자릿수보다 작은 길이가 나오면 앞쪽에 0을 보충합니다.
350앞에서 ap,bp를 똑같이 맞췄으므로 ap를 가져옵니다. 자릿수가 모자랄 경우 0을 하나씩 보충합니다.
351{{{#!if rp<ap
r228
352{{{#!if rb=pd.substr(0,ap-rp)+rb
r99
353}}}}}}
354
355앞에 0을 채웠다면 이제, 소수점 아래로 나오는 숫자를 보고 마지막에서부터 0이 나오면 한 자리씩 지우는 과정을 시작합니다.
356
r164
357여기까지가 덧셈 또는 뺄셈연산의 계산과정이며 과정은 이후 rb 정리 과정으로 넘어갑니다.
r166
358}}}}}}
r76
359
r186
360{{{#!if (f=="*")||(f=="/")
361곱셈 및 나눗셈 연산과정을 봅니다.
r64
36218자리 숫자로 입력할 수 있는 최대 정수는 999,999,999,999,999,999입니다.
363다행히 999,999,999,999,999,999*9=8,999,999,999,999,999,991 < long 한계치 9,223,372,036,854,775,807 이라서 a*각 자릿수로 덧셈해볼 수는 있습니다.
r120
364
r159
365음수가 될 경우 소수점 윗부분 문자열은 "-" 기호가 붙으므로, 이것을 이용한 조건문을 하나 만들어 a와 b 둘의 부호가 서로 다를 경우 (a만 음수이거나 b가 음수일 경우) 계산 결과에 부호를 표시할 수 있게 만듭니다.
366{{{#!if (au[0]==45)^(bu[0]==45)
367{{{#!if ns="-"
368}}}}}}
r126
369a 또는 b가 음수가 될 경우 소수점 윗부분 문자열인 au 또는 bu에서 마이너스(-)를 제거합니다.
370{{{#!if au[0]==45
371{{{#!if au=au.substr(1,ad-1)
372}}}}}}
373{{{#!if bu[0]==45
374{{{#!if bu=bu.substr(1,bd-1)
375}}}}}}
376
r206
377그 다음 --앞자리에 0만 여러 개 적어놓고 장난치는 사람이 있을까봐-- au를 값으로 바꾼 다음 다시 문자열로 변환하여 앞자리에 있는 0들을 모두 삭제합니다. bu도 그렇게 둡니다.
378{{{#!if au=+au, au=au.toString(), bu=+bu, bu=bu.toString()
379}}}
380
r207
381
r186
382a 또는 b값이 0이 되려면 au, ab 둘 다 0이 되거나 bu, bb 둘 다 0이 되어야 합니다. a 또는 b 값이 0일 경우 당연히 음수 부호가 표시되지 않습니다.
r174
383{{{#!if ((+au==0)&&(+ab==0))||((+bu==0)&&(+bb==0))
r190
384곱셈에서 0을 곱하면 0이 되므로, 곱셈의 경우 a 또는 b가 0이 될 때 계산 결과에 0을 반환합니다.
385{{{#!if f=="*"
r159
386{{{#!if rs="", ru="0", rb="", ri="", rp=0, ns=""
r133
387}}}}}}
r190
388나눗셈에서 나누는 수(b)가 0이 될 경우 오류를 반환하고 ps=true를 걸어 나눗셈 연산이 되지 않게 만듭니다.
389{{{#!if f=="/"
390{{{#!if ((+bu==0)&&(+bb==0))
391error code 03 번 : 0으로 나눌 수 없습니다.
392{{{#!if eb=03, ps=true
393}}}}}}
394나누는 수가 0이 아니면서 나눌 대상이 0이 될 경우 곱셈에서 0을 곱하는 것처럼 계산 결과에 0을 반환합니다.
395{{{#!if ((+au==0)&&(+ab==0))&&((+bu!=0)||(+bb!=0))
396{{{#!if rs="", ru="0", rb="", ri="", rp=0, ns=""
397}}}}}}
r224
398}}}}}}
r198
399곱셈과 나눗셈에서 a와 b 모두 0이 아닌 경우를 봅니다.
r133
400{{{#!if ((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
401
r203
402{{{#!if f=="*"
403곱셈계산에서 18자리씩 곱셈을 할 수 있도록 입력했던 a와 b의 문자열을 확장할 것입니다.
r198
404
r124
405a와 b 각각 소수점 윗자리와 소수점 아래자리의 문자열의 빈 공간을 0으로 채워 18자로 만듭니다.
406소수점 윗자리는 왼쪽에서 0을 채워나갑니다.
r228
407{{{#!if au = pd + au
r172
408+18자}}}{{{#!if au=au.substr(au.length-18,18)
r145
409}}}
r228
410{{{#!if bu = pd + bu
r172
411+18자}}}{{{#!if bu=bu.substr(bu.length-18,18)
r145
412}}}
r124
413
414소수점 아래자리는 오른쪽에서 0을 채웁니다. (ap, bp값은 보존됩니다.)
r228
415{{{#!if ab += pd
r145
416+18자}}}{{{#!if ab=ab.substr(0,18)
417}}}
r228
418{{{#!if bb += pd
r145
419+18자}}}{{{#!if bb=bb.substr(0,18)
r191
420}}}}}}
r203
421
422{{{#!if f=="/"
r204
423나눗셈은 소수점 위 18번째 자리부터 내려가면서 처음으로 0이 아닌 숫자가 있으면 그 숫자가 처음 숫자가 되도록 숫자를 왼쪽으로 밀어두려고 합니다. 그 다음 오른쪽을 0으로 채웁니다.
r206
424au를 왼쪽으로 밀 경우 남게 되는 자릿수를 변수 tu로 둡니다. (후술할 아래 곱셈연산과 겹치지 않습니다.)
r228
425{{{#!if tu=18-au.length, au=au+ab.substr(0,tu)+pd, ab=ab.substr(tu)+pd, au=au.substr(0,18), ab=ab.substr(0,18)
r203
426}}}
r228
427{{{#!if tu=18-bu.length, bu=bu+bb.substr(0,tu)+pd, bb=bb.substr(tu)+pd, bu=bu.substr(0,18), bb=bb.substr(0,18)
r203
428}}}
r207
429
r203
430}}}
r204
431}}}
r190
432여기까지 곱셈 또는 나눗셈에서 숫자를 초기화하는 과정입니다.
r224
433}}}
r133
434
r190
435a와 b 모두 0이 아닌 경우에서 곱셈을 연산하는 과정입니다.
436{{{#!if (f=="*")&&((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
r149
437곱셈은 18자리를 끊어서 계산합니다. 소수점 아래 18자리의 아래인 제19~36번 자리를 ri로 둡니다. 소수점 위 19~36번째 자리는 rs로 두어 ri, rb, ru, rs 순으로 계산합니다.
r204
438소수점 위 18자리, 소수점 아래 18자리인 두 수를 곱하면 해당하는 자리별로 곱셈을 할 때 최대 (18+18)**2=1296회를 곱해야 합니다.
r135
439
r147
440앞으로 있을 계산은 다음과 같습니다.
r135
441 * ri를 더했더니 ri가 19자리 숫자로 넘치면 넘친 앞의 1자리를 rb로 넘깁니다.
r147
442 * rb가 19자리로 넘쳤다면 넘친 앞의 1자리를 ru로 넘깁니다.
443 * ru가 19자리로 넘친다면 넘친 앞의 1자리를 rs로 넘깁니다.
r135
444(rs는 상용로그로 보았을 때 log a<18, log b<18 에서 log (a*b) = log a + log b < 36이므로 19자리로 넘치지 않습니다.)
445문자열로 바꾸고 문자열을 쪼갠 다음 숫자로 바꾸는 과정입니다. 이를 if로 바꾸면 다음과 같습니다.
r149
446{{{#!if false
r135
447{{{#!if ri=ri.toString(), ri.length==19
r249
448{{{#!if rb=(+rb)+(+ri.substr(0,1)), ri=(+ri.substr(1,18))
r135
449}}}}}}
450{{{#!if rb=rb.toString(), rb.length==19
r249
451{{{#!if ru=(+ru)+(+rb.substr(0,1)), rb=(+rb.substr(1,18))
r135
452}}}}}}
453{{{#!if ru=ru.toString(), ru.length==19
r249
454{{{#!if rs=(+rs)+(+ru.substr(0,1)), ru=(+ru.substr(1,18))
r135
455}}}}}}
r149
456}}}
r151
457변수 tv, tw, i, ps를 가져옵니다. tw는 0, tv는 1, i는 0, ps는 false으로 초기화 된 채로 있습니다. 연산 과정 중간중간에 마지막 자릿수를 보정하고자 10씩 곱하게 됩니다. ri에서 최대 18자리에서 1자리 수를 곱하면 19자리가 될 수 있으므로 곱셈할 때마다 19자리로 넘칠때마다 넘치는 숫자는 rb로 넘깁니다.
r153
458ri부분을 합산합니다. ab*bb 의 절반을 처리합니다. (자릿수끼리 대입했을 때 처리되는 부분이 먼저 입력한 절반이 나중에 입력하는 절반보다 더 많지만, 편의상 절반이라고 적습니다.)
r149
459## for i=0 to 17
r151
460{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
461}}}{{{#!if tw=tw.toString(), tw.length==19
r150
462{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
463}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
464{{{#!if ri=ri+(+tw)
r150
465}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
466{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
467}}}}}}{{{#!if (ri.length<=18)&&!ps
r150
468{{{#!if ri=(+ri)
r222
469}}}}}}{{{#!if i+=1, tv*=10, ps=false
r149
470}}}
r151
471## i=1
472{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
473}}}{{{#!if tw=tw.toString(), tw.length==19
r151
474{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
475}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
476{{{#!if ri=ri+(+tw)
r151
477}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
478{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
479}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
480{{{#!if ri=(+ri)
r222
481}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
482}}}
483## i=2
484{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
485}}}{{{#!if tw=tw.toString(), tw.length==19
r151
486{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
487}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
488{{{#!if ri=ri+(+tw)
r151
489}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
490{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
491}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
492{{{#!if ri=(+ri)
r222
493}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
494}}}
495## i=3
496{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
497}}}{{{#!if tw=tw.toString(), tw.length==19
r151
498{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
499}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
500{{{#!if ri=ri+(+tw)
r151
501}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
502{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
503}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
504{{{#!if ri=(+ri)
r222
505}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
506}}}
507## i=4
508{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
509}}}{{{#!if tw=tw.toString(), tw.length==19
r151
510{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
511}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
512{{{#!if ri=ri+(+tw)
r151
513}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
514{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
515}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
516{{{#!if ri=(+ri)
r222
517}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
518}}}
519## i=5
520{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
521}}}{{{#!if tw=tw.toString(), tw.length==19
r151
522{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
523}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
524{{{#!if ri=ri+(+tw)
r151
525}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
526{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
527}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
528{{{#!if ri=(+ri)
r222
529}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
530}}}
531## i=6
532{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
533}}}{{{#!if tw=tw.toString(), tw.length==19
r151
534{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
535}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
536{{{#!if ri=ri+(+tw)
r151
537}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
538{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
539}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
540{{{#!if ri=(+ri)
r222
541}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
542}}}
543## i=7
544{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
545}}}{{{#!if tw=tw.toString(), tw.length==19
r151
546{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
547}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
548{{{#!if ri=ri+(+tw)
r151
549}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
550{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
551}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
552{{{#!if ri=(+ri)
r222
553}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
554}}}
555## i=8
556{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
557}}}{{{#!if tw=tw.toString(), tw.length==19
r151
558{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
559}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
560{{{#!if ri=ri+(+tw)
r151
561}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
562{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
563}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
564{{{#!if ri=(+ri)
r222
565}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
566}}}
567## i=9
568{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
569}}}{{{#!if tw=tw.toString(), tw.length==19
r151
570{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
571}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
572{{{#!if ri=ri+(+tw)
r151
573}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
574{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
575}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
576{{{#!if ri=(+ri)
r222
577}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
578}}}
579## i=10
580{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
581}}}{{{#!if tw=tw.toString(), tw.length==19
r151
582{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
583}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
584{{{#!if ri=ri+(+tw)
r151
585}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
586{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
587}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
588{{{#!if ri=(+ri)
r222
589}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
590}}}
591## i=11
592{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
593}}}{{{#!if tw=tw.toString(), tw.length==19
r151
594{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
595}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
596{{{#!if ri=ri+(+tw)
r151
597}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
598{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
599}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
600{{{#!if ri=(+ri)
r222
601}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
602}}}
603## i=12
604{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
605}}}{{{#!if tw=tw.toString(), tw.length==19
r151
606{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
607}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
608{{{#!if ri=ri+(+tw)
r151
609}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
610{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
611}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
612{{{#!if ri=(+ri)
r222
613}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
614}}}
615## i=13
616{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
617}}}{{{#!if tw=tw.toString(), tw.length==19
r151
618{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
619}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
620{{{#!if ri=ri+(+tw)
r151
621}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
622{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
623}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
624{{{#!if ri=(+ri)
r222
625}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
626}}}
627## i=14
628{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
629}}}{{{#!if tw=tw.toString(), tw.length==19
r151
630{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
631}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
632{{{#!if ri=ri+(+tw)
r151
633}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
634{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
635}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
636{{{#!if ri=(+ri)
r222
637}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
638}}}
639## i=15
640{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
641}}}{{{#!if tw=tw.toString(), tw.length==19
r151
642{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
643}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
644{{{#!if ri=ri+(+tw)
r151
645}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
646{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
647}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
648{{{#!if ri=(+ri)
r222
649}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
650}}}
651## i=16
652{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
653}}}{{{#!if tw=tw.toString(), tw.length==19
r151
654{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
655}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
656{{{#!if ri=ri+(+tw)
r151
657}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
658{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
659}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
660{{{#!if ri=(+ri)
r222
661}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
662}}}
663## i=17
664{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
665}}}{{{#!if tw=tw.toString(), tw.length==19
r151
666{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
667}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
668{{{#!if ri=ri+(+tw)
r151
669}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
670{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
671}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
672{{{#!if ri=(+ri)
673}}}}}}
r134
674
r151
675##rb
r184
676rb부분을 합산합니다. substr(-1,0)은 빈 문자열 값이 나옵니다. (ab*bb의 나머지 절반 + au*bb의 절반), ab*bu의 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다.
r151
677{{{#!if i=0+0, tv=1, ps=false
678}}}
679##for i=0 to 17
r185
680{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
681}}}{{{#!if tw=tw.toString(), tw.length==19
r152
682{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
683}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
684{{{#!if rb=rb+(+tw)
r152
685}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
686{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
687}}}}}}{{{#!if (rb.length<=18)&&!ps
r152
688{{{#!if rb=(+rb)
689}}}}}}
r176
690{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
691}}}{{{#!if tw=tw.toString(), tw.length==19
r152
692{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
693}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
694{{{#!if rb=rb+(+tw)
r152
695}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
696{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
697}}}}}}{{{#!if (rb.length<=18)&&!ps
r152
698{{{#!if rb=(+rb)
r222
699}}}}}}{{{#!if i+=1, tv*=10, ps=false
r152
700}}}
r153
701## i=1
r185
702{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
703}}}{{{#!if tw=tw.toString(), tw.length==19
r153
704{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
705}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
706{{{#!if rb=rb+(+tw)
r153
707}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
708{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
709}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
710{{{#!if rb=(+rb)
711}}}}}}
r176
712{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
713}}}{{{#!if tw=tw.toString(), tw.length==19
r153
714{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
715}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
716{{{#!if rb=rb+(+tw)
r153
717}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
718{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
719}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
720{{{#!if rb=(+rb)
r222
721}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
722}}}
723## i=2
r185
724{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
725}}}{{{#!if tw=tw.toString(), tw.length==19
r153
726{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
727}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
728{{{#!if rb=rb+(+tw)
r153
729}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
730{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
731}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
732{{{#!if rb=(+rb)
733}}}}}}
r176
734{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
735}}}{{{#!if tw=tw.toString(), tw.length==19
r153
736{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
737}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
738{{{#!if rb=rb+(+tw)
r153
739}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
740{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
741}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
742{{{#!if rb=(+rb)
r222
743}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
744}}}
745## i=3
r185
746{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
747}}}{{{#!if tw=tw.toString(), tw.length==19
r153
748{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
749}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
750{{{#!if rb=rb+(+tw)
r153
751}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
752{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
753}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
754{{{#!if rb=(+rb)
755}}}}}}
r176
756{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
757}}}{{{#!if tw=tw.toString(), tw.length==19
r153
758{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
759}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
760{{{#!if rb=rb+(+tw)
r153
761}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
762{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
763}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
764{{{#!if rb=(+rb)
r222
765}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
766}}}
767## i=4
r185
768{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
769}}}{{{#!if tw=tw.toString(), tw.length==19
r153
770{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
771}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
772{{{#!if rb=rb+(+tw)
r153
773}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
774{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
775}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
776{{{#!if rb=(+rb)
777}}}}}}
r176
778{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
779}}}{{{#!if tw=tw.toString(), tw.length==19
r153
780{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
781}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
782{{{#!if rb=rb+(+tw)
r153
783}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
784{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
785}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
786{{{#!if rb=(+rb)
r222
787}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
788}}}
789## i=5
r185
790{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
791}}}{{{#!if tw=tw.toString(), tw.length==19
r153
792{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
793}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
794{{{#!if rb=rb+(+tw)
r153
795}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
796{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
797}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
798{{{#!if rb=(+rb)
799}}}}}}
r176
800{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
801}}}{{{#!if tw=tw.toString(), tw.length==19
r153
802{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
803}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
804{{{#!if rb=rb+(+tw)
r153
805}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
806{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
807}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
808{{{#!if rb=(+rb)
r222
809}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
810}}}
811## i=6
r185
812{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
813}}}{{{#!if tw=tw.toString(), tw.length==19
r153
814{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
815}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
816{{{#!if rb=rb+(+tw)
r153
817}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
818{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
819}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
820{{{#!if rb=(+rb)
821}}}}}}
r176
822{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
823}}}{{{#!if tw=tw.toString(), tw.length==19
r153
824{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
825}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
826{{{#!if rb=rb+(+tw)
r153
827}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
828{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
829}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
830{{{#!if rb=(+rb)
r222
831}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
832}}}
833## i=7
r185
834{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
835}}}{{{#!if tw=tw.toString(), tw.length==19
r153
836{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
837}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
838{{{#!if rb=rb+(+tw)
r153
839}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
840{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
841}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
842{{{#!if rb=(+rb)
843}}}}}}
r176
844{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
845}}}{{{#!if tw=tw.toString(), tw.length==19
r153
846{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
847}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
848{{{#!if rb=rb+(+tw)
r153
849}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
850{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
851}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
852{{{#!if rb=(+rb)
r222
853}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
854}}}
855## i=8
r185
856{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
857}}}{{{#!if tw=tw.toString(), tw.length==19
r153
858{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
859}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
860{{{#!if rb=rb+(+tw)
r153
861}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
862{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
863}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
864{{{#!if rb=(+rb)
865}}}}}}
r176
866{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
867}}}{{{#!if tw=tw.toString(), tw.length==19
r153
868{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
869}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
870{{{#!if rb=rb+(+tw)
r153
871}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
872{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
873}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
874{{{#!if rb=(+rb)
r222
875}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
876}}}
877## i=9
r185
878{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
879}}}{{{#!if tw=tw.toString(), tw.length==19
r153
880{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
881}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
882{{{#!if rb=rb+(+tw)
r153
883}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
884{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
885}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
886{{{#!if rb=(+rb)
887}}}}}}
r176
888{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
889}}}{{{#!if tw=tw.toString(), tw.length==19
r153
890{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
891}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
892{{{#!if rb=rb+(+tw)
r153
893}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
894{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
895}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
896{{{#!if rb=(+rb)
r222
897}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
898}}}
899## i=10
r185
900{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
901}}}{{{#!if tw=tw.toString(), tw.length==19
r153
902{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
903}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
904{{{#!if rb=rb+(+tw)
r153
905}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
906{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
907}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
908{{{#!if rb=(+rb)
909}}}}}}
r176
910{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
911}}}{{{#!if tw=tw.toString(), tw.length==19
r153
912{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
913}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
914{{{#!if rb=rb+(+tw)
r153
915}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
916{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
917}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
918{{{#!if rb=(+rb)
r222
919}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
920}}}
921## i=11
r185
922{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
923}}}{{{#!if tw=tw.toString(), tw.length==19
r153
924{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
925}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
926{{{#!if rb=rb+(+tw)
r153
927}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
928{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
929}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
930{{{#!if rb=(+rb)
931}}}}}}
r176
932{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
933}}}{{{#!if tw=tw.toString(), tw.length==19
r153
934{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
935}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
936{{{#!if rb=rb+(+tw)
r153
937}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
938{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
939}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
940{{{#!if rb=(+rb)
r222
941}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
942}}}
943## i=12
r185
944{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
945}}}{{{#!if tw=tw.toString(), tw.length==19
r153
946{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
947}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
948{{{#!if rb=rb+(+tw)
r153
949}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
950{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
951}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
952{{{#!if rb=(+rb)
953}}}}}}
r176
954{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
955}}}{{{#!if tw=tw.toString(), tw.length==19
r153
956{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
957}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
958{{{#!if rb=rb+(+tw)
r153
959}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
960{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
961}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
962{{{#!if rb=(+rb)
r222
963}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
964}}}
965## i=13
r185
966{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
967}}}{{{#!if tw=tw.toString(), tw.length==19
r153
968{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
969}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
970{{{#!if rb=rb+(+tw)
r153
971}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
972{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
973}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
974{{{#!if rb=(+rb)
975}}}}}}
r176
976{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
977}}}{{{#!if tw=tw.toString(), tw.length==19
r153
978{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
979}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
980{{{#!if rb=rb+(+tw)
r153
981}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
982{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
983}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
984{{{#!if rb=(+rb)
r222
985}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
986}}}
987## i=14
r185
988{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
989}}}{{{#!if tw=tw.toString(), tw.length==19
r153
990{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
991}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
992{{{#!if rb=rb+(+tw)
r153
993}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
994{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
995}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
996{{{#!if rb=(+rb)
997}}}}}}
r176
998{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
999}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1000{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1001}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1002{{{#!if rb=rb+(+tw)
r153
1003}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1004{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1005}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1006{{{#!if rb=(+rb)
r222
1007}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1008}}}
1009## i=15
r185
1010{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1011}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1012{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1013}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1014{{{#!if rb=rb+(+tw)
r153
1015}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1016{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1017}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1018{{{#!if rb=(+rb)
1019}}}}}}
r176
1020{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1021}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1022{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1023}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1024{{{#!if rb=rb+(+tw)
r153
1025}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1026{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1027}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1028{{{#!if rb=(+rb)
r222
1029}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1030}}}
1031## i=16
r185
1032{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1033}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1034{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1035}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1036{{{#!if rb=rb+(+tw)
r153
1037}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1038{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1039}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1040{{{#!if rb=(+rb)
1041}}}}}}
r176
1042{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1043}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1044{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1045}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1046{{{#!if rb=rb+(+tw)
r153
1047}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1048{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1049}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1050{{{#!if rb=(+rb)
r222
1051}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1052}}}
1053## i=17
r185
1054{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1055}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1056{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1057}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1058{{{#!if rb=rb+(+tw)
r153
1059}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1060{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1061}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1062{{{#!if rb=(+rb)
1063}}}}}}
r176
1064{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1065}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1066{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1067}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1068{{{#!if rb=rb+(+tw)
r153
1069}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1070{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1071}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1072{{{#!if rb=(+rb)
r222
1073}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1074}}}
r134
1075
r153
1076##ru
r184
1077ru부분을 합산합니다. substr(-1,0)은 빈 문자열 값이 나옵니다. (ab*bu의 나머지 절반 + au*bu의 절반), au*bb의 나머지 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다.
r153
1078{{{#!if i=0+0, tv=1, ps=false
1079}}}
r155
1080##for i=0 to 17
r185
1081{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1082}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1083{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1084}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1085{{{#!if ru=ru+(+tw)
1086}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1087{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1088}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1089{{{#!if ru=(+ru)
1090}}}}}}
r184
1091{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1092}}}{{{#!if ru.length==19
r155
1093{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1094}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1095{{{#!if ru=(+ru)
r222
1096}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1097}}}
1098## i=1
r185
1099{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1100}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1101{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1102}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1103{{{#!if ru=ru+(+tw)
1104}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1105{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1106}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1107{{{#!if ru=(+ru)
1108}}}}}}
r184
1109{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1110}}}{{{#!if ru.length==19
r155
1111{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1112}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1113{{{#!if ru=(+ru)
r222
1114}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1115}}}
1116## i=2
r185
1117{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1118}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1119{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1120}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1121{{{#!if ru=ru+(+tw)
1122}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1123{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1124}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1125{{{#!if ru=(+ru)
1126}}}}}}
r184
1127{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1128}}}{{{#!if ru.length==19
r155
1129{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1130}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1131{{{#!if ru=(+ru)
r222
1132}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1133}}}
1134## i=3
r185
1135{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1136}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1137{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1138}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1139{{{#!if ru=ru+(+tw)
1140}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1141{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1142}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1143{{{#!if ru=(+ru)
1144}}}}}}
r184
1145{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1146}}}{{{#!if ru.length==19
r155
1147{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1148}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1149{{{#!if ru=(+ru)
r222
1150}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1151}}}
1152## i=4
r185
1153{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1154}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1155{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1156}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1157{{{#!if ru=ru+(+tw)
1158}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1159{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1160}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1161{{{#!if ru=(+ru)
1162}}}}}}
r184
1163{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1164}}}{{{#!if ru.length==19
r155
1165{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1166}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1167{{{#!if ru=(+ru)
r222
1168}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1169}}}
1170## i=5
r185
1171{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1172}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1173{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1174}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1175{{{#!if ru=ru+(+tw)
1176}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1177{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1178}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1179{{{#!if ru=(+ru)
1180}}}}}}
r184
1181{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1182}}}{{{#!if ru.length==19
r155
1183{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1184}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1185{{{#!if ru=(+ru)
r222
1186}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1187}}}
1188## i=6
r185
1189{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1190}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1191{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1192}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1193{{{#!if ru=ru+(+tw)
1194}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1195{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1196}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1197{{{#!if ru=(+ru)
1198}}}}}}
r184
1199{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1200}}}{{{#!if ru.length==19
r155
1201{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1202}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1203{{{#!if ru=(+ru)
r222
1204}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1205}}}
1206## i=7
r185
1207{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1208}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1209{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1210}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1211{{{#!if ru=ru+(+tw)
1212}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1213{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1214}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1215{{{#!if ru=(+ru)
1216}}}}}}
r184
1217{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1218}}}{{{#!if ru.length==19
r155
1219{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1220}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1221{{{#!if ru=(+ru)
r222
1222}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1223}}}
1224## i=8
r185
1225{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1226}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1227{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1228}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1229{{{#!if ru=ru+(+tw)
1230}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1231{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1232}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1233{{{#!if ru=(+ru)
1234}}}}}}
r184
1235{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1236}}}{{{#!if ru.length==19
r155
1237{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1238}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1239{{{#!if ru=(+ru)
r222
1240}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1241}}}
1242## i=9
r185
1243{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1244}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1245{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1246}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1247{{{#!if ru=ru+(+tw)
1248}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1249{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1250}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1251{{{#!if ru=(+ru)
1252}}}}}}
r184
1253{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1254}}}{{{#!if ru.length==19
r155
1255{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1256}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1257{{{#!if ru=(+ru)
r222
1258}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1259}}}
1260## i=10
r185
1261{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1262}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1263{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1264}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1265{{{#!if ru=ru+(+tw)
1266}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1267{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1268}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1269{{{#!if ru=(+ru)
1270}}}}}}
r184
1271{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1272}}}{{{#!if ru.length==19
r155
1273{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1274}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1275{{{#!if ru=(+ru)
r222
1276}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1277}}}
1278## i=11
r185
1279{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1280}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1281{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1282}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1283{{{#!if ru=ru+(+tw)
1284}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1285{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1286}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1287{{{#!if ru=(+ru)
1288}}}}}}
r184
1289{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1290}}}{{{#!if ru.length==19
r155
1291{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1292}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1293{{{#!if ru=(+ru)
r222
1294}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1295}}}
1296## i=12
r185
1297{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1298}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1299{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1300}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1301{{{#!if ru=ru+(+tw)
1302}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1303{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1304}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1305{{{#!if ru=(+ru)
1306}}}}}}
r184
1307{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1308}}}{{{#!if ru.length==19
r155
1309{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1310}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1311{{{#!if ru=(+ru)
r222
1312}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1313}}}
1314## i=13
r185
1315{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1316}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1317{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1318}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1319{{{#!if ru=ru+(+tw)
1320}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1321{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1322}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1323{{{#!if ru=(+ru)
1324}}}}}}
r184
1325{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1326}}}{{{#!if ru.length==19
r155
1327{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1328}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1329{{{#!if ru=(+ru)
r222
1330}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1331}}}
1332## i=14
r185
1333{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1334}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1335{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1336}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1337{{{#!if ru=ru+(+tw)
1338}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1339{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1340}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1341{{{#!if ru=(+ru)
1342}}}}}}
r184
1343{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1344}}}{{{#!if ru.length==19
r155
1345{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1346}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1347{{{#!if ru=(+ru)
r222
1348}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1349}}}
1350## i=15
r185
1351{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1352}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1353{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1354}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1355{{{#!if ru=ru+(+tw)
1356}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1357{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1358}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1359{{{#!if ru=(+ru)
1360}}}}}}
r184
1361{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1362}}}{{{#!if ru.length==19
r155
1363{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1364}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1365{{{#!if ru=(+ru)
r222
1366}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1367}}}
1368## i=16
r185
1369{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1370}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1371{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1372}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1373{{{#!if ru=ru+(+tw)
1374}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1375{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1376}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1377{{{#!if ru=(+ru)
1378}}}}}}
r184
1379{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1380}}}{{{#!if ru.length==19
r155
1381{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1382}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1383{{{#!if ru=(+ru)
r222
1384}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1385}}}
1386## i=17
r185
1387{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1388}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1389{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1390}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1391{{{#!if ru=ru+(+tw)
1392}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1393{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1394}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1395{{{#!if ru=(+ru)
1396}}}}}}
r184
1397{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1398}}}{{{#!if ru.length==19
r155
1399{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1400}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1401{{{#!if ru=(+ru)
r222
1402}}}}}}{{{#!if i+=1, tv*=10, ps=false
r184
1403}}}
r156
1404##rs
1405rs부분을 합산합니다. au*bu의 나머지 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다. 소수점 윗자리는 많아야 36자리이므로 rs에서 더 이상 넘치지 않습니다.
1406{{{#!if i=0+0, tv=1, ps=false
1407}}}
1408##for i=0 to 17
r184
1409{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1410}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1411}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1412}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1413}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1414}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1415}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1416}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1417}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1418}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
r156
1419}}}
r184
1420{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1421}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1422}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1423}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1424}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1425}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1426}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1427}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
r156
1428}}}
r190
1429여기까지가 곱셈에서 a*b 의 연산 과정이며 rb 정리 부분으로 넘어갑니다.
r164
1430}}}
1431
r194
1432a와 b 모두 0이 아닌 경우에서 나눗셈을 연산하는 과정입니다.
1433{{{#!if (f=="/")&&((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
1434
1435au, ab, bu, bb를 18자로 만들었으므로 36자리 정수의 나눗셈으로 봅니다.
1436a/b=(au+ab)/(bu+bb)=(+(au.substr(0,18)+ab.substr(0,18)))/(+(bu.substr(0,18)+bb.substr(0,18)))와 같습니다.
r244
1437## 자릿수 측정
1438나누는 자릿수에 맞춰 결과를 표시하고자 ac, bc를 자릿수를 나타내는 값으로 정의합니다.
r245
1439먼저 au는 앞에 적어놓은 0을 제거한 문자열이므로 +au>0인 경우 ac를 au의 문자열 길이에서 1을 뺀 값으로 정의합니다.
r244
1440{{{#!if +au>0
r245
1441{{{#!if ac=au.length-1
r195
1442}}}}}}
r244
1443(au, ab 둘다 0인 경우 앞에 처리하는 식이 있으며) au가 0이라면 ab는 0보다 크며, 소수점 아래 처음으로 0이 아닌 수가 나오는 자릿수를 고른 다음 덧셈 연산에서 그 수의 역원이 되는 수를 ac로 정의합니다. 이를 구하고자 뒤에 0을 더 붙여 18자리 숫자로 만든 다음 정수로 바꾸어 구합니다.
1444{{{#!if +au==0
1445{{{#!if ac=ab+pd, ac=ac.substr(0,18), ac=+ac, ac=ac.toString(), ac=ac.length-19
r195
1446}}}}}}
1447
r244
1448bc도 a와 같은 방법으로 정의합니다.
1449{{{#!if +bu>0
r245
1450{{{#!if bc=bu.length-1
r244
1451}}}}}}{{{#!if +bu==0
r245
1452{{{#!if bc=bb+pd, bc=bc.substr(0,18), bc=+bc, bc=bc.toString(), bc=bc.length-19
1453}}}}}}
r196
1454
r244
1455
r229
1456##자릿수 기억 (이후에 서술)
1457##몫 서술
1458제일 높은 자리부터 내려오면서 처음으로 0이 아닌 수를 왼쪽으로 당기는 과정을 거쳤으므로 (1부터 시작하는 18자리+18자리 숫자)/(1부터 시작하는 18자리+18자리 수) 연산이 됩니다.
1459
1460{{{#!if ps=false
1461}}}숫자에서 해당하는 (10**n) 자리에 몫을 더 이상 계산하지 않고 그 다음 자리(10**(n+1))의 몫을 계산하게 된다면 ps를 true로 바꿉니다.
1462
1463##i=0
1464{{{#!if br=false
1465}}}다시 정렬된 bu, bb의 값은 바뀌지 않습니다. bu, bb로 나눈 몫만큼 au, ab에서 감소시킨 다음 au와 ab를 다시 정렬시키며, au와 ab가 모두 0이 되면 더 이상 계산하지 않도록 br를 true로 반환합니다.
r235
1466au와 ab의 값을 가져와 tu와 tv로 먼저 복제합니다. (계산 결과에 쓰게 됩니다.)
r230
1467{{{#!if tu=au, tv=ab
r231
1468}}}
r230
1469그 다음 계산을 편하게 할 수 있도록 텍스트값으로 된 au, ab, bu, bb를 정수값으로 변환합니다.
1470{{{#!if au=+au, ab=+bb, bu=+bu, bb=+bb
1471}}}
r229
1472
r241
1473au의 값이 bu보다 작거나, au==bu이더라도 ab<bb이면 해당하는 자릿수의 몫이 0이라는 의미리므로 다음 자릿수로 넘깁니다. 이 과정에서 변수 ps(logical)를 false로 초기화한 다음 가져옵니다.
r249
1474{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
1475{{{#!if ps=true
r229
1476}}}}}}
r231
1477!ts이러면 ① au>bu이거나, ② au==bu이고 ab>=bb인 경우입니다. !ts이고 !ps(다음 자릿수로 계산을 넘기지 않음)임을 if 조건문으로 둔 상태에서 진행합니다.
r241
1478{{{#!if !ps
r230
1479au를 bu로 나눈 몫을 tw로 정의합니다. 정수를 정수로 나누면 몫만 계산되며, 100,000,000,000,000,000 이상 999,999,999 999,999,999 이하의 한 정수를 100,000,000,000,000,000 이상의 다른 한 정수로 나눈 몫이므로 tw의 값은 최소 0 최대 9가 됩니다.
1480{{{#!if tw=au/bu
1481}}}
1482bu, bb를 각각 tw만큼 곱한 값을 tx, ty로 정의합니다.
1483{{{#!if tx=bu*tw, ty=bb*tw
1484}}}
r231
1485이 때 ty가 19자리가 되면 넘친 첫번째 자리의 값을 tx의 일의 자리로 더하고 아래 18자리의 값을 ty로 다시 정의합니다. tx는 19자리 숫자가 되어도 문제가 없습니다.
1486{{{#!if ty=ty.toString(), ty.length==19
r239
1487{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
r231
1488}}}}}}
1489이렇게 하면 tx=bu*tw<=au가 됩니다. (bu가 au보다 크면 tw는 tw의 정의에서 값이 0이 되므로 부등호가 성립됩니다.)
r239
1490ty를 정수로 바꿉니다.
1491{{{#!if ty=+ty
1492}}}
r231
1493(2.1/1.6 처럼) ty가 넘쳐 tx 값이 더해지는 경우가 있으므로 몫이 유효한 값인지 검산합니다. 만일 tx ty 가 기존 au ab을 넘게 되면 tw에서 1을 빼고, tx, ty를 다시 정의합니다.
1494{{{#!if (tx>au)||((tx==au)&&(ty>ab))
1495{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1496}}}
1497마찬가지로 ty가 19자리가 된다면 넘친 첫번째 자리의 값을 tx의 일의 자리로 더합니다.
1498{{{#!if ty=ty.toString(), ty.length==19
r239
1499{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1500}}}}}}
1501ty를 정수로 바꿉니다.
1502{{{#!if ty=+ty
1503}}}
1504}}}
r231
1505이렇게 만들어진 tx, ty가 있으면 이를 반영합니다.
1506}}}
r253
1507ps일 경우 해당 자리의 몫(tw)을 0으로 처리합니다.
r231
1508{{{#!if ps
r253
1509{{{#!if tw=0
r231
1510}}}}}}
1511!ps일 경우 tm의 오른쪽에 tw를 문자열로 바꾼 텍스트를 더합니다.
1512{{{#!if !ps
r233
1513{{{#!if tw=tw.toString(), tm+=tw
1514}}}
1515au에서 tx를, ab에서 ty를 뺍니다. 만약 ty>ab일 경우 au에서 1을 가져와 (au에서 1을 빼고) ab에 1,000,000,000,000,000,000을 더한 다음 계산합니다.
1516{{{#!if ty>ab
r234
1517{{{#!if au-=1, ab+=+("1"+pd)
r231
1518}}}}}}
r233
1519{{{#!if au-=tx, ab-=ty
1520}}}}}}
r253
1521몫인 tw를 문자열로 바꾸고 tm의 오른쪽에 더합니다.
1522{{{#!if tw=tw.toString(), tm+=tw
1523}}}
r241
1524au, ab에서 몫을 빼고 나니 au, ab가 모두 0으로 된다면 더 이상 계산을 하지 않아야 하므로 br를 true로 반환합니다.
1525{{{#!if (au==0)&&(ab==0)
r233
1526{{{#!if br=true
1527}}}}}}
r241
1528어느 하나가 0이 되지 않는다면 br는 여전히 false이므로 !br일 때 자릿수를 옮깁니다.
1529{{{#!if !br
r233
1530au, ab를 문자열로 다시 바꿉니다.
1531{{{#!if au=au.toString(), ab=ab.toString()
1532}}}
r234
1533tn을 빈 문자열로 초기화합니다. 그리고 역할을 다 한 ps를 false로 초기화합니다. 그 다음 au가 여전히 18자리 숫자일 경우 au의 첫번째 자리를 분리해 내어 tn으로 정의합니다. 여기서 ps는 au의 길이에 따른 처리가 겹쳐지지 않게 만듭니다.
r252
1534{{{#!if ps=false, tn="", au.length==18
1535{{{#!if tn=au.substr(0,1), au=au.substr(1,17), ps=true
r233
1536}}}}}}
r252
1537au가 17자리 미만의 숫자가 되었다면 au의 왼쪽을 0으로 채워 18자리 숫자로 만듭니다.
1538{{{#!if !ps&&(au.length<17)
1539{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r234
1540}}}}}}
1541ab가 18자리 미만의 숫자가 되었다면 왼쪽을 0으로 채워 18자리 숫자로 만듭니다.
1542{{{#!if ab.length<18
1543{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1544}}}}}}
1545au의 뒤로 ab의 처음 자리를 끌어옵니다.
1546{{{#!if au+=ab.substr(0,1)
r233
1547}}}
r234
1548ab의 나머지 17자리를 앞으로 당긴 다음 "0"을 더합니다.
1549{{{#!if ab=ab.substr(1,17)+"0"
r241
1550}}}
1551여기까지가 자릿수를 한 칸씩 옮기는 과정입니다.
1552}}}
r234
1553##i=1 part 1
r239
1554몫으로 기록할 숫자의 첫번째 자리를 구했다면, 그 다음 자리의 숫자를 찾기 위해 (변수 tn으로 만들 수 있는 여분의 1자리 +) 18자리 + 18자리 숫자를 18자리+18자리 숫자로 나누는 계산을 합니다. tn이 9가 될 경우 9로 시작하는 19자리 숫자를 long integer로 모두 표현할 수 없으므로 10**18 자리부터 먼저 계산합니다. 10**18의 1번째 숫자의 몫을 구한 다음 나머지를 18자리 숫자에 더하는 과정(part 1)을 거친 다음 그 18자리에서 몫을 구하는 과정(part 2)을 거칩니다.
r235
1555
r240
1556au와 ab를 정수로 다시 바꾸고 tz를 0으로 초기화합니다. 그리고 tn이 빈 문자열이 아니라면 (앞에 au에서 한 자리 수를 떼온 것이므로) tn에 0을 더하여 19자리로 만들고 몫을 구합니다.
1557{{{#!if au=+au, ab=+ab, tz=0, tn!=""
r239
1558tn을 19자리 정수로 바꿉니다.
1559{{{#!if tn+=pd, tn=+tn,
r235
1560}}}
1561tz를 몫으로 정의합니다. 앞의 tw를 처리하는 방법과 같습니다. tn을 정수로 만들었으므로 소수점 아래를 비교한다면 정수의 소수점 아래에 해당하는 0과 비교합니다.
1562{{{#!if tz=tn/bu, tx=bu*tz, ty=bb*tz
1563}}}{{{#!if ty=ty.toString(), ty.length==19
r239
1564{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
r235
1565}}}}}}
r239
1566{{{#!if ty=+ty
1567}}}
r235
1568{{{#!if (tx>tn)||((tx==tn)&&(ty>0))
1569{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1570}}}{{{#!if ty=ty.toString(), ty.length==19
r239
1571{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1572}}}}}}
1573{{{#!if ty=+ty
1574}}}}}}
r238
1575tn에서 나누어떨어지는 값을 뺀 나머지를 반영하여 au, ab에 더합니다. 소수점 아래 부분인 ab보다 ty가 크다면 tn에서 1을 빼어 계산합니다.
r237
1576{{{#!if ty>ab
1577{{{#!if tn-=1, ab+=+("1"+pd)
r236
1578}}}}}}
r237
1579{{{#!if au+=(tn-tx), ab-=ty
r234
1580}}}
r237
1581tn을 빈 문자열로 초기화합니다.
1582{{{#!if tn=""
1583}}}
1584}}}
r234
1585##i=1 part 2
r239
1586br(0으로 나누어떨어짐) 이 걸려있으면 실행하지 않습니다. 그러므로 전체적으로 조건을 !br로 둔 다음 계산을 진행합니다.
r238
1587{{{#!if !br
r239
1588ps를 false로 초기화한 다음 앞에서 했던 처리와 동일하게 진행합니다.
r249
1589{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r253
1590ts일 경우 ps를 true로 바꾸며, "ps일 경우 tw를 0으로 처리하는 과정을 여기로 병합합니다.
1591{{{#!if ps=true, tw=0
r239
1592}}}}}}
r241
1593{{{#!if !ps
r239
1594tw, tx, ty를 정의하고 처리하는 과정은 앞자리에서 몫을 찾는 과정과 동일합니다. 앞에서 이미 au, ab를 정수로 만들었으므로 여기에 au, ab를 정수로 만드는 처리를 할 필요가 없습니다.
1595{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
r240
1596}}}{{{#!if ty=ty.toString(), ty.length==19
1597{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1598}}}}}}
1599ty를 정수로 바꾸는 과정을 아래 if 조건문으로 병합합니다.
1600{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1601{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1602}}}{{{#!if ty=ty.toString(), ty.length==19
1603{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1604}}}}}}{{{#!if ty=+ty
1605}}}}}}
r253
1606{{{#!if ty>ab
r240
1607{{{#!if au-=1, ab+=+("1"+pd)
1608}}}}}}{{{#!if au-=tx, ab-=ty
r238
1609}}}
r253
1610앞에 tz 값을 구했다면 tw에 tz를 더한 다음 문자열로 바꿉니다. 그리고 tm에 바꾼 tm을 더합니다.
1611{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
1612}}}
r240
1613ts를 au와 ab가 모두 0이 되는 조건으로 다시 정의합니다.
r241
1614{{{#!if (au==0)&&(ab==0)
1615{{{#!if br=true
r240
1616}}}}}}}}}
1617어느 자릿수부터 br가 true로 되면 이후 자릿수 옮겨 몫을 구하는 과정이나 나머지를 정리하는 과정을 더 이상 할 필요가 없습니다.
r241
1618{{{#!if !br
r240
1619au, ab를 문자열로 다시 바꾸고 처리하는 과정은 동일합니다.
1620{{{#!if au=au.toString(), ab=ab.toString()
r239
1621}}}
r252
1622ps를 au 자릿수가 18이 되었을 때 true가 되는 논리값으로 정의합니다.
1623{{{#!if tn="", ps=(au.length==18), ps
1624{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
r240
1625}}}}}}
r252
1626{{{#!if !ps&&(au.length<17)
1627{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r240
1628}}}}}}
1629{{{#!if ab.length<18
1630{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1631}}}}}}
1632{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r239
1633}}}
r240
1634}}}
1635}}}
1636##i=2
r242
1637이후부터 과정은 동일합니다. 많아야 소수점 위 36자리, 소수점 아래 36자리 모두를 쓰면 72개이므로 총 72회(for i=0 to i=71)를 진행합니다.
r240
1638{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1639{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1640}}}{{{#!if ty=ty.toString(), ty.length==19
1641{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1642}}}}}}
1643{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1644{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1645}}}{{{#!if ty=ty.toString(), ty.length==19
1646{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1647}}}}}}{{{#!if ty=+ty
1648}}}}}}
1649{{{#!if ty>ab
1650{{{#!if tn-=1, ab+=+("1"+pd)
1651}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r241
1652}}}}}}
1653{{{#!if !br
r249
1654{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
1655{{{#!if ps=true, tm+="0"
r241
1656}}}}}}
1657{{{#!if !ps
1658{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1659}}}{{{#!if ty=ty.toString(), ty.length==19
1660{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1661}}}}}}
1662{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1663{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1664}}}{{{#!if ty=ty.toString(), ty.length==19
1665{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1666}}}}}}{{{#!if ty=+ty
1667}}}}}}
1668{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
1669}}}{{{#!if ty>ab
1670{{{#!if au-=1, ab+=+("1"+pd)
1671}}}}}}{{{#!if au-=tx, ab-=ty
r240
1672}}}
r241
1673{{{#!if (au==0)&&(ab==0)
1674{{{#!if br=true
1675}}}}}}}}}
1676{{{#!if !br
1677{{{#!if au=au.toString(), ab=ab.toString()
r252
1678}}}{{{#!if tn="", ps=(au.length==18), ps
1679{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1680}}}}}}{{{#!if !ps&&(au.length<17)
1681{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r241
1682}}}}}}{{{#!if ab.length<18
1683{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1684}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
1685}}}}}}}}}
r242
1686##i=3
1687{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1688{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1689}}}{{{#!if ty=ty.toString(), ty.length==19
1690{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1691}}}}}}
1692{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1693{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1694}}}{{{#!if ty=ty.toString(), ty.length==19
1695{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1696}}}}}}{{{#!if ty=+ty
1697}}}}}}
1698{{{#!if ty>ab
1699{{{#!if tn-=1, ab+=+("1"+pd)
1700}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1701}}}}}}
1702{{{#!if !br
r249
1703{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
1704{{{#!if ps=true, tm+="0"
r242
1705}}}}}}
1706{{{#!if !ps
1707{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1708}}}{{{#!if ty=ty.toString(), ty.length==19
1709{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1710}}}}}}
1711{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1712{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1713}}}{{{#!if ty=ty.toString(), ty.length==19
1714{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1715}}}}}}{{{#!if ty=+ty
1716}}}}}}
1717{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
1718}}}{{{#!if ty>ab
1719{{{#!if au-=1, ab+=+("1"+pd)
1720}}}}}}{{{#!if au-=tx, ab-=ty
1721}}}
1722{{{#!if (au==0)&&(ab==0)
1723{{{#!if br=true
1724}}}}}}}}}
1725{{{#!if !br
1726{{{#!if au=au.toString(), ab=ab.toString()
r252
1727}}}{{{#!if tn="", ps=(au.length==18), ps
1728{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1729}}}}}}{{{#!if !ps&&(au.length<17)
1730{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1731}}}}}}{{{#!if ab.length<18
1732{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1733}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
1734}}}}}}}}}
1735##i=4
1736{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1737{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1738}}}{{{#!if ty=ty.toString(), ty.length==19
1739{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1740}}}}}}
1741{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1742{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1743}}}{{{#!if ty=ty.toString(), ty.length==19
1744{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1745}}}}}}{{{#!if ty=+ty
1746}}}}}}
1747{{{#!if ty>ab
1748{{{#!if tn-=1, ab+=+("1"+pd)
1749}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1750}}}}}}
1751{{{#!if !br
r249
1752{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
1753{{{#!if ps=true, tm+="0"
r242
1754}}}}}}
1755{{{#!if !ps
1756{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1757}}}{{{#!if ty=ty.toString(), ty.length==19
1758{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1759}}}}}}
1760{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1761{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1762}}}{{{#!if ty=ty.toString(), ty.length==19
1763{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1764}}}}}}{{{#!if ty=+ty
1765}}}}}}
1766{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
1767}}}{{{#!if ty>ab
1768{{{#!if au-=1, ab+=+("1"+pd)
1769}}}}}}{{{#!if au-=tx, ab-=ty
1770}}}
1771{{{#!if (au==0)&&(ab==0)
1772{{{#!if br=true
1773}}}}}}}}}
1774{{{#!if !br
1775{{{#!if au=au.toString(), ab=ab.toString()
r252
1776}}}{{{#!if tn="", ps=(au.length==18), ps
1777{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1778}}}}}}{{{#!if !ps&&(au.length<17)
1779{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1780}}}}}}{{{#!if ab.length<18
1781{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1782}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
1783}}}}}}}}}
1784##i=5
1785{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1786{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1787}}}{{{#!if ty=ty.toString(), ty.length==19
1788{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1789}}}}}}
1790{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1791{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1792}}}{{{#!if ty=ty.toString(), ty.length==19
1793{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1794}}}}}}{{{#!if ty=+ty
1795}}}}}}
1796{{{#!if ty>ab
1797{{{#!if tn-=1, ab+=+("1"+pd)
1798}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1799}}}}}}
1800{{{#!if !br
r249
1801{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
1802{{{#!if ps=true, tm+="0"
r242
1803}}}}}}
1804{{{#!if !ps
1805{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1806}}}{{{#!if ty=ty.toString(), ty.length==19
1807{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1808}}}}}}
1809{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1810{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1811}}}{{{#!if ty=ty.toString(), ty.length==19
1812{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1813}}}}}}{{{#!if ty=+ty
1814}}}}}}
1815{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
1816}}}{{{#!if ty>ab
1817{{{#!if au-=1, ab+=+("1"+pd)
1818}}}}}}{{{#!if au-=tx, ab-=ty
1819}}}
1820{{{#!if (au==0)&&(ab==0)
1821{{{#!if br=true
1822}}}}}}}}}
1823{{{#!if !br
1824{{{#!if au=au.toString(), ab=ab.toString()
r252
1825}}}{{{#!if tn="", ps=(au.length==18), ps
1826{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1827}}}}}}{{{#!if !ps&&(au.length<17)
1828{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1829}}}}}}{{{#!if ab.length<18
1830{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1831}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
1832}}}}}}}}}
1833##i=6
1834{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1835{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1836}}}{{{#!if ty=ty.toString(), ty.length==19
1837{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1838}}}}}}
1839{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1840{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1841}}}{{{#!if ty=ty.toString(), ty.length==19
1842{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1843}}}}}}{{{#!if ty=+ty
1844}}}}}}
1845{{{#!if ty>ab
1846{{{#!if tn-=1, ab+=+("1"+pd)
1847}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1848}}}}}}
1849{{{#!if !br
r249
1850{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
1851{{{#!if ps=true, tm+="0"
r242
1852}}}}}}
1853{{{#!if !ps
1854{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1855}}}{{{#!if ty=ty.toString(), ty.length==19
1856{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1857}}}}}}
1858{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1859{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1860}}}{{{#!if ty=ty.toString(), ty.length==19
1861{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1862}}}}}}{{{#!if ty=+ty
1863}}}}}}
1864{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
1865}}}{{{#!if ty>ab
1866{{{#!if au-=1, ab+=+("1"+pd)
1867}}}}}}{{{#!if au-=tx, ab-=ty
1868}}}
1869{{{#!if (au==0)&&(ab==0)
1870{{{#!if br=true
1871}}}}}}}}}
1872{{{#!if !br
1873{{{#!if au=au.toString(), ab=ab.toString()
r252
1874}}}{{{#!if tn="", ps=(au.length==18), ps
1875{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1876}}}}}}{{{#!if !ps&&(au.length<17)
1877{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1878}}}}}}{{{#!if ab.length<18
1879{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1880}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
1881}}}}}}}}}
1882##i=7
1883{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1884{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1885}}}{{{#!if ty=ty.toString(), ty.length==19
1886{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1887}}}}}}
1888{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1889{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1890}}}{{{#!if ty=ty.toString(), ty.length==19
1891{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1892}}}}}}{{{#!if ty=+ty
1893}}}}}}
1894{{{#!if ty>ab
1895{{{#!if tn-=1, ab+=+("1"+pd)
1896}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1897}}}}}}
1898{{{#!if !br
r249
1899{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
1900{{{#!if ps=true, tm+="0"
r242
1901}}}}}}
1902{{{#!if !ps
1903{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1904}}}{{{#!if ty=ty.toString(), ty.length==19
1905{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1906}}}}}}
1907{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1908{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1909}}}{{{#!if ty=ty.toString(), ty.length==19
1910{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1911}}}}}}{{{#!if ty=+ty
1912}}}}}}
1913{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
1914}}}{{{#!if ty>ab
1915{{{#!if au-=1, ab+=+("1"+pd)
1916}}}}}}{{{#!if au-=tx, ab-=ty
1917}}}
1918{{{#!if (au==0)&&(ab==0)
1919{{{#!if br=true
1920}}}}}}}}}
1921{{{#!if !br
1922{{{#!if au=au.toString(), ab=ab.toString()
r252
1923}}}{{{#!if tn="", ps=(au.length==18), ps
1924{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1925}}}}}}{{{#!if !ps&&(au.length<17)
1926{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1927}}}}}}{{{#!if ab.length<18
1928{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1929}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
1930}}}}}}}}}
1931##i=8
1932{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1933{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1934}}}{{{#!if ty=ty.toString(), ty.length==19
1935{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1936}}}}}}
1937{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1938{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1939}}}{{{#!if ty=ty.toString(), ty.length==19
1940{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1941}}}}}}{{{#!if ty=+ty
1942}}}}}}
1943{{{#!if ty>ab
1944{{{#!if tn-=1, ab+=+("1"+pd)
1945}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1946}}}}}}
1947{{{#!if !br
r249
1948{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
1949{{{#!if ps=true, tm+="0"
r242
1950}}}}}}
1951{{{#!if !ps
1952{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1953}}}{{{#!if ty=ty.toString(), ty.length==19
1954{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1955}}}}}}
1956{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1957{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1958}}}{{{#!if ty=ty.toString(), ty.length==19
1959{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1960}}}}}}{{{#!if ty=+ty
1961}}}}}}
1962{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
1963}}}{{{#!if ty>ab
1964{{{#!if au-=1, ab+=+("1"+pd)
1965}}}}}}{{{#!if au-=tx, ab-=ty
1966}}}
1967{{{#!if (au==0)&&(ab==0)
1968{{{#!if br=true
1969}}}}}}}}}
1970{{{#!if !br
1971{{{#!if au=au.toString(), ab=ab.toString()
r252
1972}}}{{{#!if tn="", ps=(au.length==18), ps
1973{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1974}}}}}}{{{#!if !ps&&(au.length<17)
1975{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1976}}}}}}{{{#!if ab.length<18
1977{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1978}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
1979}}}}}}}}}
1980##i=9
1981{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1982{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1983}}}{{{#!if ty=ty.toString(), ty.length==19
1984{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1985}}}}}}
1986{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1987{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1988}}}{{{#!if ty=ty.toString(), ty.length==19
1989{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1990}}}}}}{{{#!if ty=+ty
1991}}}}}}
1992{{{#!if ty>ab
1993{{{#!if tn-=1, ab+=+("1"+pd)
1994}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1995}}}}}}
1996{{{#!if !br
r249
1997{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
1998{{{#!if ps=true, tm+="0"
r242
1999}}}}}}
2000{{{#!if !ps
2001{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2002}}}{{{#!if ty=ty.toString(), ty.length==19
2003{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2004}}}}}}
2005{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2006{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2007}}}{{{#!if ty=ty.toString(), ty.length==19
2008{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2009}}}}}}{{{#!if ty=+ty
2010}}}}}}
2011{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2012}}}{{{#!if ty>ab
2013{{{#!if au-=1, ab+=+("1"+pd)
2014}}}}}}{{{#!if au-=tx, ab-=ty
2015}}}
2016{{{#!if (au==0)&&(ab==0)
2017{{{#!if br=true
2018}}}}}}}}}
2019{{{#!if !br
2020{{{#!if au=au.toString(), ab=ab.toString()
r252
2021}}}{{{#!if tn="", ps=(au.length==18), ps
2022{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2023}}}}}}{{{#!if !ps&&(au.length<17)
2024{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
2025}}}}}}{{{#!if ab.length<18
2026{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2027}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2028}}}}}}}}}
2029##i=10
2030{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2031{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2032}}}{{{#!if ty=ty.toString(), ty.length==19
2033{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2034}}}}}}
2035{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2036{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2037}}}{{{#!if ty=ty.toString(), ty.length==19
2038{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2039}}}}}}{{{#!if ty=+ty
2040}}}}}}
2041{{{#!if ty>ab
2042{{{#!if tn-=1, ab+=+("1"+pd)
2043}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2044}}}}}}
2045{{{#!if !br
r249
2046{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2047{{{#!if ps=true, tm+="0"
r242
2048}}}}}}
2049{{{#!if !ps
2050{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2051}}}{{{#!if ty=ty.toString(), ty.length==19
2052{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2053}}}}}}
2054{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2055{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2056}}}{{{#!if ty=ty.toString(), ty.length==19
2057{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2058}}}}}}{{{#!if ty=+ty
2059}}}}}}
2060{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2061}}}{{{#!if ty>ab
2062{{{#!if au-=1, ab+=+("1"+pd)
2063}}}}}}{{{#!if au-=tx, ab-=ty
2064}}}
2065{{{#!if (au==0)&&(ab==0)
2066{{{#!if br=true
2067}}}}}}}}}
2068{{{#!if !br
2069{{{#!if au=au.toString(), ab=ab.toString()
r252
2070}}}{{{#!if tn="", ps=(au.length==18), ps
2071{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2072}}}}}}{{{#!if !ps&&(au.length<17)
2073{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
2074}}}}}}{{{#!if ab.length<18
2075{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2076}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2077}}}}}}}}}
r243
2078##i=11
2079{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2080{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2081}}}{{{#!if ty=ty.toString(), ty.length==19
2082{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2083}}}}}}
2084{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2085{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2086}}}{{{#!if ty=ty.toString(), ty.length==19
2087{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2088}}}}}}{{{#!if ty=+ty
2089}}}}}}
2090{{{#!if ty>ab
2091{{{#!if tn-=1, ab+=+("1"+pd)
2092}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2093}}}}}}
2094{{{#!if !br
r249
2095{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2096{{{#!if ps=true, tm+="0"
r243
2097}}}}}}
2098{{{#!if !ps
2099{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2100}}}{{{#!if ty=ty.toString(), ty.length==19
2101{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2102}}}}}}
2103{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2104{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2105}}}{{{#!if ty=ty.toString(), ty.length==19
2106{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2107}}}}}}{{{#!if ty=+ty
2108}}}}}}
2109{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2110}}}{{{#!if ty>ab
2111{{{#!if au-=1, ab+=+("1"+pd)
2112}}}}}}{{{#!if au-=tx, ab-=ty
2113}}}
2114{{{#!if (au==0)&&(ab==0)
2115{{{#!if br=true
2116}}}}}}}}}
2117{{{#!if !br
2118{{{#!if au=au.toString(), ab=ab.toString()
r252
2119}}}{{{#!if tn="", ps=(au.length==18), ps
2120{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2121}}}}}}{{{#!if !ps&&(au.length<17)
2122{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2123}}}}}}{{{#!if ab.length<18
2124{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2125}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2126}}}}}}}}}
2127##i=12
2128{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2129{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2130}}}{{{#!if ty=ty.toString(), ty.length==19
2131{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2132}}}}}}
2133{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2134{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2135}}}{{{#!if ty=ty.toString(), ty.length==19
2136{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2137}}}}}}{{{#!if ty=+ty
2138}}}}}}
2139{{{#!if ty>ab
2140{{{#!if tn-=1, ab+=+("1"+pd)
2141}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2142}}}}}}
2143{{{#!if !br
r249
2144{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2145{{{#!if ps=true, tm+="0"
r243
2146}}}}}}
2147{{{#!if !ps
2148{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2149}}}{{{#!if ty=ty.toString(), ty.length==19
2150{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2151}}}}}}
2152{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2153{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2154}}}{{{#!if ty=ty.toString(), ty.length==19
2155{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2156}}}}}}{{{#!if ty=+ty
2157}}}}}}
2158{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2159}}}{{{#!if ty>ab
2160{{{#!if au-=1, ab+=+("1"+pd)
2161}}}}}}{{{#!if au-=tx, ab-=ty
2162}}}
2163{{{#!if (au==0)&&(ab==0)
2164{{{#!if br=true
2165}}}}}}}}}
2166{{{#!if !br
2167{{{#!if au=au.toString(), ab=ab.toString()
r252
2168}}}{{{#!if tn="", ps=(au.length==18), ps
2169{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2170}}}}}}{{{#!if !ps&&(au.length<17)
2171{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2172}}}}}}{{{#!if ab.length<18
2173{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2174}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2175}}}}}}}}}
2176##i=13
2177{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2178{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2179}}}{{{#!if ty=ty.toString(), ty.length==19
2180{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2181}}}}}}
2182{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2183{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2184}}}{{{#!if ty=ty.toString(), ty.length==19
2185{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2186}}}}}}{{{#!if ty=+ty
2187}}}}}}
2188{{{#!if ty>ab
2189{{{#!if tn-=1, ab+=+("1"+pd)
2190}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2191}}}}}}
2192{{{#!if !br
r249
2193{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2194{{{#!if ps=true, tm+="0"
r243
2195}}}}}}
2196{{{#!if !ps
2197{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2198}}}{{{#!if ty=ty.toString(), ty.length==19
2199{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2200}}}}}}
2201{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2202{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2203}}}{{{#!if ty=ty.toString(), ty.length==19
2204{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2205}}}}}}{{{#!if ty=+ty
2206}}}}}}
2207{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2208}}}{{{#!if ty>ab
2209{{{#!if au-=1, ab+=+("1"+pd)
2210}}}}}}{{{#!if au-=tx, ab-=ty
2211}}}
2212{{{#!if (au==0)&&(ab==0)
2213{{{#!if br=true
2214}}}}}}}}}
2215{{{#!if !br
2216{{{#!if au=au.toString(), ab=ab.toString()
r252
2217}}}{{{#!if tn="", ps=(au.length==18), ps
2218{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2219}}}}}}{{{#!if !ps&&(au.length<17)
2220{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2221}}}}}}{{{#!if ab.length<18
2222{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2223}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2224}}}}}}}}}
2225##i=14
2226{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2227{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2228}}}{{{#!if ty=ty.toString(), ty.length==19
2229{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2230}}}}}}
2231{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2232{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2233}}}{{{#!if ty=ty.toString(), ty.length==19
2234{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2235}}}}}}{{{#!if ty=+ty
2236}}}}}}
2237{{{#!if ty>ab
2238{{{#!if tn-=1, ab+=+("1"+pd)
2239}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2240}}}}}}
2241{{{#!if !br
r249
2242{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2243{{{#!if ps=true, tm+="0"
r243
2244}}}}}}
2245{{{#!if !ps
2246{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2247}}}{{{#!if ty=ty.toString(), ty.length==19
2248{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2249}}}}}}
2250{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2251{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2252}}}{{{#!if ty=ty.toString(), ty.length==19
2253{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2254}}}}}}{{{#!if ty=+ty
2255}}}}}}
2256{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2257}}}{{{#!if ty>ab
2258{{{#!if au-=1, ab+=+("1"+pd)
2259}}}}}}{{{#!if au-=tx, ab-=ty
2260}}}
2261{{{#!if (au==0)&&(ab==0)
2262{{{#!if br=true
2263}}}}}}}}}
2264{{{#!if !br
2265{{{#!if au=au.toString(), ab=ab.toString()
r252
2266}}}{{{#!if tn="", ps=(au.length==18), ps
2267{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2268}}}}}}{{{#!if !ps&&(au.length<17)
2269{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2270}}}}}}{{{#!if ab.length<18
2271{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2272}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2273}}}}}}}}}
2274##i=15
2275{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2276{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2277}}}{{{#!if ty=ty.toString(), ty.length==19
2278{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2279}}}}}}
2280{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2281{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2282}}}{{{#!if ty=ty.toString(), ty.length==19
2283{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2284}}}}}}{{{#!if ty=+ty
2285}}}}}}
2286{{{#!if ty>ab
2287{{{#!if tn-=1, ab+=+("1"+pd)
2288}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2289}}}}}}
2290{{{#!if !br
r249
2291{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2292{{{#!if ps=true, tm+="0"
r243
2293}}}}}}
2294{{{#!if !ps
2295{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2296}}}{{{#!if ty=ty.toString(), ty.length==19
2297{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2298}}}}}}
2299{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2300{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2301}}}{{{#!if ty=ty.toString(), ty.length==19
2302{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2303}}}}}}{{{#!if ty=+ty
2304}}}}}}
2305{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2306}}}{{{#!if ty>ab
2307{{{#!if au-=1, ab+=+("1"+pd)
2308}}}}}}{{{#!if au-=tx, ab-=ty
2309}}}
2310{{{#!if (au==0)&&(ab==0)
2311{{{#!if br=true
2312}}}}}}}}}
2313{{{#!if !br
2314{{{#!if au=au.toString(), ab=ab.toString()
r252
2315}}}{{{#!if tn="", ps=(au.length==18), ps
2316{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2317}}}}}}{{{#!if !ps&&(au.length<17)
2318{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2319}}}}}}{{{#!if ab.length<18
2320{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2321}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2322}}}}}}}}}
2323##i=16
2324{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2325{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2326}}}{{{#!if ty=ty.toString(), ty.length==19
2327{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2328}}}}}}
2329{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2330{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2331}}}{{{#!if ty=ty.toString(), ty.length==19
2332{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2333}}}}}}{{{#!if ty=+ty
2334}}}}}}
2335{{{#!if ty>ab
2336{{{#!if tn-=1, ab+=+("1"+pd)
2337}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2338}}}}}}
2339{{{#!if !br
r249
2340{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2341{{{#!if ps=true, tm+="0"
r243
2342}}}}}}
2343{{{#!if !ps
2344{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2345}}}{{{#!if ty=ty.toString(), ty.length==19
2346{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2347}}}}}}
2348{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2349{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2350}}}{{{#!if ty=ty.toString(), ty.length==19
2351{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2352}}}}}}{{{#!if ty=+ty
2353}}}}}}
2354{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2355}}}{{{#!if ty>ab
2356{{{#!if au-=1, ab+=+("1"+pd)
2357}}}}}}{{{#!if au-=tx, ab-=ty
2358}}}
2359{{{#!if (au==0)&&(ab==0)
2360{{{#!if br=true
2361}}}}}}}}}
2362{{{#!if !br
2363{{{#!if au=au.toString(), ab=ab.toString()
r252
2364}}}{{{#!if tn="", ps=(au.length==18), ps
2365{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2366}}}}}}{{{#!if !ps&&(au.length<17)
2367{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2368}}}}}}{{{#!if ab.length<18
2369{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2370}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2371}}}}}}}}}
2372##i=17
2373{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2374{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2375}}}{{{#!if ty=ty.toString(), ty.length==19
2376{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2377}}}}}}
2378{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2379{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2380}}}{{{#!if ty=ty.toString(), ty.length==19
2381{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2382}}}}}}{{{#!if ty=+ty
2383}}}}}}
2384{{{#!if ty>ab
2385{{{#!if tn-=1, ab+=+("1"+pd)
2386}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2387}}}}}}
2388{{{#!if !br
r249
2389{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2390{{{#!if ps=true, tm+="0"
r243
2391}}}}}}
2392{{{#!if !ps
2393{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2394}}}{{{#!if ty=ty.toString(), ty.length==19
2395{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2396}}}}}}
2397{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2398{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2399}}}{{{#!if ty=ty.toString(), ty.length==19
2400{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2401}}}}}}{{{#!if ty=+ty
2402}}}}}}
2403{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2404}}}{{{#!if ty>ab
2405{{{#!if au-=1, ab+=+("1"+pd)
2406}}}}}}{{{#!if au-=tx, ab-=ty
2407}}}
2408{{{#!if (au==0)&&(ab==0)
2409{{{#!if br=true
2410}}}}}}}}}
2411{{{#!if !br
2412{{{#!if au=au.toString(), ab=ab.toString()
r252
2413}}}{{{#!if tn="", ps=(au.length==18), ps
2414{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2415}}}}}}{{{#!if !ps&&(au.length<17)
2416{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2417}}}}}}{{{#!if ab.length<18
2418{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2419}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2420}}}}}}}}}
2421##i=18
2422{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2423{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2424}}}{{{#!if ty=ty.toString(), ty.length==19
2425{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2426}}}}}}
2427{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2428{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2429}}}{{{#!if ty=ty.toString(), ty.length==19
2430{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2431}}}}}}{{{#!if ty=+ty
2432}}}}}}
2433{{{#!if ty>ab
2434{{{#!if tn-=1, ab+=+("1"+pd)
2435}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2436}}}}}}
2437{{{#!if !br
r249
2438{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2439{{{#!if ps=true, tm+="0"
r243
2440}}}}}}
2441{{{#!if !ps
2442{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2443}}}{{{#!if ty=ty.toString(), ty.length==19
2444{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2445}}}}}}
2446{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2447{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2448}}}{{{#!if ty=ty.toString(), ty.length==19
2449{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2450}}}}}}{{{#!if ty=+ty
2451}}}}}}
2452{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2453}}}{{{#!if ty>ab
2454{{{#!if au-=1, ab+=+("1"+pd)
2455}}}}}}{{{#!if au-=tx, ab-=ty
2456}}}
2457{{{#!if (au==0)&&(ab==0)
2458{{{#!if br=true
2459}}}}}}}}}
2460{{{#!if !br
2461{{{#!if au=au.toString(), ab=ab.toString()
r252
2462}}}{{{#!if tn="", ps=(au.length==18), ps
2463{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2464}}}}}}{{{#!if !ps&&(au.length<17)
2465{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2466}}}}}}{{{#!if ab.length<18
2467{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2468}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2469}}}}}}}}}
2470##i=19
2471{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2472{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2473}}}{{{#!if ty=ty.toString(), ty.length==19
2474{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2475}}}}}}
2476{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2477{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2478}}}{{{#!if ty=ty.toString(), ty.length==19
2479{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2480}}}}}}{{{#!if ty=+ty
2481}}}}}}
2482{{{#!if ty>ab
2483{{{#!if tn-=1, ab+=+("1"+pd)
2484}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2485}}}}}}
2486{{{#!if !br
r249
2487{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2488{{{#!if ps=true, tm+="0"
r243
2489}}}}}}
2490{{{#!if !ps
2491{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2492}}}{{{#!if ty=ty.toString(), ty.length==19
2493{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2494}}}}}}
2495{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2496{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2497}}}{{{#!if ty=ty.toString(), ty.length==19
2498{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2499}}}}}}{{{#!if ty=+ty
2500}}}}}}
2501{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2502}}}{{{#!if ty>ab
2503{{{#!if au-=1, ab+=+("1"+pd)
2504}}}}}}{{{#!if au-=tx, ab-=ty
2505}}}
2506{{{#!if (au==0)&&(ab==0)
2507{{{#!if br=true
2508}}}}}}}}}
2509{{{#!if !br
2510{{{#!if au=au.toString(), ab=ab.toString()
r252
2511}}}{{{#!if tn="", ps=(au.length==18), ps
2512{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2513}}}}}}{{{#!if !ps&&(au.length<17)
2514{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2515}}}}}}{{{#!if ab.length<18
2516{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2517}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2518}}}}}}}}}
2519##i=20
2520{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2521{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2522}}}{{{#!if ty=ty.toString(), ty.length==19
2523{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2524}}}}}}
2525{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2526{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2527}}}{{{#!if ty=ty.toString(), ty.length==19
2528{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2529}}}}}}{{{#!if ty=+ty
2530}}}}}}
2531{{{#!if ty>ab
2532{{{#!if tn-=1, ab+=+("1"+pd)
2533}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2534}}}}}}
2535{{{#!if !br
r249
2536{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2537{{{#!if ps=true, tm+="0"
r243
2538}}}}}}
2539{{{#!if !ps
2540{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2541}}}{{{#!if ty=ty.toString(), ty.length==19
2542{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2543}}}}}}
2544{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2545{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2546}}}{{{#!if ty=ty.toString(), ty.length==19
2547{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2548}}}}}}{{{#!if ty=+ty
2549}}}}}}
2550{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2551}}}{{{#!if ty>ab
2552{{{#!if au-=1, ab+=+("1"+pd)
2553}}}}}}{{{#!if au-=tx, ab-=ty
2554}}}
2555{{{#!if (au==0)&&(ab==0)
2556{{{#!if br=true
2557}}}}}}}}}
2558{{{#!if !br
2559{{{#!if au=au.toString(), ab=ab.toString()
r252
2560}}}{{{#!if tn="", ps=(au.length==18), ps
2561{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2562}}}}}}{{{#!if !ps&&(au.length<17)
2563{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2564}}}}}}{{{#!if ab.length<18
2565{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2566}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2567}}}}}}}}}
2568##i=21
2569{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2570{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2571}}}{{{#!if ty=ty.toString(), ty.length==19
2572{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2573}}}}}}
2574{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2575{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2576}}}{{{#!if ty=ty.toString(), ty.length==19
2577{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2578}}}}}}{{{#!if ty=+ty
2579}}}}}}
2580{{{#!if ty>ab
2581{{{#!if tn-=1, ab+=+("1"+pd)
2582}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2583}}}}}}
2584{{{#!if !br
r249
2585{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2586{{{#!if ps=true, tm+="0"
r243
2587}}}}}}
2588{{{#!if !ps
2589{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2590}}}{{{#!if ty=ty.toString(), ty.length==19
2591{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2592}}}}}}
2593{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2594{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2595}}}{{{#!if ty=ty.toString(), ty.length==19
2596{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2597}}}}}}{{{#!if ty=+ty
2598}}}}}}
2599{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2600}}}{{{#!if ty>ab
2601{{{#!if au-=1, ab+=+("1"+pd)
2602}}}}}}{{{#!if au-=tx, ab-=ty
2603}}}
2604{{{#!if (au==0)&&(ab==0)
2605{{{#!if br=true
2606}}}}}}}}}
2607{{{#!if !br
2608{{{#!if au=au.toString(), ab=ab.toString()
r252
2609}}}{{{#!if tn="", ps=(au.length==18), ps
2610{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2611}}}}}}{{{#!if !ps&&(au.length<17)
2612{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2613}}}}}}{{{#!if ab.length<18
2614{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2615}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2616}}}}}}}}}
2617##i=22
2618{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2619{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2620}}}{{{#!if ty=ty.toString(), ty.length==19
2621{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2622}}}}}}
2623{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2624{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2625}}}{{{#!if ty=ty.toString(), ty.length==19
2626{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2627}}}}}}{{{#!if ty=+ty
2628}}}}}}
2629{{{#!if ty>ab
2630{{{#!if tn-=1, ab+=+("1"+pd)
2631}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2632}}}}}}
2633{{{#!if !br
r249
2634{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2635{{{#!if ps=true, tm+="0"
r243
2636}}}}}}
2637{{{#!if !ps
2638{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2639}}}{{{#!if ty=ty.toString(), ty.length==19
2640{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2641}}}}}}
2642{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2643{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2644}}}{{{#!if ty=ty.toString(), ty.length==19
2645{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2646}}}}}}{{{#!if ty=+ty
2647}}}}}}
2648{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2649}}}{{{#!if ty>ab
2650{{{#!if au-=1, ab+=+("1"+pd)
2651}}}}}}{{{#!if au-=tx, ab-=ty
2652}}}
2653{{{#!if (au==0)&&(ab==0)
2654{{{#!if br=true
2655}}}}}}}}}
2656{{{#!if !br
2657{{{#!if au=au.toString(), ab=ab.toString()
r252
2658}}}{{{#!if tn="", ps=(au.length==18), ps
2659{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2660}}}}}}{{{#!if !ps&&(au.length<17)
2661{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2662}}}}}}{{{#!if ab.length<18
2663{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2664}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2665}}}}}}}}}
2666##i=23
2667{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2668{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2669}}}{{{#!if ty=ty.toString(), ty.length==19
2670{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2671}}}}}}
2672{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2673{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2674}}}{{{#!if ty=ty.toString(), ty.length==19
2675{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2676}}}}}}{{{#!if ty=+ty
2677}}}}}}
2678{{{#!if ty>ab
2679{{{#!if tn-=1, ab+=+("1"+pd)
2680}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2681}}}}}}
2682{{{#!if !br
r249
2683{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2684{{{#!if ps=true, tm+="0"
r243
2685}}}}}}
2686{{{#!if !ps
2687{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2688}}}{{{#!if ty=ty.toString(), ty.length==19
2689{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2690}}}}}}
2691{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2692{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2693}}}{{{#!if ty=ty.toString(), ty.length==19
2694{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2695}}}}}}{{{#!if ty=+ty
2696}}}}}}
2697{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2698}}}{{{#!if ty>ab
2699{{{#!if au-=1, ab+=+("1"+pd)
2700}}}}}}{{{#!if au-=tx, ab-=ty
2701}}}
2702{{{#!if (au==0)&&(ab==0)
2703{{{#!if br=true
2704}}}}}}}}}
2705{{{#!if !br
2706{{{#!if au=au.toString(), ab=ab.toString()
r252
2707}}}{{{#!if tn="", ps=(au.length==18), ps
2708{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2709}}}}}}{{{#!if !ps&&(au.length<17)
2710{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2711}}}}}}{{{#!if ab.length<18
2712{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2713}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2714}}}}}}}}}
2715##i=24
2716{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2717{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2718}}}{{{#!if ty=ty.toString(), ty.length==19
2719{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2720}}}}}}
2721{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2722{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2723}}}{{{#!if ty=ty.toString(), ty.length==19
2724{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2725}}}}}}{{{#!if ty=+ty
2726}}}}}}
2727{{{#!if ty>ab
2728{{{#!if tn-=1, ab+=+("1"+pd)
2729}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2730}}}}}}
2731{{{#!if !br
r249
2732{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2733{{{#!if ps=true, tm+="0"
r243
2734}}}}}}
2735{{{#!if !ps
2736{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2737}}}{{{#!if ty=ty.toString(), ty.length==19
2738{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2739}}}}}}
2740{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2741{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2742}}}{{{#!if ty=ty.toString(), ty.length==19
2743{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2744}}}}}}{{{#!if ty=+ty
2745}}}}}}
2746{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2747}}}{{{#!if ty>ab
2748{{{#!if au-=1, ab+=+("1"+pd)
2749}}}}}}{{{#!if au-=tx, ab-=ty
2750}}}
2751{{{#!if (au==0)&&(ab==0)
2752{{{#!if br=true
2753}}}}}}}}}
2754{{{#!if !br
2755{{{#!if au=au.toString(), ab=ab.toString()
r252
2756}}}{{{#!if tn="", ps=(au.length==18), ps
2757{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2758}}}}}}{{{#!if !ps&&(au.length<17)
2759{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2760}}}}}}{{{#!if ab.length<18
2761{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2762}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2763}}}}}}}}}
2764##i=25
2765{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2766{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2767}}}{{{#!if ty=ty.toString(), ty.length==19
2768{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2769}}}}}}
2770{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2771{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2772}}}{{{#!if ty=ty.toString(), ty.length==19
2773{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2774}}}}}}{{{#!if ty=+ty
2775}}}}}}
2776{{{#!if ty>ab
2777{{{#!if tn-=1, ab+=+("1"+pd)
2778}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2779}}}}}}
2780{{{#!if !br
r249
2781{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2782{{{#!if ps=true, tm+="0"
r243
2783}}}}}}
2784{{{#!if !ps
2785{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2786}}}{{{#!if ty=ty.toString(), ty.length==19
2787{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2788}}}}}}
2789{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2790{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2791}}}{{{#!if ty=ty.toString(), ty.length==19
2792{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2793}}}}}}{{{#!if ty=+ty
2794}}}}}}
2795{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2796}}}{{{#!if ty>ab
2797{{{#!if au-=1, ab+=+("1"+pd)
2798}}}}}}{{{#!if au-=tx, ab-=ty
2799}}}
2800{{{#!if (au==0)&&(ab==0)
2801{{{#!if br=true
2802}}}}}}}}}
2803{{{#!if !br
2804{{{#!if au=au.toString(), ab=ab.toString()
r252
2805}}}{{{#!if tn="", ps=(au.length==18), ps
2806{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2807}}}}}}{{{#!if !ps&&(au.length<17)
2808{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2809}}}}}}{{{#!if ab.length<18
2810{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2811}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2812}}}}}}}}}
2813##i=26
2814{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2815{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2816}}}{{{#!if ty=ty.toString(), ty.length==19
2817{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2818}}}}}}
2819{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2820{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2821}}}{{{#!if ty=ty.toString(), ty.length==19
2822{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2823}}}}}}{{{#!if ty=+ty
2824}}}}}}
2825{{{#!if ty>ab
2826{{{#!if tn-=1, ab+=+("1"+pd)
2827}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2828}}}}}}
2829{{{#!if !br
r249
2830{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2831{{{#!if ps=true, tm+="0"
r243
2832}}}}}}
2833{{{#!if !ps
2834{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2835}}}{{{#!if ty=ty.toString(), ty.length==19
2836{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2837}}}}}}
2838{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2839{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2840}}}{{{#!if ty=ty.toString(), ty.length==19
2841{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2842}}}}}}{{{#!if ty=+ty
2843}}}}}}
2844{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2845}}}{{{#!if ty>ab
2846{{{#!if au-=1, ab+=+("1"+pd)
2847}}}}}}{{{#!if au-=tx, ab-=ty
2848}}}
2849{{{#!if (au==0)&&(ab==0)
2850{{{#!if br=true
2851}}}}}}}}}
2852{{{#!if !br
2853{{{#!if au=au.toString(), ab=ab.toString()
r252
2854}}}{{{#!if tn="", ps=(au.length==18), ps
2855{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2856}}}}}}{{{#!if !ps&&(au.length<17)
2857{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2858}}}}}}{{{#!if ab.length<18
2859{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2860}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2861}}}}}}}}}
2862##i=27
2863{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2864{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2865}}}{{{#!if ty=ty.toString(), ty.length==19
2866{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2867}}}}}}
2868{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2869{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2870}}}{{{#!if ty=ty.toString(), ty.length==19
2871{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2872}}}}}}{{{#!if ty=+ty
2873}}}}}}
2874{{{#!if ty>ab
2875{{{#!if tn-=1, ab+=+("1"+pd)
2876}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2877}}}}}}
2878{{{#!if !br
r249
2879{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2880{{{#!if ps=true, tm+="0"
r243
2881}}}}}}
2882{{{#!if !ps
2883{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2884}}}{{{#!if ty=ty.toString(), ty.length==19
2885{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2886}}}}}}
2887{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2888{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2889}}}{{{#!if ty=ty.toString(), ty.length==19
2890{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2891}}}}}}{{{#!if ty=+ty
2892}}}}}}
2893{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2894}}}{{{#!if ty>ab
2895{{{#!if au-=1, ab+=+("1"+pd)
2896}}}}}}{{{#!if au-=tx, ab-=ty
2897}}}
2898{{{#!if (au==0)&&(ab==0)
2899{{{#!if br=true
2900}}}}}}}}}
2901{{{#!if !br
2902{{{#!if au=au.toString(), ab=ab.toString()
r252
2903}}}{{{#!if tn="", ps=(au.length==18), ps
2904{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2905}}}}}}{{{#!if !ps&&(au.length<17)
2906{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2907}}}}}}{{{#!if ab.length<18
2908{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2909}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2910}}}}}}}}}
2911##i=28
2912{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2913{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2914}}}{{{#!if ty=ty.toString(), ty.length==19
2915{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2916}}}}}}
2917{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2918{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2919}}}{{{#!if ty=ty.toString(), ty.length==19
2920{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2921}}}}}}{{{#!if ty=+ty
2922}}}}}}
2923{{{#!if ty>ab
2924{{{#!if tn-=1, ab+=+("1"+pd)
2925}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2926}}}}}}
2927{{{#!if !br
r249
2928{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2929{{{#!if ps=true, tm+="0"
r243
2930}}}}}}
2931{{{#!if !ps
2932{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2933}}}{{{#!if ty=ty.toString(), ty.length==19
2934{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2935}}}}}}
2936{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2937{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2938}}}{{{#!if ty=ty.toString(), ty.length==19
2939{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2940}}}}}}{{{#!if ty=+ty
2941}}}}}}
2942{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2943}}}{{{#!if ty>ab
2944{{{#!if au-=1, ab+=+("1"+pd)
2945}}}}}}{{{#!if au-=tx, ab-=ty
2946}}}
2947{{{#!if (au==0)&&(ab==0)
2948{{{#!if br=true
2949}}}}}}}}}
2950{{{#!if !br
2951{{{#!if au=au.toString(), ab=ab.toString()
r252
2952}}}{{{#!if tn="", ps=(au.length==18), ps
2953{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2954}}}}}}{{{#!if !ps&&(au.length<17)
2955{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2956}}}}}}{{{#!if ab.length<18
2957{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2958}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
2959}}}}}}}}}
2960##i=29
2961{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2962{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2963}}}{{{#!if ty=ty.toString(), ty.length==19
2964{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2965}}}}}}
2966{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2967{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2968}}}{{{#!if ty=ty.toString(), ty.length==19
2969{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2970}}}}}}{{{#!if ty=+ty
2971}}}}}}
2972{{{#!if ty>ab
2973{{{#!if tn-=1, ab+=+("1"+pd)
2974}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2975}}}}}}
2976{{{#!if !br
r249
2977{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
2978{{{#!if ps=true, tm+="0"
r243
2979}}}}}}
2980{{{#!if !ps
2981{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2982}}}{{{#!if ty=ty.toString(), ty.length==19
2983{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2984}}}}}}
2985{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2986{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2987}}}{{{#!if ty=ty.toString(), ty.length==19
2988{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2989}}}}}}{{{#!if ty=+ty
2990}}}}}}
2991{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
2992}}}{{{#!if ty>ab
2993{{{#!if au-=1, ab+=+("1"+pd)
2994}}}}}}{{{#!if au-=tx, ab-=ty
2995}}}
2996{{{#!if (au==0)&&(ab==0)
2997{{{#!if br=true
2998}}}}}}}}}
2999{{{#!if !br
3000{{{#!if au=au.toString(), ab=ab.toString()
r252
3001}}}{{{#!if tn="", ps=(au.length==18), ps
3002{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3003}}}}}}{{{#!if !ps&&(au.length<17)
3004{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3005}}}}}}{{{#!if ab.length<18
3006{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3007}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3008}}}}}}}}}
3009##i=30
3010{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3011{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3012}}}{{{#!if ty=ty.toString(), ty.length==19
3013{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3014}}}}}}
3015{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3016{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3017}}}{{{#!if ty=ty.toString(), ty.length==19
3018{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3019}}}}}}{{{#!if ty=+ty
3020}}}}}}
3021{{{#!if ty>ab
3022{{{#!if tn-=1, ab+=+("1"+pd)
3023}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3024}}}}}}
3025{{{#!if !br
r249
3026{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3027{{{#!if ps=true, tm+="0"
r243
3028}}}}}}
3029{{{#!if !ps
3030{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3031}}}{{{#!if ty=ty.toString(), ty.length==19
3032{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3033}}}}}}
3034{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3035{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3036}}}{{{#!if ty=ty.toString(), ty.length==19
3037{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3038}}}}}}{{{#!if ty=+ty
3039}}}}}}
3040{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3041}}}{{{#!if ty>ab
3042{{{#!if au-=1, ab+=+("1"+pd)
3043}}}}}}{{{#!if au-=tx, ab-=ty
3044}}}
3045{{{#!if (au==0)&&(ab==0)
3046{{{#!if br=true
3047}}}}}}}}}
3048{{{#!if !br
3049{{{#!if au=au.toString(), ab=ab.toString()
r252
3050}}}{{{#!if tn="", ps=(au.length==18), ps
3051{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3052}}}}}}{{{#!if !ps&&(au.length<17)
3053{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3054}}}}}}{{{#!if ab.length<18
3055{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3056}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3057}}}}}}}}}
3058##i=31
3059{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3060{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3061}}}{{{#!if ty=ty.toString(), ty.length==19
3062{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3063}}}}}}
3064{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3065{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3066}}}{{{#!if ty=ty.toString(), ty.length==19
3067{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3068}}}}}}{{{#!if ty=+ty
3069}}}}}}
3070{{{#!if ty>ab
3071{{{#!if tn-=1, ab+=+("1"+pd)
3072}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3073}}}}}}
3074{{{#!if !br
r249
3075{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3076{{{#!if ps=true, tm+="0"
r243
3077}}}}}}
3078{{{#!if !ps
3079{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3080}}}{{{#!if ty=ty.toString(), ty.length==19
3081{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3082}}}}}}
3083{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3084{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3085}}}{{{#!if ty=ty.toString(), ty.length==19
3086{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3087}}}}}}{{{#!if ty=+ty
3088}}}}}}
3089{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3090}}}{{{#!if ty>ab
3091{{{#!if au-=1, ab+=+("1"+pd)
3092}}}}}}{{{#!if au-=tx, ab-=ty
3093}}}
3094{{{#!if (au==0)&&(ab==0)
3095{{{#!if br=true
3096}}}}}}}}}
3097{{{#!if !br
3098{{{#!if au=au.toString(), ab=ab.toString()
r252
3099}}}{{{#!if tn="", ps=(au.length==18), ps
3100{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3101}}}}}}{{{#!if !ps&&(au.length<17)
3102{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3103}}}}}}{{{#!if ab.length<18
3104{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3105}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3106}}}}}}}}}
3107##i=32
3108{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3109{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3110}}}{{{#!if ty=ty.toString(), ty.length==19
3111{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3112}}}}}}
3113{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3114{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3115}}}{{{#!if ty=ty.toString(), ty.length==19
3116{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3117}}}}}}{{{#!if ty=+ty
3118}}}}}}
3119{{{#!if ty>ab
3120{{{#!if tn-=1, ab+=+("1"+pd)
3121}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3122}}}}}}
3123{{{#!if !br
r249
3124{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3125{{{#!if ps=true, tm+="0"
r243
3126}}}}}}
3127{{{#!if !ps
3128{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3129}}}{{{#!if ty=ty.toString(), ty.length==19
3130{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3131}}}}}}
3132{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3133{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3134}}}{{{#!if ty=ty.toString(), ty.length==19
3135{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3136}}}}}}{{{#!if ty=+ty
3137}}}}}}
3138{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3139}}}{{{#!if ty>ab
3140{{{#!if au-=1, ab+=+("1"+pd)
3141}}}}}}{{{#!if au-=tx, ab-=ty
3142}}}
3143{{{#!if (au==0)&&(ab==0)
3144{{{#!if br=true
3145}}}}}}}}}
3146{{{#!if !br
3147{{{#!if au=au.toString(), ab=ab.toString()
r252
3148}}}{{{#!if tn="", ps=(au.length==18), ps
3149{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3150}}}}}}{{{#!if !ps&&(au.length<17)
3151{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3152}}}}}}{{{#!if ab.length<18
3153{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3154}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3155}}}}}}}}}
3156##i=33
3157{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3158{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3159}}}{{{#!if ty=ty.toString(), ty.length==19
3160{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3161}}}}}}
3162{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3163{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3164}}}{{{#!if ty=ty.toString(), ty.length==19
3165{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3166}}}}}}{{{#!if ty=+ty
3167}}}}}}
3168{{{#!if ty>ab
3169{{{#!if tn-=1, ab+=+("1"+pd)
3170}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3171}}}}}}
3172{{{#!if !br
r249
3173{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3174{{{#!if ps=true, tm+="0"
r243
3175}}}}}}
3176{{{#!if !ps
3177{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3178}}}{{{#!if ty=ty.toString(), ty.length==19
3179{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3180}}}}}}
3181{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3182{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3183}}}{{{#!if ty=ty.toString(), ty.length==19
3184{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3185}}}}}}{{{#!if ty=+ty
3186}}}}}}
3187{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3188}}}{{{#!if ty>ab
3189{{{#!if au-=1, ab+=+("1"+pd)
3190}}}}}}{{{#!if au-=tx, ab-=ty
3191}}}
3192{{{#!if (au==0)&&(ab==0)
3193{{{#!if br=true
3194}}}}}}}}}
3195{{{#!if !br
3196{{{#!if au=au.toString(), ab=ab.toString()
r252
3197}}}{{{#!if tn="", ps=(au.length==18), ps
3198{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3199}}}}}}{{{#!if !ps&&(au.length<17)
3200{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3201}}}}}}{{{#!if ab.length<18
3202{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3203}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3204}}}}}}}}}
3205##i=34
3206{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3207{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3208}}}{{{#!if ty=ty.toString(), ty.length==19
3209{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3210}}}}}}
3211{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3212{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3213}}}{{{#!if ty=ty.toString(), ty.length==19
3214{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3215}}}}}}{{{#!if ty=+ty
3216}}}}}}
3217{{{#!if ty>ab
3218{{{#!if tn-=1, ab+=+("1"+pd)
3219}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3220}}}}}}
3221{{{#!if !br
r249
3222{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3223{{{#!if ps=true, tm+="0"
r243
3224}}}}}}
3225{{{#!if !ps
3226{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3227}}}{{{#!if ty=ty.toString(), ty.length==19
3228{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3229}}}}}}
3230{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3231{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3232}}}{{{#!if ty=ty.toString(), ty.length==19
3233{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3234}}}}}}{{{#!if ty=+ty
3235}}}}}}
3236{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3237}}}{{{#!if ty>ab
3238{{{#!if au-=1, ab+=+("1"+pd)
3239}}}}}}{{{#!if au-=tx, ab-=ty
3240}}}
3241{{{#!if (au==0)&&(ab==0)
3242{{{#!if br=true
3243}}}}}}}}}
3244{{{#!if !br
3245{{{#!if au=au.toString(), ab=ab.toString()
r252
3246}}}{{{#!if tn="", ps=(au.length==18), ps
3247{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3248}}}}}}{{{#!if !ps&&(au.length<17)
3249{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3250}}}}}}{{{#!if ab.length<18
3251{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3252}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3253}}}}}}}}}
3254##i=35
3255{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3256{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3257}}}{{{#!if ty=ty.toString(), ty.length==19
3258{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3259}}}}}}
3260{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3261{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3262}}}{{{#!if ty=ty.toString(), ty.length==19
3263{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3264}}}}}}{{{#!if ty=+ty
3265}}}}}}
3266{{{#!if ty>ab
3267{{{#!if tn-=1, ab+=+("1"+pd)
3268}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3269}}}}}}
3270{{{#!if !br
r249
3271{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3272{{{#!if ps=true, tm+="0"
r243
3273}}}}}}
3274{{{#!if !ps
3275{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3276}}}{{{#!if ty=ty.toString(), ty.length==19
3277{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3278}}}}}}
3279{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3280{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3281}}}{{{#!if ty=ty.toString(), ty.length==19
3282{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3283}}}}}}{{{#!if ty=+ty
3284}}}}}}
3285{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3286}}}{{{#!if ty>ab
3287{{{#!if au-=1, ab+=+("1"+pd)
3288}}}}}}{{{#!if au-=tx, ab-=ty
3289}}}
3290{{{#!if (au==0)&&(ab==0)
3291{{{#!if br=true
3292}}}}}}}}}
3293{{{#!if !br
3294{{{#!if au=au.toString(), ab=ab.toString()
r252
3295}}}{{{#!if tn="", ps=(au.length==18), ps
3296{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3297}}}}}}{{{#!if !ps&&(au.length<17)
3298{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3299}}}}}}{{{#!if ab.length<18
3300{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3301}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3302}}}}}}}}}
3303##i=36
3304{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3305{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3306}}}{{{#!if ty=ty.toString(), ty.length==19
3307{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3308}}}}}}
3309{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3310{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3311}}}{{{#!if ty=ty.toString(), ty.length==19
3312{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3313}}}}}}{{{#!if ty=+ty
3314}}}}}}
3315{{{#!if ty>ab
3316{{{#!if tn-=1, ab+=+("1"+pd)
3317}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3318}}}}}}
3319{{{#!if !br
r249
3320{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3321{{{#!if ps=true, tm+="0"
r243
3322}}}}}}
3323{{{#!if !ps
3324{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3325}}}{{{#!if ty=ty.toString(), ty.length==19
3326{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3327}}}}}}
3328{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3329{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3330}}}{{{#!if ty=ty.toString(), ty.length==19
3331{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3332}}}}}}{{{#!if ty=+ty
3333}}}}}}
3334{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3335}}}{{{#!if ty>ab
3336{{{#!if au-=1, ab+=+("1"+pd)
3337}}}}}}{{{#!if au-=tx, ab-=ty
3338}}}
3339{{{#!if (au==0)&&(ab==0)
3340{{{#!if br=true
3341}}}}}}}}}
3342{{{#!if !br
3343{{{#!if au=au.toString(), ab=ab.toString()
r252
3344}}}{{{#!if tn="", ps=(au.length==18), ps
3345{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3346}}}}}}{{{#!if !ps&&(au.length<17)
3347{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3348}}}}}}{{{#!if ab.length<18
3349{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3350}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3351}}}}}}}}}
3352##i=37
3353{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3354{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3355}}}{{{#!if ty=ty.toString(), ty.length==19
3356{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3357}}}}}}
3358{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3359{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3360}}}{{{#!if ty=ty.toString(), ty.length==19
3361{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3362}}}}}}{{{#!if ty=+ty
3363}}}}}}
3364{{{#!if ty>ab
3365{{{#!if tn-=1, ab+=+("1"+pd)
3366}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3367}}}}}}
3368{{{#!if !br
r249
3369{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3370{{{#!if ps=true, tm+="0"
r243
3371}}}}}}
3372{{{#!if !ps
3373{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3374}}}{{{#!if ty=ty.toString(), ty.length==19
3375{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3376}}}}}}
3377{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3378{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3379}}}{{{#!if ty=ty.toString(), ty.length==19
3380{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3381}}}}}}{{{#!if ty=+ty
3382}}}}}}
3383{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3384}}}{{{#!if ty>ab
3385{{{#!if au-=1, ab+=+("1"+pd)
3386}}}}}}{{{#!if au-=tx, ab-=ty
3387}}}
3388{{{#!if (au==0)&&(ab==0)
3389{{{#!if br=true
3390}}}}}}}}}
3391{{{#!if !br
3392{{{#!if au=au.toString(), ab=ab.toString()
r252
3393}}}{{{#!if tn="", ps=(au.length==18), ps
3394{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3395}}}}}}{{{#!if !ps&&(au.length<17)
3396{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3397}}}}}}{{{#!if ab.length<18
3398{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3399}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3400}}}}}}}}}
3401##i=38
3402{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3403{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3404}}}{{{#!if ty=ty.toString(), ty.length==19
3405{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3406}}}}}}
3407{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3408{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3409}}}{{{#!if ty=ty.toString(), ty.length==19
3410{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3411}}}}}}{{{#!if ty=+ty
3412}}}}}}
3413{{{#!if ty>ab
3414{{{#!if tn-=1, ab+=+("1"+pd)
3415}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3416}}}}}}
3417{{{#!if !br
r249
3418{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3419{{{#!if ps=true, tm+="0"
r243
3420}}}}}}
3421{{{#!if !ps
3422{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3423}}}{{{#!if ty=ty.toString(), ty.length==19
3424{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3425}}}}}}
3426{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3427{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3428}}}{{{#!if ty=ty.toString(), ty.length==19
3429{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3430}}}}}}{{{#!if ty=+ty
3431}}}}}}
3432{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3433}}}{{{#!if ty>ab
3434{{{#!if au-=1, ab+=+("1"+pd)
3435}}}}}}{{{#!if au-=tx, ab-=ty
3436}}}
3437{{{#!if (au==0)&&(ab==0)
3438{{{#!if br=true
3439}}}}}}}}}
3440{{{#!if !br
3441{{{#!if au=au.toString(), ab=ab.toString()
r252
3442}}}{{{#!if tn="", ps=(au.length==18), ps
3443{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3444}}}}}}{{{#!if !ps&&(au.length<17)
3445{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3446}}}}}}{{{#!if ab.length<18
3447{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3448}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3449}}}}}}}}}
3450##i=39
3451{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3452{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3453}}}{{{#!if ty=ty.toString(), ty.length==19
3454{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3455}}}}}}
3456{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3457{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3458}}}{{{#!if ty=ty.toString(), ty.length==19
3459{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3460}}}}}}{{{#!if ty=+ty
3461}}}}}}
3462{{{#!if ty>ab
3463{{{#!if tn-=1, ab+=+("1"+pd)
3464}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3465}}}}}}
3466{{{#!if !br
r249
3467{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3468{{{#!if ps=true, tm+="0"
r243
3469}}}}}}
3470{{{#!if !ps
3471{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3472}}}{{{#!if ty=ty.toString(), ty.length==19
3473{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3474}}}}}}
3475{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3476{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3477}}}{{{#!if ty=ty.toString(), ty.length==19
3478{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3479}}}}}}{{{#!if ty=+ty
3480}}}}}}
3481{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3482}}}{{{#!if ty>ab
3483{{{#!if au-=1, ab+=+("1"+pd)
3484}}}}}}{{{#!if au-=tx, ab-=ty
3485}}}
3486{{{#!if (au==0)&&(ab==0)
3487{{{#!if br=true
3488}}}}}}}}}
3489{{{#!if !br
3490{{{#!if au=au.toString(), ab=ab.toString()
r252
3491}}}{{{#!if tn="", ps=(au.length==18), ps
3492{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3493}}}}}}{{{#!if !ps&&(au.length<17)
3494{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3495}}}}}}{{{#!if ab.length<18
3496{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3497}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3498}}}}}}}}}
3499##i=40
3500{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3501{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3502}}}{{{#!if ty=ty.toString(), ty.length==19
3503{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3504}}}}}}
3505{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3506{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3507}}}{{{#!if ty=ty.toString(), ty.length==19
3508{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3509}}}}}}{{{#!if ty=+ty
3510}}}}}}
3511{{{#!if ty>ab
3512{{{#!if tn-=1, ab+=+("1"+pd)
3513}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3514}}}}}}
3515{{{#!if !br
r249
3516{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3517{{{#!if ps=true, tm+="0"
r243
3518}}}}}}
3519{{{#!if !ps
3520{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3521}}}{{{#!if ty=ty.toString(), ty.length==19
3522{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3523}}}}}}
3524{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3525{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3526}}}{{{#!if ty=ty.toString(), ty.length==19
3527{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3528}}}}}}{{{#!if ty=+ty
3529}}}}}}
3530{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3531}}}{{{#!if ty>ab
3532{{{#!if au-=1, ab+=+("1"+pd)
3533}}}}}}{{{#!if au-=tx, ab-=ty
3534}}}
3535{{{#!if (au==0)&&(ab==0)
3536{{{#!if br=true
3537}}}}}}}}}
3538{{{#!if !br
3539{{{#!if au=au.toString(), ab=ab.toString()
r252
3540}}}{{{#!if tn="", ps=(au.length==18), ps
3541{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3542}}}}}}{{{#!if !ps&&(au.length<17)
3543{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3544}}}}}}{{{#!if ab.length<18
3545{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3546}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3547}}}}}}}}}
3548##i=41
3549{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3550{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3551}}}{{{#!if ty=ty.toString(), ty.length==19
3552{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3553}}}}}}
3554{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3555{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3556}}}{{{#!if ty=ty.toString(), ty.length==19
3557{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3558}}}}}}{{{#!if ty=+ty
3559}}}}}}
3560{{{#!if ty>ab
3561{{{#!if tn-=1, ab+=+("1"+pd)
3562}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3563}}}}}}
3564{{{#!if !br
r249
3565{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3566{{{#!if ps=true, tm+="0"
r243
3567}}}}}}
3568{{{#!if !ps
3569{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3570}}}{{{#!if ty=ty.toString(), ty.length==19
3571{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3572}}}}}}
3573{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3574{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3575}}}{{{#!if ty=ty.toString(), ty.length==19
3576{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3577}}}}}}{{{#!if ty=+ty
3578}}}}}}
3579{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3580}}}{{{#!if ty>ab
3581{{{#!if au-=1, ab+=+("1"+pd)
3582}}}}}}{{{#!if au-=tx, ab-=ty
3583}}}
3584{{{#!if (au==0)&&(ab==0)
3585{{{#!if br=true
3586}}}}}}}}}
3587{{{#!if !br
3588{{{#!if au=au.toString(), ab=ab.toString()
r252
3589}}}{{{#!if tn="", ps=(au.length==18), ps
3590{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3591}}}}}}{{{#!if !ps&&(au.length<17)
3592{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3593}}}}}}{{{#!if ab.length<18
3594{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3595}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3596}}}}}}}}}
3597##i=42
3598{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3599{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3600}}}{{{#!if ty=ty.toString(), ty.length==19
3601{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3602}}}}}}
3603{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3604{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3605}}}{{{#!if ty=ty.toString(), ty.length==19
3606{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3607}}}}}}{{{#!if ty=+ty
3608}}}}}}
3609{{{#!if ty>ab
3610{{{#!if tn-=1, ab+=+("1"+pd)
3611}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3612}}}}}}
3613{{{#!if !br
r249
3614{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3615{{{#!if ps=true, tm+="0"
r243
3616}}}}}}
3617{{{#!if !ps
3618{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3619}}}{{{#!if ty=ty.toString(), ty.length==19
3620{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3621}}}}}}
3622{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3623{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3624}}}{{{#!if ty=ty.toString(), ty.length==19
3625{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3626}}}}}}{{{#!if ty=+ty
3627}}}}}}
3628{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3629}}}{{{#!if ty>ab
3630{{{#!if au-=1, ab+=+("1"+pd)
3631}}}}}}{{{#!if au-=tx, ab-=ty
3632}}}
3633{{{#!if (au==0)&&(ab==0)
3634{{{#!if br=true
3635}}}}}}}}}
3636{{{#!if !br
3637{{{#!if au=au.toString(), ab=ab.toString()
r252
3638}}}{{{#!if tn="", ps=(au.length==18), ps
3639{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3640}}}}}}{{{#!if !ps&&(au.length<17)
3641{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3642}}}}}}{{{#!if ab.length<18
3643{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3644}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3645}}}}}}}}}
3646##i=43
3647{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3648{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3649}}}{{{#!if ty=ty.toString(), ty.length==19
3650{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3651}}}}}}
3652{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3653{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3654}}}{{{#!if ty=ty.toString(), ty.length==19
3655{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3656}}}}}}{{{#!if ty=+ty
3657}}}}}}
3658{{{#!if ty>ab
3659{{{#!if tn-=1, ab+=+("1"+pd)
3660}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3661}}}}}}
3662{{{#!if !br
r249
3663{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3664{{{#!if ps=true, tm+="0"
r243
3665}}}}}}
3666{{{#!if !ps
3667{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3668}}}{{{#!if ty=ty.toString(), ty.length==19
3669{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3670}}}}}}
3671{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3672{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3673}}}{{{#!if ty=ty.toString(), ty.length==19
3674{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3675}}}}}}{{{#!if ty=+ty
3676}}}}}}
3677{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3678}}}{{{#!if ty>ab
3679{{{#!if au-=1, ab+=+("1"+pd)
3680}}}}}}{{{#!if au-=tx, ab-=ty
3681}}}
3682{{{#!if (au==0)&&(ab==0)
3683{{{#!if br=true
3684}}}}}}}}}
3685{{{#!if !br
3686{{{#!if au=au.toString(), ab=ab.toString()
r252
3687}}}{{{#!if tn="", ps=(au.length==18), ps
3688{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3689}}}}}}{{{#!if !ps&&(au.length<17)
3690{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3691}}}}}}{{{#!if ab.length<18
3692{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3693}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3694}}}}}}}}}
3695##i=44
3696{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3697{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3698}}}{{{#!if ty=ty.toString(), ty.length==19
3699{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3700}}}}}}
3701{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3702{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3703}}}{{{#!if ty=ty.toString(), ty.length==19
3704{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3705}}}}}}{{{#!if ty=+ty
3706}}}}}}
3707{{{#!if ty>ab
3708{{{#!if tn-=1, ab+=+("1"+pd)
3709}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3710}}}}}}
3711{{{#!if !br
r249
3712{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3713{{{#!if ps=true, tm+="0"
r243
3714}}}}}}
3715{{{#!if !ps
3716{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3717}}}{{{#!if ty=ty.toString(), ty.length==19
3718{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3719}}}}}}
3720{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3721{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3722}}}{{{#!if ty=ty.toString(), ty.length==19
3723{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3724}}}}}}{{{#!if ty=+ty
3725}}}}}}
3726{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3727}}}{{{#!if ty>ab
3728{{{#!if au-=1, ab+=+("1"+pd)
3729}}}}}}{{{#!if au-=tx, ab-=ty
3730}}}
3731{{{#!if (au==0)&&(ab==0)
3732{{{#!if br=true
3733}}}}}}}}}
3734{{{#!if !br
3735{{{#!if au=au.toString(), ab=ab.toString()
r252
3736}}}{{{#!if tn="", ps=(au.length==18), ps
3737{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3738}}}}}}{{{#!if !ps&&(au.length<17)
3739{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3740}}}}}}{{{#!if ab.length<18
3741{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3742}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3743}}}}}}}}}
3744##i=45
3745{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3746{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3747}}}{{{#!if ty=ty.toString(), ty.length==19
3748{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3749}}}}}}
3750{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3751{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3752}}}{{{#!if ty=ty.toString(), ty.length==19
3753{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3754}}}}}}{{{#!if ty=+ty
3755}}}}}}
3756{{{#!if ty>ab
3757{{{#!if tn-=1, ab+=+("1"+pd)
3758}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3759}}}}}}
3760{{{#!if !br
r249
3761{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3762{{{#!if ps=true, tm+="0"
r243
3763}}}}}}
3764{{{#!if !ps
3765{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3766}}}{{{#!if ty=ty.toString(), ty.length==19
3767{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3768}}}}}}
3769{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3770{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3771}}}{{{#!if ty=ty.toString(), ty.length==19
3772{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3773}}}}}}{{{#!if ty=+ty
3774}}}}}}
3775{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3776}}}{{{#!if ty>ab
3777{{{#!if au-=1, ab+=+("1"+pd)
3778}}}}}}{{{#!if au-=tx, ab-=ty
3779}}}
3780{{{#!if (au==0)&&(ab==0)
3781{{{#!if br=true
3782}}}}}}}}}
3783{{{#!if !br
3784{{{#!if au=au.toString(), ab=ab.toString()
r252
3785}}}{{{#!if tn="", ps=(au.length==18), ps
3786{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3787}}}}}}{{{#!if !ps&&(au.length<17)
3788{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3789}}}}}}{{{#!if ab.length<18
3790{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3791}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3792}}}}}}}}}
3793##i=46
3794{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3795{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3796}}}{{{#!if ty=ty.toString(), ty.length==19
3797{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3798}}}}}}
3799{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3800{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3801}}}{{{#!if ty=ty.toString(), ty.length==19
3802{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3803}}}}}}{{{#!if ty=+ty
3804}}}}}}
3805{{{#!if ty>ab
3806{{{#!if tn-=1, ab+=+("1"+pd)
3807}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3808}}}}}}
3809{{{#!if !br
r249
3810{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3811{{{#!if ps=true, tm+="0"
r243
3812}}}}}}
3813{{{#!if !ps
3814{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3815}}}{{{#!if ty=ty.toString(), ty.length==19
3816{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3817}}}}}}
3818{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3819{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3820}}}{{{#!if ty=ty.toString(), ty.length==19
3821{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3822}}}}}}{{{#!if ty=+ty
3823}}}}}}
3824{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3825}}}{{{#!if ty>ab
3826{{{#!if au-=1, ab+=+("1"+pd)
3827}}}}}}{{{#!if au-=tx, ab-=ty
3828}}}
3829{{{#!if (au==0)&&(ab==0)
3830{{{#!if br=true
3831}}}}}}}}}
3832{{{#!if !br
3833{{{#!if au=au.toString(), ab=ab.toString()
r252
3834}}}{{{#!if tn="", ps=(au.length==18), ps
3835{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3836}}}}}}{{{#!if !ps&&(au.length<17)
3837{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3838}}}}}}{{{#!if ab.length<18
3839{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3840}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3841}}}}}}}}}
3842##i=47
3843{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3844{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3845}}}{{{#!if ty=ty.toString(), ty.length==19
3846{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3847}}}}}}
3848{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3849{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3850}}}{{{#!if ty=ty.toString(), ty.length==19
3851{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3852}}}}}}{{{#!if ty=+ty
3853}}}}}}
3854{{{#!if ty>ab
3855{{{#!if tn-=1, ab+=+("1"+pd)
3856}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3857}}}}}}
3858{{{#!if !br
r249
3859{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3860{{{#!if ps=true, tm+="0"
r243
3861}}}}}}
3862{{{#!if !ps
3863{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3864}}}{{{#!if ty=ty.toString(), ty.length==19
3865{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3866}}}}}}
3867{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3868{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3869}}}{{{#!if ty=ty.toString(), ty.length==19
3870{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3871}}}}}}{{{#!if ty=+ty
3872}}}}}}
3873{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3874}}}{{{#!if ty>ab
3875{{{#!if au-=1, ab+=+("1"+pd)
3876}}}}}}{{{#!if au-=tx, ab-=ty
3877}}}
3878{{{#!if (au==0)&&(ab==0)
3879{{{#!if br=true
3880}}}}}}}}}
3881{{{#!if !br
3882{{{#!if au=au.toString(), ab=ab.toString()
r252
3883}}}{{{#!if tn="", ps=(au.length==18), ps
3884{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3885}}}}}}{{{#!if !ps&&(au.length<17)
3886{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3887}}}}}}{{{#!if ab.length<18
3888{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3889}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3890}}}}}}}}}
3891##i=48
3892{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3893{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3894}}}{{{#!if ty=ty.toString(), ty.length==19
3895{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3896}}}}}}
3897{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3898{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3899}}}{{{#!if ty=ty.toString(), ty.length==19
3900{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3901}}}}}}{{{#!if ty=+ty
3902}}}}}}
3903{{{#!if ty>ab
3904{{{#!if tn-=1, ab+=+("1"+pd)
3905}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3906}}}}}}
3907{{{#!if !br
r249
3908{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3909{{{#!if ps=true, tm+="0"
r243
3910}}}}}}
3911{{{#!if !ps
3912{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3913}}}{{{#!if ty=ty.toString(), ty.length==19
3914{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3915}}}}}}
3916{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3917{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3918}}}{{{#!if ty=ty.toString(), ty.length==19
3919{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3920}}}}}}{{{#!if ty=+ty
3921}}}}}}
3922{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3923}}}{{{#!if ty>ab
3924{{{#!if au-=1, ab+=+("1"+pd)
3925}}}}}}{{{#!if au-=tx, ab-=ty
3926}}}
3927{{{#!if (au==0)&&(ab==0)
3928{{{#!if br=true
3929}}}}}}}}}
3930{{{#!if !br
3931{{{#!if au=au.toString(), ab=ab.toString()
r252
3932}}}{{{#!if tn="", ps=(au.length==18), ps
3933{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3934}}}}}}{{{#!if !ps&&(au.length<17)
3935{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3936}}}}}}{{{#!if ab.length<18
3937{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3938}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3939}}}}}}}}}
3940##i=49
3941{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3942{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3943}}}{{{#!if ty=ty.toString(), ty.length==19
3944{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3945}}}}}}
3946{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3947{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3948}}}{{{#!if ty=ty.toString(), ty.length==19
3949{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3950}}}}}}{{{#!if ty=+ty
3951}}}}}}
3952{{{#!if ty>ab
3953{{{#!if tn-=1, ab+=+("1"+pd)
3954}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3955}}}}}}
3956{{{#!if !br
r249
3957{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
3958{{{#!if ps=true, tm+="0"
r243
3959}}}}}}
3960{{{#!if !ps
3961{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3962}}}{{{#!if ty=ty.toString(), ty.length==19
3963{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3964}}}}}}
3965{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3966{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3967}}}{{{#!if ty=ty.toString(), ty.length==19
3968{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3969}}}}}}{{{#!if ty=+ty
3970}}}}}}
3971{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
3972}}}{{{#!if ty>ab
3973{{{#!if au-=1, ab+=+("1"+pd)
3974}}}}}}{{{#!if au-=tx, ab-=ty
3975}}}
3976{{{#!if (au==0)&&(ab==0)
3977{{{#!if br=true
3978}}}}}}}}}
3979{{{#!if !br
3980{{{#!if au=au.toString(), ab=ab.toString()
r252
3981}}}{{{#!if tn="", ps=(au.length==18), ps
3982{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3983}}}}}}{{{#!if !ps&&(au.length<17)
3984{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3985}}}}}}{{{#!if ab.length<18
3986{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3987}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
3988}}}}}}}}}
3989##i=50
3990{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3991{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3992}}}{{{#!if ty=ty.toString(), ty.length==19
3993{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3994}}}}}}
3995{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3996{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3997}}}{{{#!if ty=ty.toString(), ty.length==19
3998{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3999}}}}}}{{{#!if ty=+ty
4000}}}}}}
4001{{{#!if ty>ab
4002{{{#!if tn-=1, ab+=+("1"+pd)
4003}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4004}}}}}}
4005{{{#!if !br
r249
4006{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4007{{{#!if ps=true, tm+="0"
r243
4008}}}}}}
4009{{{#!if !ps
4010{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4011}}}{{{#!if ty=ty.toString(), ty.length==19
4012{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4013}}}}}}
4014{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4015{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4016}}}{{{#!if ty=ty.toString(), ty.length==19
4017{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4018}}}}}}{{{#!if ty=+ty
4019}}}}}}
4020{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4021}}}{{{#!if ty>ab
4022{{{#!if au-=1, ab+=+("1"+pd)
4023}}}}}}{{{#!if au-=tx, ab-=ty
4024}}}
4025{{{#!if (au==0)&&(ab==0)
4026{{{#!if br=true
4027}}}}}}}}}
4028{{{#!if !br
4029{{{#!if au=au.toString(), ab=ab.toString()
r252
4030}}}{{{#!if tn="", ps=(au.length==18), ps
4031{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4032}}}}}}{{{#!if !ps&&(au.length<17)
4033{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4034}}}}}}{{{#!if ab.length<18
4035{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4036}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4037}}}}}}}}}
4038##i=51
4039{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4040{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4041}}}{{{#!if ty=ty.toString(), ty.length==19
4042{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4043}}}}}}
4044{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4045{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4046}}}{{{#!if ty=ty.toString(), ty.length==19
4047{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4048}}}}}}{{{#!if ty=+ty
4049}}}}}}
4050{{{#!if ty>ab
4051{{{#!if tn-=1, ab+=+("1"+pd)
4052}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4053}}}}}}
4054{{{#!if !br
r249
4055{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4056{{{#!if ps=true, tm+="0"
r243
4057}}}}}}
4058{{{#!if !ps
4059{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4060}}}{{{#!if ty=ty.toString(), ty.length==19
4061{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4062}}}}}}
4063{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4064{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4065}}}{{{#!if ty=ty.toString(), ty.length==19
4066{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4067}}}}}}{{{#!if ty=+ty
4068}}}}}}
4069{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4070}}}{{{#!if ty>ab
4071{{{#!if au-=1, ab+=+("1"+pd)
4072}}}}}}{{{#!if au-=tx, ab-=ty
4073}}}
4074{{{#!if (au==0)&&(ab==0)
4075{{{#!if br=true
4076}}}}}}}}}
4077{{{#!if !br
4078{{{#!if au=au.toString(), ab=ab.toString()
r252
4079}}}{{{#!if tn="", ps=(au.length==18), ps
4080{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4081}}}}}}{{{#!if !ps&&(au.length<17)
4082{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4083}}}}}}{{{#!if ab.length<18
4084{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4085}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4086}}}}}}}}}
4087##i=52
4088{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4089{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4090}}}{{{#!if ty=ty.toString(), ty.length==19
4091{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4092}}}}}}
4093{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4094{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4095}}}{{{#!if ty=ty.toString(), ty.length==19
4096{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4097}}}}}}{{{#!if ty=+ty
4098}}}}}}
4099{{{#!if ty>ab
4100{{{#!if tn-=1, ab+=+("1"+pd)
4101}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4102}}}}}}
4103{{{#!if !br
r249
4104{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4105{{{#!if ps=true, tm+="0"
r243
4106}}}}}}
4107{{{#!if !ps
4108{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4109}}}{{{#!if ty=ty.toString(), ty.length==19
4110{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4111}}}}}}
4112{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4113{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4114}}}{{{#!if ty=ty.toString(), ty.length==19
4115{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4116}}}}}}{{{#!if ty=+ty
4117}}}}}}
4118{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4119}}}{{{#!if ty>ab
4120{{{#!if au-=1, ab+=+("1"+pd)
4121}}}}}}{{{#!if au-=tx, ab-=ty
4122}}}
4123{{{#!if (au==0)&&(ab==0)
4124{{{#!if br=true
4125}}}}}}}}}
4126{{{#!if !br
4127{{{#!if au=au.toString(), ab=ab.toString()
r252
4128}}}{{{#!if tn="", ps=(au.length==18), ps
4129{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4130}}}}}}{{{#!if !ps&&(au.length<17)
4131{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4132}}}}}}{{{#!if ab.length<18
4133{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4134}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4135}}}}}}}}}
4136##i=53
4137{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4138{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4139}}}{{{#!if ty=ty.toString(), ty.length==19
4140{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4141}}}}}}
4142{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4143{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4144}}}{{{#!if ty=ty.toString(), ty.length==19
4145{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4146}}}}}}{{{#!if ty=+ty
4147}}}}}}
4148{{{#!if ty>ab
4149{{{#!if tn-=1, ab+=+("1"+pd)
4150}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4151}}}}}}
4152{{{#!if !br
r249
4153{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4154{{{#!if ps=true, tm+="0"
r243
4155}}}}}}
4156{{{#!if !ps
4157{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4158}}}{{{#!if ty=ty.toString(), ty.length==19
4159{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4160}}}}}}
4161{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4162{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4163}}}{{{#!if ty=ty.toString(), ty.length==19
4164{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4165}}}}}}{{{#!if ty=+ty
4166}}}}}}
4167{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4168}}}{{{#!if ty>ab
4169{{{#!if au-=1, ab+=+("1"+pd)
4170}}}}}}{{{#!if au-=tx, ab-=ty
4171}}}
4172{{{#!if (au==0)&&(ab==0)
4173{{{#!if br=true
4174}}}}}}}}}
4175{{{#!if !br
4176{{{#!if au=au.toString(), ab=ab.toString()
r252
4177}}}{{{#!if tn="", ps=(au.length==18), ps
4178{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4179}}}}}}{{{#!if !ps&&(au.length<17)
4180{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4181}}}}}}{{{#!if ab.length<18
4182{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4183}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4184}}}}}}}}}
4185##i=54
4186{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4187{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4188}}}{{{#!if ty=ty.toString(), ty.length==19
4189{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4190}}}}}}
4191{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4192{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4193}}}{{{#!if ty=ty.toString(), ty.length==19
4194{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4195}}}}}}{{{#!if ty=+ty
4196}}}}}}
4197{{{#!if ty>ab
4198{{{#!if tn-=1, ab+=+("1"+pd)
4199}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4200}}}}}}
4201{{{#!if !br
r249
4202{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4203{{{#!if ps=true, tm+="0"
r243
4204}}}}}}
4205{{{#!if !ps
4206{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4207}}}{{{#!if ty=ty.toString(), ty.length==19
4208{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4209}}}}}}
4210{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4211{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4212}}}{{{#!if ty=ty.toString(), ty.length==19
4213{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4214}}}}}}{{{#!if ty=+ty
4215}}}}}}
4216{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4217}}}{{{#!if ty>ab
4218{{{#!if au-=1, ab+=+("1"+pd)
4219}}}}}}{{{#!if au-=tx, ab-=ty
4220}}}
4221{{{#!if (au==0)&&(ab==0)
4222{{{#!if br=true
4223}}}}}}}}}
4224{{{#!if !br
4225{{{#!if au=au.toString(), ab=ab.toString()
r252
4226}}}{{{#!if tn="", ps=(au.length==18), ps
4227{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4228}}}}}}{{{#!if !ps&&(au.length<17)
4229{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4230}}}}}}{{{#!if ab.length<18
4231{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4232}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4233}}}}}}}}}
4234##i=55
4235{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4236{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4237}}}{{{#!if ty=ty.toString(), ty.length==19
4238{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4239}}}}}}
4240{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4241{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4242}}}{{{#!if ty=ty.toString(), ty.length==19
4243{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4244}}}}}}{{{#!if ty=+ty
4245}}}}}}
4246{{{#!if ty>ab
4247{{{#!if tn-=1, ab+=+("1"+pd)
4248}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4249}}}}}}
4250{{{#!if !br
r249
4251{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4252{{{#!if ps=true, tm+="0"
r243
4253}}}}}}
4254{{{#!if !ps
4255{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4256}}}{{{#!if ty=ty.toString(), ty.length==19
4257{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4258}}}}}}
4259{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4260{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4261}}}{{{#!if ty=ty.toString(), ty.length==19
4262{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4263}}}}}}{{{#!if ty=+ty
4264}}}}}}
4265{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4266}}}{{{#!if ty>ab
4267{{{#!if au-=1, ab+=+("1"+pd)
4268}}}}}}{{{#!if au-=tx, ab-=ty
4269}}}
4270{{{#!if (au==0)&&(ab==0)
4271{{{#!if br=true
4272}}}}}}}}}
4273{{{#!if !br
4274{{{#!if au=au.toString(), ab=ab.toString()
r252
4275}}}{{{#!if tn="", ps=(au.length==18), ps
4276{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4277}}}}}}{{{#!if !ps&&(au.length<17)
4278{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4279}}}}}}{{{#!if ab.length<18
4280{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4281}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4282}}}}}}}}}
4283##i=56
4284{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4285{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4286}}}{{{#!if ty=ty.toString(), ty.length==19
4287{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4288}}}}}}
4289{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4290{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4291}}}{{{#!if ty=ty.toString(), ty.length==19
4292{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4293}}}}}}{{{#!if ty=+ty
4294}}}}}}
4295{{{#!if ty>ab
4296{{{#!if tn-=1, ab+=+("1"+pd)
4297}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4298}}}}}}
4299{{{#!if !br
r249
4300{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4301{{{#!if ps=true, tm+="0"
r243
4302}}}}}}
4303{{{#!if !ps
4304{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4305}}}{{{#!if ty=ty.toString(), ty.length==19
4306{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4307}}}}}}
4308{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4309{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4310}}}{{{#!if ty=ty.toString(), ty.length==19
4311{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4312}}}}}}{{{#!if ty=+ty
4313}}}}}}
4314{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4315}}}{{{#!if ty>ab
4316{{{#!if au-=1, ab+=+("1"+pd)
4317}}}}}}{{{#!if au-=tx, ab-=ty
4318}}}
4319{{{#!if (au==0)&&(ab==0)
4320{{{#!if br=true
4321}}}}}}}}}
4322{{{#!if !br
4323{{{#!if au=au.toString(), ab=ab.toString()
r252
4324}}}{{{#!if tn="", ps=(au.length==18), ps
4325{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4326}}}}}}{{{#!if !ps&&(au.length<17)
4327{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4328}}}}}}{{{#!if ab.length<18
4329{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4330}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4331}}}}}}}}}
4332##i=57
4333{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4334{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4335}}}{{{#!if ty=ty.toString(), ty.length==19
4336{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4337}}}}}}
4338{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4339{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4340}}}{{{#!if ty=ty.toString(), ty.length==19
4341{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4342}}}}}}{{{#!if ty=+ty
4343}}}}}}
4344{{{#!if ty>ab
4345{{{#!if tn-=1, ab+=+("1"+pd)
4346}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4347}}}}}}
4348{{{#!if !br
r249
4349{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4350{{{#!if ps=true, tm+="0"
r243
4351}}}}}}
4352{{{#!if !ps
4353{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4354}}}{{{#!if ty=ty.toString(), ty.length==19
4355{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4356}}}}}}
4357{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4358{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4359}}}{{{#!if ty=ty.toString(), ty.length==19
4360{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4361}}}}}}{{{#!if ty=+ty
4362}}}}}}
4363{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4364}}}{{{#!if ty>ab
4365{{{#!if au-=1, ab+=+("1"+pd)
4366}}}}}}{{{#!if au-=tx, ab-=ty
4367}}}
4368{{{#!if (au==0)&&(ab==0)
4369{{{#!if br=true
4370}}}}}}}}}
4371{{{#!if !br
4372{{{#!if au=au.toString(), ab=ab.toString()
r252
4373}}}{{{#!if tn="", ps=(au.length==18), ps
4374{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4375}}}}}}{{{#!if !ps&&(au.length<17)
4376{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4377}}}}}}{{{#!if ab.length<18
4378{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4379}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4380}}}}}}}}}
4381##i=58
4382{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4383{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4384}}}{{{#!if ty=ty.toString(), ty.length==19
4385{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4386}}}}}}
4387{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4388{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4389}}}{{{#!if ty=ty.toString(), ty.length==19
4390{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4391}}}}}}{{{#!if ty=+ty
4392}}}}}}
4393{{{#!if ty>ab
4394{{{#!if tn-=1, ab+=+("1"+pd)
4395}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4396}}}}}}
4397{{{#!if !br
r249
4398{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4399{{{#!if ps=true, tm+="0"
r243
4400}}}}}}
4401{{{#!if !ps
4402{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4403}}}{{{#!if ty=ty.toString(), ty.length==19
4404{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4405}}}}}}
4406{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4407{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4408}}}{{{#!if ty=ty.toString(), ty.length==19
4409{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4410}}}}}}{{{#!if ty=+ty
4411}}}}}}
4412{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4413}}}{{{#!if ty>ab
4414{{{#!if au-=1, ab+=+("1"+pd)
4415}}}}}}{{{#!if au-=tx, ab-=ty
4416}}}
4417{{{#!if (au==0)&&(ab==0)
4418{{{#!if br=true
4419}}}}}}}}}
4420{{{#!if !br
4421{{{#!if au=au.toString(), ab=ab.toString()
r252
4422}}}{{{#!if tn="", ps=(au.length==18), ps
4423{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4424}}}}}}{{{#!if !ps&&(au.length<17)
4425{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4426}}}}}}{{{#!if ab.length<18
4427{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4428}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4429}}}}}}}}}
4430##i=59
4431{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4432{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4433}}}{{{#!if ty=ty.toString(), ty.length==19
4434{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4435}}}}}}
4436{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4437{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4438}}}{{{#!if ty=ty.toString(), ty.length==19
4439{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4440}}}}}}{{{#!if ty=+ty
4441}}}}}}
4442{{{#!if ty>ab
4443{{{#!if tn-=1, ab+=+("1"+pd)
4444}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4445}}}}}}
4446{{{#!if !br
r249
4447{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4448{{{#!if ps=true, tm+="0"
r243
4449}}}}}}
4450{{{#!if !ps
4451{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4452}}}{{{#!if ty=ty.toString(), ty.length==19
4453{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4454}}}}}}
4455{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4456{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4457}}}{{{#!if ty=ty.toString(), ty.length==19
4458{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4459}}}}}}{{{#!if ty=+ty
4460}}}}}}
4461{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4462}}}{{{#!if ty>ab
4463{{{#!if au-=1, ab+=+("1"+pd)
4464}}}}}}{{{#!if au-=tx, ab-=ty
4465}}}
4466{{{#!if (au==0)&&(ab==0)
4467{{{#!if br=true
4468}}}}}}}}}
4469{{{#!if !br
4470{{{#!if au=au.toString(), ab=ab.toString()
r252
4471}}}{{{#!if tn="", ps=(au.length==18), ps
4472{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4473}}}}}}{{{#!if !ps&&(au.length<17)
4474{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4475}}}}}}{{{#!if ab.length<18
4476{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4477}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4478}}}}}}}}}
4479##i=60
4480{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4481{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4482}}}{{{#!if ty=ty.toString(), ty.length==19
4483{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4484}}}}}}
4485{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4486{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4487}}}{{{#!if ty=ty.toString(), ty.length==19
4488{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4489}}}}}}{{{#!if ty=+ty
4490}}}}}}
4491{{{#!if ty>ab
4492{{{#!if tn-=1, ab+=+("1"+pd)
4493}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4494}}}}}}
4495{{{#!if !br
r249
4496{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4497{{{#!if ps=true, tm+="0"
r243
4498}}}}}}
4499{{{#!if !ps
4500{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4501}}}{{{#!if ty=ty.toString(), ty.length==19
4502{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4503}}}}}}
4504{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4505{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4506}}}{{{#!if ty=ty.toString(), ty.length==19
4507{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4508}}}}}}{{{#!if ty=+ty
4509}}}}}}
4510{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4511}}}{{{#!if ty>ab
4512{{{#!if au-=1, ab+=+("1"+pd)
4513}}}}}}{{{#!if au-=tx, ab-=ty
4514}}}
4515{{{#!if (au==0)&&(ab==0)
4516{{{#!if br=true
4517}}}}}}}}}
4518{{{#!if !br
4519{{{#!if au=au.toString(), ab=ab.toString()
r252
4520}}}{{{#!if tn="", ps=(au.length==18), ps
4521{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4522}}}}}}{{{#!if !ps&&(au.length<17)
4523{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4524}}}}}}{{{#!if ab.length<18
4525{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4526}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4527}}}}}}}}}
4528##i=61
4529{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4530{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4531}}}{{{#!if ty=ty.toString(), ty.length==19
4532{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4533}}}}}}
4534{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4535{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4536}}}{{{#!if ty=ty.toString(), ty.length==19
4537{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4538}}}}}}{{{#!if ty=+ty
4539}}}}}}
4540{{{#!if ty>ab
4541{{{#!if tn-=1, ab+=+("1"+pd)
4542}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4543}}}}}}
4544{{{#!if !br
r249
4545{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4546{{{#!if ps=true, tm+="0"
r243
4547}}}}}}
4548{{{#!if !ps
4549{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4550}}}{{{#!if ty=ty.toString(), ty.length==19
4551{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4552}}}}}}
4553{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4554{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4555}}}{{{#!if ty=ty.toString(), ty.length==19
4556{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4557}}}}}}{{{#!if ty=+ty
4558}}}}}}
4559{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4560}}}{{{#!if ty>ab
4561{{{#!if au-=1, ab+=+("1"+pd)
4562}}}}}}{{{#!if au-=tx, ab-=ty
4563}}}
4564{{{#!if (au==0)&&(ab==0)
4565{{{#!if br=true
4566}}}}}}}}}
4567{{{#!if !br
4568{{{#!if au=au.toString(), ab=ab.toString()
r252
4569}}}{{{#!if tn="", ps=(au.length==18), ps
4570{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4571}}}}}}{{{#!if !ps&&(au.length<17)
4572{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4573}}}}}}{{{#!if ab.length<18
4574{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4575}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4576}}}}}}}}}
4577##i=62
4578{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4579{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4580}}}{{{#!if ty=ty.toString(), ty.length==19
4581{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4582}}}}}}
4583{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4584{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4585}}}{{{#!if ty=ty.toString(), ty.length==19
4586{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4587}}}}}}{{{#!if ty=+ty
4588}}}}}}
4589{{{#!if ty>ab
4590{{{#!if tn-=1, ab+=+("1"+pd)
4591}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4592}}}}}}
4593{{{#!if !br
r249
4594{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4595{{{#!if ps=true, tm+="0"
r243
4596}}}}}}
4597{{{#!if !ps
4598{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4599}}}{{{#!if ty=ty.toString(), ty.length==19
4600{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4601}}}}}}
4602{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4603{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4604}}}{{{#!if ty=ty.toString(), ty.length==19
4605{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4606}}}}}}{{{#!if ty=+ty
4607}}}}}}
4608{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4609}}}{{{#!if ty>ab
4610{{{#!if au-=1, ab+=+("1"+pd)
4611}}}}}}{{{#!if au-=tx, ab-=ty
4612}}}
4613{{{#!if (au==0)&&(ab==0)
4614{{{#!if br=true
4615}}}}}}}}}
4616{{{#!if !br
4617{{{#!if au=au.toString(), ab=ab.toString()
r252
4618}}}{{{#!if tn="", ps=(au.length==18), ps
4619{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4620}}}}}}{{{#!if !ps&&(au.length<17)
4621{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4622}}}}}}{{{#!if ab.length<18
4623{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4624}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4625}}}}}}}}}
4626##i=63
4627{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4628{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4629}}}{{{#!if ty=ty.toString(), ty.length==19
4630{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4631}}}}}}
4632{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4633{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4634}}}{{{#!if ty=ty.toString(), ty.length==19
4635{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4636}}}}}}{{{#!if ty=+ty
4637}}}}}}
4638{{{#!if ty>ab
4639{{{#!if tn-=1, ab+=+("1"+pd)
4640}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4641}}}}}}
4642{{{#!if !br
r249
4643{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4644{{{#!if ps=true, tm+="0"
r243
4645}}}}}}
4646{{{#!if !ps
4647{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4648}}}{{{#!if ty=ty.toString(), ty.length==19
4649{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4650}}}}}}
4651{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4652{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4653}}}{{{#!if ty=ty.toString(), ty.length==19
4654{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4655}}}}}}{{{#!if ty=+ty
4656}}}}}}
4657{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4658}}}{{{#!if ty>ab
4659{{{#!if au-=1, ab+=+("1"+pd)
4660}}}}}}{{{#!if au-=tx, ab-=ty
4661}}}
4662{{{#!if (au==0)&&(ab==0)
4663{{{#!if br=true
4664}}}}}}}}}
4665{{{#!if !br
4666{{{#!if au=au.toString(), ab=ab.toString()
r252
4667}}}{{{#!if tn="", ps=(au.length==18), ps
4668{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4669}}}}}}{{{#!if !ps&&(au.length<17)
4670{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4671}}}}}}{{{#!if ab.length<18
4672{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4673}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4674}}}}}}}}}
4675##i=64
4676{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4677{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4678}}}{{{#!if ty=ty.toString(), ty.length==19
4679{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4680}}}}}}
4681{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4682{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4683}}}{{{#!if ty=ty.toString(), ty.length==19
4684{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4685}}}}}}{{{#!if ty=+ty
4686}}}}}}
4687{{{#!if ty>ab
4688{{{#!if tn-=1, ab+=+("1"+pd)
4689}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4690}}}}}}
4691{{{#!if !br
r249
4692{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4693{{{#!if ps=true, tm+="0"
r243
4694}}}}}}
4695{{{#!if !ps
4696{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4697}}}{{{#!if ty=ty.toString(), ty.length==19
4698{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4699}}}}}}
4700{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4701{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4702}}}{{{#!if ty=ty.toString(), ty.length==19
4703{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4704}}}}}}{{{#!if ty=+ty
4705}}}}}}
4706{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4707}}}{{{#!if ty>ab
4708{{{#!if au-=1, ab+=+("1"+pd)
4709}}}}}}{{{#!if au-=tx, ab-=ty
4710}}}
4711{{{#!if (au==0)&&(ab==0)
4712{{{#!if br=true
4713}}}}}}}}}
4714{{{#!if !br
4715{{{#!if au=au.toString(), ab=ab.toString()
r252
4716}}}{{{#!if tn="", ps=(au.length==18), ps
4717{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4718}}}}}}{{{#!if !ps&&(au.length<17)
4719{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4720}}}}}}{{{#!if ab.length<18
4721{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4722}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4723}}}}}}}}}
4724##i=65
4725{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4726{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4727}}}{{{#!if ty=ty.toString(), ty.length==19
4728{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4729}}}}}}
4730{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4731{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4732}}}{{{#!if ty=ty.toString(), ty.length==19
4733{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4734}}}}}}{{{#!if ty=+ty
4735}}}}}}
4736{{{#!if ty>ab
4737{{{#!if tn-=1, ab+=+("1"+pd)
4738}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4739}}}}}}
4740{{{#!if !br
r249
4741{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4742{{{#!if ps=true, tm+="0"
r243
4743}}}}}}
4744{{{#!if !ps
4745{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4746}}}{{{#!if ty=ty.toString(), ty.length==19
4747{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4748}}}}}}
4749{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4750{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4751}}}{{{#!if ty=ty.toString(), ty.length==19
4752{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4753}}}}}}{{{#!if ty=+ty
4754}}}}}}
4755{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4756}}}{{{#!if ty>ab
4757{{{#!if au-=1, ab+=+("1"+pd)
4758}}}}}}{{{#!if au-=tx, ab-=ty
4759}}}
4760{{{#!if (au==0)&&(ab==0)
4761{{{#!if br=true
4762}}}}}}}}}
4763{{{#!if !br
4764{{{#!if au=au.toString(), ab=ab.toString()
r252
4765}}}{{{#!if tn="", ps=(au.length==18), ps
4766{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4767}}}}}}{{{#!if !ps&&(au.length<17)
4768{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4769}}}}}}{{{#!if ab.length<18
4770{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4771}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4772}}}}}}}}}
4773##i=66
4774{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4775{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4776}}}{{{#!if ty=ty.toString(), ty.length==19
4777{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4778}}}}}}
4779{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4780{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4781}}}{{{#!if ty=ty.toString(), ty.length==19
4782{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4783}}}}}}{{{#!if ty=+ty
4784}}}}}}
4785{{{#!if ty>ab
4786{{{#!if tn-=1, ab+=+("1"+pd)
4787}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4788}}}}}}
4789{{{#!if !br
r249
4790{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4791{{{#!if ps=true, tm+="0"
r243
4792}}}}}}
4793{{{#!if !ps
4794{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4795}}}{{{#!if ty=ty.toString(), ty.length==19
4796{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4797}}}}}}
4798{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4799{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4800}}}{{{#!if ty=ty.toString(), ty.length==19
4801{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4802}}}}}}{{{#!if ty=+ty
4803}}}}}}
4804{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4805}}}{{{#!if ty>ab
4806{{{#!if au-=1, ab+=+("1"+pd)
4807}}}}}}{{{#!if au-=tx, ab-=ty
4808}}}
4809{{{#!if (au==0)&&(ab==0)
4810{{{#!if br=true
4811}}}}}}}}}
4812{{{#!if !br
4813{{{#!if au=au.toString(), ab=ab.toString()
r252
4814}}}{{{#!if tn="", ps=(au.length==18), ps
4815{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4816}}}}}}{{{#!if !ps&&(au.length<17)
4817{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4818}}}}}}{{{#!if ab.length<18
4819{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4820}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4821}}}}}}}}}
4822##i=67
4823{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4824{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4825}}}{{{#!if ty=ty.toString(), ty.length==19
4826{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4827}}}}}}
4828{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4829{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4830}}}{{{#!if ty=ty.toString(), ty.length==19
4831{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4832}}}}}}{{{#!if ty=+ty
4833}}}}}}
4834{{{#!if ty>ab
4835{{{#!if tn-=1, ab+=+("1"+pd)
4836}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4837}}}}}}
4838{{{#!if !br
r249
4839{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4840{{{#!if ps=true, tm+="0"
r243
4841}}}}}}
4842{{{#!if !ps
4843{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4844}}}{{{#!if ty=ty.toString(), ty.length==19
4845{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4846}}}}}}
4847{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4848{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4849}}}{{{#!if ty=ty.toString(), ty.length==19
4850{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4851}}}}}}{{{#!if ty=+ty
4852}}}}}}
4853{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4854}}}{{{#!if ty>ab
4855{{{#!if au-=1, ab+=+("1"+pd)
4856}}}}}}{{{#!if au-=tx, ab-=ty
4857}}}
4858{{{#!if (au==0)&&(ab==0)
4859{{{#!if br=true
4860}}}}}}}}}
4861{{{#!if !br
4862{{{#!if au=au.toString(), ab=ab.toString()
r252
4863}}}{{{#!if tn="", ps=(au.length==18), ps
4864{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4865}}}}}}{{{#!if !ps&&(au.length<17)
4866{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4867}}}}}}{{{#!if ab.length<18
4868{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4869}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4870}}}}}}}}}
4871##i=68
4872{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4873{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4874}}}{{{#!if ty=ty.toString(), ty.length==19
4875{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4876}}}}}}
4877{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4878{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4879}}}{{{#!if ty=ty.toString(), ty.length==19
4880{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4881}}}}}}{{{#!if ty=+ty
4882}}}}}}
4883{{{#!if ty>ab
4884{{{#!if tn-=1, ab+=+("1"+pd)
4885}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4886}}}}}}
4887{{{#!if !br
r249
4888{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4889{{{#!if ps=true, tm+="0"
r243
4890}}}}}}
4891{{{#!if !ps
4892{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4893}}}{{{#!if ty=ty.toString(), ty.length==19
4894{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4895}}}}}}
4896{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4897{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4898}}}{{{#!if ty=ty.toString(), ty.length==19
4899{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4900}}}}}}{{{#!if ty=+ty
4901}}}}}}
4902{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4903}}}{{{#!if ty>ab
4904{{{#!if au-=1, ab+=+("1"+pd)
4905}}}}}}{{{#!if au-=tx, ab-=ty
4906}}}
4907{{{#!if (au==0)&&(ab==0)
4908{{{#!if br=true
4909}}}}}}}}}
4910{{{#!if !br
4911{{{#!if au=au.toString(), ab=ab.toString()
r252
4912}}}{{{#!if tn="", ps=(au.length==18), ps
4913{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4914}}}}}}{{{#!if !ps&&(au.length<17)
4915{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4916}}}}}}{{{#!if ab.length<18
4917{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4918}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4919}}}}}}}}}
4920##i=69
4921{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4922{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4923}}}{{{#!if ty=ty.toString(), ty.length==19
4924{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4925}}}}}}
4926{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4927{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4928}}}{{{#!if ty=ty.toString(), ty.length==19
4929{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4930}}}}}}{{{#!if ty=+ty
4931}}}}}}
4932{{{#!if ty>ab
4933{{{#!if tn-=1, ab+=+("1"+pd)
4934}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4935}}}}}}
4936{{{#!if !br
r249
4937{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4938{{{#!if ps=true, tm+="0"
r243
4939}}}}}}
4940{{{#!if !ps
4941{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4942}}}{{{#!if ty=ty.toString(), ty.length==19
4943{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4944}}}}}}
4945{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4946{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4947}}}{{{#!if ty=ty.toString(), ty.length==19
4948{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4949}}}}}}{{{#!if ty=+ty
4950}}}}}}
4951{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
4952}}}{{{#!if ty>ab
4953{{{#!if au-=1, ab+=+("1"+pd)
4954}}}}}}{{{#!if au-=tx, ab-=ty
4955}}}
4956{{{#!if (au==0)&&(ab==0)
4957{{{#!if br=true
4958}}}}}}}}}
4959{{{#!if !br
4960{{{#!if au=au.toString(), ab=ab.toString()
r252
4961}}}{{{#!if tn="", ps=(au.length==18), ps
4962{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4963}}}}}}{{{#!if !ps&&(au.length<17)
4964{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4965}}}}}}{{{#!if ab.length<18
4966{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4967}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
4968}}}}}}}}}
4969##i=70
4970{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4971{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4972}}}{{{#!if ty=ty.toString(), ty.length==19
4973{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4974}}}}}}
4975{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4976{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4977}}}{{{#!if ty=ty.toString(), ty.length==19
4978{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4979}}}}}}{{{#!if ty=+ty
4980}}}}}}
4981{{{#!if ty>ab
4982{{{#!if tn-=1, ab+=+("1"+pd)
4983}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4984}}}}}}
4985{{{#!if !br
r249
4986{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
4987{{{#!if ps=true, tm+="0"
r243
4988}}}}}}
4989{{{#!if !ps
4990{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4991}}}{{{#!if ty=ty.toString(), ty.length==19
4992{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4993}}}}}}
4994{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4995{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4996}}}{{{#!if ty=ty.toString(), ty.length==19
4997{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4998}}}}}}{{{#!if ty=+ty
4999}}}}}}
5000{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
5001}}}{{{#!if ty>ab
5002{{{#!if au-=1, ab+=+("1"+pd)
5003}}}}}}{{{#!if au-=tx, ab-=ty
5004}}}
5005{{{#!if (au==0)&&(ab==0)
5006{{{#!if br=true
5007}}}}}}}}}
5008{{{#!if !br
5009{{{#!if au=au.toString(), ab=ab.toString()
r252
5010}}}{{{#!if tn="", ps=(au.length==18), ps
5011{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
5012}}}}}}{{{#!if !ps&&(au.length<17)
5013{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
5014}}}}}}{{{#!if ab.length<18
5015{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
5016}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
5017}}}}}}}}}
5018##i=71
5019{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
5020{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
5021}}}{{{#!if ty=ty.toString(), ty.length==19
5022{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5023}}}}}}
5024{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
5025{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
5026}}}{{{#!if ty=ty.toString(), ty.length==19
5027{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5028}}}}}}{{{#!if ty=+ty
5029}}}}}}
5030{{{#!if ty>ab
5031{{{#!if tn-=1, ab+=+("1"+pd)
5032}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
5033}}}}}}
5034{{{#!if !br
r249
5035{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
5036{{{#!if ps=true, tm+="0"
r243
5037}}}}}}
5038{{{#!if !ps
5039{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
5040}}}{{{#!if ty=ty.toString(), ty.length==19
5041{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5042}}}}}}
5043{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
5044{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
5045}}}{{{#!if ty=ty.toString(), ty.length==19
5046{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5047}}}}}}{{{#!if ty=+ty
5048}}}}}}
5049{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
5050}}}{{{#!if ty>ab
5051{{{#!if au-=1, ab+=+("1"+pd)
5052}}}}}}{{{#!if au-=tx, ab-=ty
5053}}}
5054{{{#!if (au==0)&&(ab==0)
5055{{{#!if br=true
r247
5056}}}}}}}}}}}}
r246
5057tn을 빈 문자열로, ts를 false로 초기화합니다. 마지막 72회까지 몫을 구하는 계산을 했음에도 불구하고 나머지가 나누어떨어져 0이 되지 않는다면 tn을 "..."로, ts를 true로 바꿉니다.
r245
5058{{{#!if tn="", ts=false, !br
5059{{{#!if tn="...", ts=true
r247
5060}}}}}}
r229
5061
r196
5062##rs 매기기
r248
5063앞에 매겼던 ac와 bc로 판별식을 만듭니다. i=ac-bc로 둡니다. a의 가장 큰 자리와 b의 가장 큰 자리가 얼마나 차이나는가에 따라 몫에 매기는 소수점 위치가 달라집니다. i>=-35 (ac==-18이고 bc==17일 경우), i<=35 (ac==17이고 bc=-18일 경우)입니다.
r196
5064
r248
5065i가 18 이상 (18 이상 35 이하)이면 rs를 매길 수 있습니다. 몫을 적어놓은 문자열 tm의 0번 index에 들어가는 문자부터 i에서 18을 뺀 값의 index에 들어가는 문자까지를 rs로 두며, rs의 문자열 길이는 i-18+1 곧 i-17입니다.
5066{{{#!if i=ac-bc, i>=18
5067tm에서 rs를 오려낸 문자열을 tm으로 다시 둡니다.
5068{{{#!if rs=tm.substr(0,i-17), tm=tm.substr(i-17)
5069}}}
5070rs에 순 0만을 매겼을 가능성이 있으므로 rs를 정수로 바꿉니다.
5071{{{#!if rs=+rs
5072}}}}}}
r196
5073##ru 매기기
r248
5074i>=18 이 되(어 rs를 매기)는 경우 i에 18을 뺍니다.
5075{{{#!if i>=18
5076{{{#!if i-=18
5077}}}}}}
5078i가 0 이상 (0 이상 17 이하)이면 ru를 매길 수 있으며 문자열의 길이는 i+1이 됩니다.
5079{{{#!if i>=0
5080{{{#!if ru=tm.substr(0,i+1), tm=tm.substr(i+1), ru=+ru
5081}}}}}}
r196
5082
5083##rb 매기기
r248
5084i>=0일 경우 i에 18을 뺍니다. i가 -18 이상 (-18 이상 -1 이하)이면 rb를 매길 수 있으며 문자열의 길이는 i+18+1 곧 i+19가 됩니다.
5085{{{#!if i>=0
5086{{{#!if i-=18
5087}}}}}}{{{#!if i>=-18
5088{{{#!if rb=tm.substr(0,i+19), tm=tm.substr(i+19), rb=+rb
5089}}}}}}
r196
5090
5091##ri 매기기
r248
5092{{{#!if i>=-18
5093{{{#!if i-=18
5094}}}}}}{{{#!if i>=-36
5095{{{#!if ri=tm.substr(0,i+37), tm=tm.substr(i+37), ri=+ri
5096}}}}}}
r231
5097
r248
5098
5099
r231
5100여기까지가 나눗셈의 계산과정입니다.
r194
5101}}}
5102
r231
5103연산이 끝났으면 표기된 숫자를 정리합니다.
5104
r187
5105##ru 정리 부분
r164
5106먼저 ru를 문자열로 변환합니다. 18자리씩 끊어 표기하므로 소수점 위 19~36번째 자리에 해당하는 rs값이 (곱한 값을 더했는데도) 0일 경우 rs를 빈 문자열로 바꿉니다. 곱셈과정에서 ru의 윗자리인 rs값이 0보다 클 경우, 1~18번째 자리인 ru에 빈 자리를 채우도록 ru의 왼쪽을 0으로 채웁니다.
5107{{{#!if ru=ru.toString()
r171
5108}}}{{{#!if rs==0
r164
5109{{{#!if rs=""
r171
5110}}}}}}{{{#!if (f=="*")&&(rs>0)
r228
5111{{{#!if rs=rs.toString(), ru=pd+ru, ru=ru.substr(ru.length-18, 18)
r171
5112}}}}}}
r156
5113
r187
5114#rb 정리 부분
r164
5115소수점 아래 마지막 문자의 번호는 (문자열 길이 - 1)입니다. 극단적으로 .10000 00000 00000 000 같은 것이 나올 수 있겠지만 18회 조사합니다.
5116substr(0,0)으로 하면 ""이 됩니다.
5117
r187
5118곱셈연산이면서 ri가 빈 문자열이 아닐 경우 true를 주는 논리값으로 ps를 정의합니다.
5119{{{#!if ps=((f=="*")&&(ri>0))
5120}}}
5121소수점 아래 19~36번째 자리에 해당하는 ri값이 0일 경우 ri를 빈 문자열로 바꿉니다.
r179
5122이 때 ri와 rb가 모두 0일 경우 rb도 빈 문자열로 바꾸고 rp=0으로 둡니다.
5123{{{#!if ri==0
r164
5124{{{#!if ri=""
r179
5125}}}{{{#!if rb==0
5126{{{#!if rb="", rp=0
5127}}}}}}}}}
5128
r188
5129곱셈 과정에서 ri가 0보다 클 경우 rb를 문자열로 변환하고 rb, ri의 왼쪽을 0으로 채웁니다.
r187
5130{{{#!if ps
r228
5131{{{#!if rb=rb.toString(), ri=ri.toString(), rb=pd+rb, rb=rb.substr(rb.length-18, 18), ri=pd+ri, ri=ri.substr(ri.length-18, 18)
r171
5132}}}}}}
r164
5133
r188
5134ri가 비었고 rb가 0이 아닌 경우 rb를 문자열로 바꾼 다음 왼쪽을 0으로 채웁니다.
5135{{{#!if !ps&&(rb>0)
r228
5136{{{#!if rb=rb.toString(), rb=pd+rb, rb=rb.substr(rb.length-18, 18)
r179
5137}}}}}}
5138
r189
5139ps가 true이면 rp를 ri의 길이로, 그렇지 않고 rb만 0이 아닌경우 rp를 rb의 길이로 정의합니다.
r187
5140{{{#!if ps
r189
5141{{{#!if this.rp=ri.length
r187
5142}}}}}}{{{#!if !ps&&(rb!="")
r189
5143{{{#!if this.rp=rb.length
r160
5144}}}}}}
5145
r167
5146곱셈연산이면서 ri가 빈 문자열이 아닐 경우 ri의 오른쪽부터 붙은 "0"들을 모두 지웁니다, 그렇지 않을 경우 rb의 오른쪽에 붙은 "0"들을 모두 지웁니다,
5147{{{#!if ps
r223
5148{{{#!if (rp>9)&&(ri.substr(rp-9,9)=="000000000")
r167
5149{{{#!if this.ri=ri.substr(0,rp-9), rp=rp-9
5150}}}}}}
r223
5151{{{#!if (rp>4)&&(ri.substr(rp-4,4)=="0000")
r167
5152{{{#!if this.ri=ri.substr(0,rp-4), rp=rp-4
5153}}}}}}
r223
5154{{{#!if (rp>2)&&(ri.substr(rp-2,2)=="00")
r167
5155{{{#!if this.ri=ri.substr(0,rp-2), rp=rp-2
5156}}}}}}
r223
5157{{{#!if (rp>2)&&(ri.substr(rp-2,2)=="00")
r167
5158{{{#!if this.ri=ri.substr(0,rp-2), rp=rp-2
5159}}}}}}
r223
5160{{{#!if (rp>1)&&(ri.substr(rp-1,1)=="0")
r167
5161{{{#!if this.ri=ri.substr(0,rp-1), rp=rp-1
r187
5162}}}}}}}}}
r62
5163
r168
5164{{{#!if !ps
r223
5165{{{#!if (rp>9)&&(rb.substr(rp-9,9)=="000000000")
r168
5166{{{#!if this.rb=rb.substr(0,rp-9), rp=rp-9
r164
5167}}}}}}
r223
5168{{{#!if (rp>4)&&(rb.substr(rp-4,4)=="0000")
r168
5169{{{#!if this.rb=rb.substr(0,rp-4), rp=rp-4
r164
5170}}}}}}
r223
5171{{{#!if (rp>2)&&(rb.substr(rp-2,2)=="00")
r168
5172{{{#!if this.rb=rb.substr(0,rp-2), rp=rp-2
r164
5173}}}}}}
r223
5174{{{#!if (rp>2)&&(rb.substr(rp-2,2)=="00")
r168
5175{{{#!if this.rb=rb.substr(0,rp-2), rp=rp-2
r164
5176}}}}}}
r223
5177{{{#!if (rp>1)&&(rb.substr(rp-1,1)=="0")
r167
5178{{{#!if this.rb=rb.substr(0,rp-1), rp=rp-1
5179}}}}}}}}}
r188
5180
r189
518119~36번째 자리까지 계산한 경우 rp에 18을 더합니다.
5182{{{#!if ps
5183{{{#!if rp=rp+18
5184}}}}}}
r188
5185
r164
5186rb 정리를 이것으로 종료합니다.
5187
r216
5188##== 오류 코드 ==
5189error
51901 : 오버플로
51915 : 이중 소수점 표기
51926 : 소수점 윗부분 오류
51937 : 소수점 아랫부분 오류
5194
5195warning
51961 : 소수점 아래 입력한 자릿수가 너무 많음.
5197
5198##== 아래 출력 변수 설명 ==
r84
5199'''sa''' : searching a; '''sb''' : searching b; '''sf''' : searching f;
r111
5200'''rl''' : result string length to output; '''p''' : a point of string(s);
r85
5201ru는 계산결과에서 소수점 위 자리이므로, dot(.)이 나오지 않습니다.
r62
5202##여기까지 주석(주석 아님)
r224
5203}}}{{{#!wiki style="font-weight: 300; font-size: 20px;"
r83
5204{{{#!if this.sa=(this.a!="")&&(this.a!=null), this.sb=(this.b!="")&&(this.b!=null), this.sf=(this.f=='+')||(this.f=='-')||(this.f=='*')||(this.f=='/')
5205}}}{{{#!if !sa&&!sb&&!sf
r84
5206변수를 입력하세요...
r95
5207}}}{{{#!if !(sa&&sb&&sf)
5208({{{#!if !sa
r83
5209a{{{#!if !sb||!sf
5210, }}}}}}{{{#!if !sb
5211b{{{#!if !sf
5212, }}}}}}{{{#!if !sf
r95
5213f}}}를 입력하세요...)}}}{{{#!if sa&&sb&&sf
r112
5214{{{#!if (ea==0)&&(eb==0)
r77
5215{{{#!if as[0]!=45
r48
5216@a@}}}{{{#!if as[0]==45
r110
5217(@a@)}}} {{{#!if as.length>=20
r108
5218[br]}}}{{{#!if f=='+'
r62
5219+}}}{{{#!if f=="-"
5220-}}}{{{#!if f=="*"
5221*}}}{{{#!if f=="/"
r108
5222/}}} {{{#!if bs[0]!=45
r48
5223@b@}}}{{{#!if bs[0]==45
r110
5224(@b@)}}} {{{#!if (bs.length>=20)||(as.length+bs.length>=30)
r119
5225[br]}}}= {{{#!if rs!=""
r168
5226}}}{{{#!if (f=="*")||(f=="/")
5227@ns@{{{#!if rs!=""
r174
5228@rs@}}}}}}@ru@{{{#!if +rp>0
r98
5229##rb string, decimal point marking
r132
5230.@rb@{{{#!if ri!=""
r225
5231@ri@}}}}}}}}}}}}{{{#!if ((wa>0)||(wb>0))&&(ea==0)&&(eb==0)
r115
5232[br]{{{#!wiki style="display: inline; text-shadow: 1px 1px 2px gray; "
r226
5233'''{{{#yellow [경고] }}}'''}}}변수 {{{#!if wa==1
r115
5234a{{{#!if wb==1
5235와 }}}}}}{{{#!if wb==1
r227
5236b}}}의 소수점 아래에 입력한 문구가 너무 많습니다. 소수점 아래 19번째 자리부터 입력된 문구는 무시됩니다.
r170
5237}}}{{{#!if (ea>0)||(eb>0)
r112
5238{{{#!if (ea==1)||(eb==1)
r192
5239'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==1
r112
5240a{{{#!if eb==1
5241와 }}}}}}{{{#!if eb==1
r219
5242b}}}에 너무 많은 값을 입력했습니다. {{{#gray (오버플로)}}}[br]}}}{{{#!if eb==3
5243'''{{{#orangered [오류]}}}''' 0으로 나눌 수 없습니다.[br]}}}{{{#!if (ea==5)||(eb==5)
r216
5244'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==5
5245a{{{#!if eb==5
5246와 }}}}}}{{{#!if eb==5
r219
5247b}}}에 소수점이 2개 이상 입력되어 있습니다. {{{#gray (입력 오류)}}}[br]}}}{{{#!if (ea==6)||(eb==6)
r216
5248'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==6
5249a의 소수점 윗자리{{{#!if eb==6
5250와 }}}}}}{{{#!if eb==6
r219
5251b의 소수점 윗자리}}}에 올바르지 않은 문구가 입력되어 있습니다. {{{#gray (입력 오류)}}}[br]}}}{{{#!if (ea==7)||(eb==7)
r216
5252'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==7
5253a의 소수점 아랫자리{{{#!if eb==7
5254와 }}}}}}{{{#!if eb==7
r219
5255b의 소수점 아랫자리}}}에 올바르지 않은 문구가 입력되어 있습니다. {{{#gray (입력 오류)}}}[br]}}}}}}}}}