본문으로 건너뛰기

계산기2(r334판 Blame)

r334
r297
1[[분류:냥]][[분류:계산용 틀]][Include(틀:상세 내용, 설명대상=원본, 문서명=틀\:구 계산기2)][Include(틀:상세 내용, 설명대상=떼어낸 계산기, 문서명=틀\:계산기/구버전)]{{{#!wiki style="display: none;"
r129
2##디버그용 if 문법 ("문자열" 값으로 정의해야 합니다.)
r330
3{{{#!if a= ,b= ,f=, md=
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 하더라도 이를 무시합니다.
r308
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.ms="", 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차 초기화 ==
r303
131유효성 검사가 종료되었으면 ts와 br를 false로 초기화합니다 유효성 검사에 쓰인 tm과 tn 값을 빈 문자열 값으로 초기화합니다.
132{{{#!if tm="", tn="", ts=false, br=false
r286
133}}}
134
r209
135입력한 소수점 아래에 입력한 값을 정리합니다. 이에 따라 ap, bp값도 다시 조정됩니다.
r223
136{{{#!if (ap>9)&&(ab.substr(ap-9,9)=="000000000")
r221
137{{{#!if ab=ab.substr(0,ap-9), ap=ap-9
r209
138}}}}}}
r223
139{{{#!if (ap>4)&&(ab.substr(ap-4,4)=="0000")
r209
140{{{#!if ab=ab.substr(0,ap-4), ap=ap-4
141}}}}}}
r223
142{{{#!if (ap>2)&&(ab.substr(ap-2,2)=="00")
r209
143{{{#!if ab=ab.substr(0,ap-2), ap=ap-2
144}}}}}}
r223
145{{{#!if (ap>2)&&(ab.substr(ap-2,2)=="00")
r209
146{{{#!if ab=ab.substr(0,ap-2), ap=ap-2
147}}}}}}
r223
148{{{#!if (ap>1)&&(ab.substr(ap-1,1)=="0")
r209
149{{{#!if ab=ab.substr(0,ap-1), ap=ap-1
150}}}}}}
r223
151{{{#!if (bp>9)&&(bb.substr(bp-9,9)=="000000000")
r221
152{{{#!if bb=bb.substr(0,bp-9), bp=bp-9
r209
153}}}}}}
r223
154{{{#!if (bp>4)&&(bb.substr(bp-4,4)=="0000")
r209
155{{{#!if bb=bb.substr(0,bp-4), bp=bp-4
156}}}}}}
r223
157{{{#!if (bp>2)&&(bb.substr(bp-2,2)=="00")
r209
158{{{#!if bb=bb.substr(0,bp-2), bp=bp-2
159}}}}}}
r223
160{{{#!if (bp>2)&&(bb.substr(bp-2,2)=="00")
r209
161{{{#!if bb=bb.substr(0,bp-2), bp=bp-2
162}}}}}}
r223
163{{{#!if (bp>1)&&(bb.substr(bp-1,1)=="0")
r209
164{{{#!if bb=bb.substr(0,bp-1), bp=bp-1
165}}}}}}
r207
166
r303
167그 다음 --앞자리에 0만 여러 개 적어놓고 장난치는 사람이 있을까봐-- au를 값으로 바꾼 다음 다시 문자열로 변환하여 앞자리에 있는 0들을 모두 삭제합니다. bu도 그렇게 둡니다.
168{{{#!if au=+au, au=au.toString(), bu=+bu, bu=bu.toString()
r231
169}}}
170
r305
171이 상태의 au를 ma로 저장하고 ab가 빈 문자열이 아니라면 ab도 ma에 저장합니다. 같은 방법으로 bu, bb을 mb에 저장합니다.
172{{{#!if ma=au, (ad!=-1)&&(ab!="")
r319
173a가 소수점 윗부분이 0이 되는 음수인 경우 "-0"으로 저장된 문자열은 정수값으로 바꿀 때 0이 되므로 ma앞에 -를 붙입니다.
174{{{#!if ma+="."+ab, (+au==0)&&(as[0]==45)
175{{{#!if ma="-"+ma
176}}}}}}}}}
r305
177{{{#!if mb=bu, (bd!=-1)&&(bb!="")
r319
178{{{#!if mb+="."+bb, (+bu==0)&&(bs[0]==45)
179{{{#!if mb="-"+mb
180}}}}}}}}}
r303
181
r207
182##== 덧셈, 뺄셈 ==
r66
183덧셈과 뺄셈 계산과정을 적어봅니다.
184{{{#!if (f=="+")||(f=="-")
r76
185
186a과 b의 소수점 윗부분은 정수이므로 쉽게 계산할 수 있습니다.
187{{{#!if f=="+"
188{{{#!if ru=(+au)+(+bu)
189}}}}}}
190{{{#!if f=="-"
191{{{#!if ru=(+au)-(+bu)
192}}}}}}
193
r125
194a와 b 모두가 정수이면 ap==0, bp==0이 되며, 이런 경우에는 소수점 아래 자릿수를 검산할 필요가 없습니다. a와 b 중 소수점 아래 자릿수가 있는 수가 있을 때에만 소수점 윗자리의 계산값이 얼마가 나오느냐를 보면서 소수점 아래의 자릿수를 정리하는 과정이 의미가 있습니다.
r76
195{{{#!if (ap>0)||(bp>0)
r142
196만약 소수점 아래를 계산한다면 자릿수를 똑같이 맞춰야 의미가 있으므로, 자릿수가 다른 경우 자릿수가 같게 만드는 과정을 먼저 거칩니다. 이를테면 a의 소수점 자릿수가 b의 소수점 자릿수보다 많으면 b뒤에 0을 더 추가하는 방식으로 변경합니다. b 자체가 정수여도 앞에 (소수점이 없을 경우) 이미 bb="", bp=0+0으로 초기화했으므로 동작될 것입니다.
197소수점 아래 최대 18자리까지의 수를 취급하므로 최대 18칸 차이가 나게 됩니다.
198○○○○○○○○○□□□□○○□□○ 과 같이 9칸, 4칸, 2칸, 2칸, 1칸씩 차이가 나면 그 정도를 보정하게 됩니다.
199ap>bp에서 ap-bp>0이 됩니다. ap-bp는 곧 ap가 bp보다 몇 칸만큼 더 많은지를 나타냅니다.
r161
200{{{#!if ap>bp
r228
201{{{#!if bp=ap, bb+=pd
r161
202}}}{{{#!if bb=bb.substr(0,ap)
r66
203}}}}}}
r67
204
205반대로 b의 소수점 자릿수가 많은 경우도 있습니다.
r161
206{{{#!if bp>ap
r228
207{{{#!if ap=bp, ab=ab+pd
r161
208}}}{{{#!if ab=ab.substr(0,bp)
r67
209}}}}}}
r161
210
r71
211위의 과정을 거치게 되면 소수점 아래 최대 자릿수를 똑같이 맞춘 상태에서 계산하게 되므로 ap==bp가 됩니다.
r66
212
r71
213a가 음수인 경우 소수점 아래 값은 순 숫자만 표기된 상태이므로 양수 취급으로 되지 않게 소수점 아래 값인 ab에 음수 표기를 남깁니다.
r68
214{{{#!if as[0]==45
215{{{#!if ab="-"+ab
216}}}}}}
r123
217마찬가지로 b가 음수인 경우 b의 소수점 아래 값은 음수이므로 소수점 아래 값인 bb에 음수 표기를 남깁니다. 10을 소수점 아래 자릿수만큼 제곱한 값으로 저장합니다.
r68
218{{{#!if bs[0]==45
219{{{#!if bb="-"+bb
220}}}}}}
221
r76
222이때 rb를 계산합니다.
r65
223{{{#!if f=="+"
r76
224{{{#!if rb=(+ab)+(+bb)
r65
225}}}}}}
226{{{#!if f=="-"
r76
227{{{#!if rb=(+ab)-(+bb)
r65
228}}}}}}
r75
229
r69
230소수점 아래끼리 더한 자릿수가 얼마나 되는지 보기 위해 rb를 문자열로 바꿉니다.
r86
231이 때 rb가 0이 아닐 경우에만 문자열로 변환합니다.
232{{{#!if (+rb>0)||(+rb<0)
r69
233{{{#!if this.rb=rb.toString()
234}}}
r71
235문자열로 된 rb의 길이를 rp로 정의합니다.
r69
236{{{#!if this.rp=rb.length
237}}}
r86
238}}}
r94
239
r73
240rb가 음수이면 rb의 첫번째(0번 index)의 문자열에는 마이너스(-)가 들어갑니다. 이 때는 rp를 rb의 마이너스 문자열을 세지 않은 자릿수가 되도록 앞에서 정의했던 rb.length에서 1만큼 줄여 정의합니다. ap, bp는 마이너스를 붙이기 전에 값이 고정되어 있으므로 rp처럼 줄일 필요가 없습니다.
r69
241{{{#!if rb[0]==45
r70
242{{{#!if rp=rp-1
r69
243}}}}}}
r57
244
r94
245ru값이 어떤지 보고 각 경우 rb값이 어떠한가에 따라 rb만 정리하거나 rb와 ru 모두 정리합니다.
r149
246중복 처리를 막기 위해 초기화된 ps 변수 하나를 가져옵니다.
r111
247
248소수점 아래 값의 부호와 소수점 위의 값의 부호가 서로 다른 경우 계산을 하기 위해 값을 하나 정의합니다.
249
r235
250{{{#!if tv=+(("1"+pd).substr(0,ap+1))
r162
251}}}
r111
252
r75
253Case 1 : ru가 0보다 큰 경우
r71
254ru는 정수이므로 ru가 0보다 크면 곧 ru는 1 이상의 정수이며, 1 이상이면 a+b 또는 a-b가 양수+음수 꼴이 되더라도 소수점 아래 정리를 하면 됩니다. rb를 정리하는 과정에서 ru에서 1을 빌려오거나 ru에 1이 더해질 수도 있습니다. 앞에서 rb를 string으로 바꿨으므로 +rb를 다룹니다.
r65
255{{{#!if ru>0
r75
256Case 1-1 : rb가 0 이상인 경우
r232
257{{{#!if (+rb>=0)&&!ps
r73
258rb가 소수점 아래 자릿수를 초과하여 소수점 위의 수를 계산하게 생겼다면 ap=bp인 상황에서 rp>ap가 됩니다. rb는 첫 숫자가 1인 정수가 되므로 첫 숫자인 1을 삭제한 문자열로 정의합니다.
r71
259{{{#!if rp>ap
260{{{#!if ru=ru+1, rb=rb.substr(1, rp-1)
r69
261}}}}}}
r73
262rb가 소수점 아래 자릿수를 초과하지 않을 경우 rb를 다시 정의할 필요 없이 그대로 둡니다.
r71
263{{{#!if rp<=ap
r72
264}}}
r104
265{{{#!if ps=true
r73
266}}}
r104
267}}}
r73
268
r94
269Case 1-2 : rb가 음수인 경우 ru에서 1을 빌려옵니다. 1보다 작은 양수값에서 1보다 작은 양수값을 빼면 -1보다 작을 수 없으며, 소수점 아래 자릿수가 초과되지 않습니다.
r232
270{{{#!if (+rb<0)&&!ps
r73
271{{{#!if ru=ru-1
272}}}
r111
273소수점 아래 자릿수인 ap만큼 10을 제곱한 값(tv)을 rb에서 증가시켜 rb를 재정의합니다. 그러면 rb는 양수가 됩니다. 그리고 rb를 다시 문자열로 변환합니다.
274{{{#!if rb=tv+(+rb)
r73
275}}}{{{#!if rb=rb.toString()
276}}}
r104
277{{{#!if ps=true
278}}}}}}
r73
279정리과정을 끝냈으면 ru를 string으로 변환합니다.
280{{{#!if this.ru=ru.toString()
r71
281}}}}}}
282
r75
283Case 2 : ru가 0인 경우 ru가 0이 되면 rb의 값이 양수인지 음수인지에 따라 달라집니다.
r65
284{{{#!if ru==0
r75
285Case 2-1 : rb가 0 이상인 경우
r232
286{{{#!if (+rb>=0)&&!ps
r73
287rb가 양수이면서 rb가 자릿수를 초과한 경우 rb는 첫 숫자가 1인 정수가 되므로 첫 숫자인 1을 삭제한 문자열로 정의합니다.
288{{{#!if rp>ap
289{{{#!if ru=ru+1, rb=rb.substr(1, rp-1)
r104
290}}}}}}
r327
291ru를 string으로 변환합니다.
292{{{#!if ru=ru.toString()
293}}}
294{{{#!if ps=true
295}}}}}}
r75
296Case 2-2 : rb가 음수인 경우
r232
297{{{#!if (+rb<0)&&!ps
r75
298rb가 음수이면서 rb가 자릿수를 초과한 경우 값이 0인 ru에 1을 빼야 합니다. 그리고 rb가 "-"+숫자 꼴이므로 문자열의 1번 index에 해당하는 1을 지워야 합니다. 앞에서 rb가 음수인 경우 rp는 rb의 마이너스(-)가 차지하는 자릿수를 계산하지 않은 값 곧 숫자들이 차지하는 자릿수이므로, rb를 길이가 rp-1인 숫자들로 다시 정의합니다.
r73
299{{{#!if rp>ap
r75
300{{{#!if ru=ru-1, rb=rb.substr(2, rp-1)
301}}}}}}
302rb가 자릿수를 초과하지 않은 경우 rb에서 "-"를 뺀 문자열로 rb를 다시 정의합니다.
r101
303{{{#!if rp<=ap
r76
304{{{#!if rb=rb.substr(1, rp)
r104
305}}}}}}
r327
306ru를 string으로 변환합니다.
307{{{#!if ru=ru.toString()
308}}}
r325
309만일 -0.xxxx 같이 여전히 rb<0이고 ru==0인 상태라면 rb에 생겼던 마이너스 부호를 떼어내 왼쪽으로 붙입니다. ns를 "-"으로 바꿉니다.
r326
310{{{#!if +ru==0
r325
311{{{#!if ns="-"
r324
312}}}}}}
r327
313ru가 음수이면 ru앞에 음수 기호를 제거하고 ns에 "-"를 줍니다.
314{{{#!if +ru<0
315{{{#!if ru=ru.substr(1), ns="-"
316}}}}}}
r324
317{{{#!if ps=true
318}}}}}}
r65
319}}}
r74
320
r75
321Case 3 : ru가 0보다 작은 경우. 곧 -1 이하인 음수가 되는 경우.
r65
322{{{#!if ru<0
r76
323Case 3-1 : rb가 0 이하인 경우
r232
324{{{#!if (+rb<=0)&&!ps
r76
325rb가 음수이면서 자릿수를 초과한 경우 ru에 -1을 빼고, rb의 음수기호(-)와 첫번째 숫자인 문자열 "1"을 뺀 문자열로 rb를 다시 정의합니다.
326{{{#!if rp>ap
r80
327{{{#!if rb=rb.substr(2, rp-1)
r65
328}}}
r80
329}}}
r107
330rb가 자릿수를 초과하지 않은 경우 rp는 음수기호를 제외한 숫자 자릿수이므로 rb를 음수기호만을 뺀 문자열로 다시 정의합니다. 단, rb가 0이 되면 rp==1이 되므로 rb==0인 경우는 제외합니다.
r101
331{{{#!if (rp<=ap)&&(+rb<0)
r106
332{{{#!if rb=rb.substr(1, rp)
r104
333}}}}}}{{{#!if ps=true
334}}}}}}
r82
335Case 3-2 : rb가 0보다 큰 경우. 소수점 아래 부분을 보면 -1보다 큰 음수값에서 -1보다 큰 음수값을 빼면 1보다 클 수 없으며, 소수점 아래 자릿수가 초과되지 않습니다.
r232
336{{{#!if (+rb>0)&&!ps
r82
337ru<=-1이므로 ru+1를 해도 최대 0이 됩니다.
338{{{#!if ru=ru+1
r75
339}}}
r111
340rb>0에서 rb은 음수(계산결과)의 음수(마이너스값이 줄어듦)이므로 rb의 자릿수인 rp만큼 10을 제곱한 값(tv)에서 rb을 '''뺀''' 값으로 rb를 재정의합니다. 그러면 rb는 양수이지만 계산결과인 음수에 맞춘 값이 됩니다. 그리고 rb를 다시 문자열로 변환합니다. 변환합니다.
341{{{#!if rb=tv-(+rb)
r82
342}}}{{{#!if rb=rb.toString()
r104
343}}}{{{#!if ps=true
344}}}}}}
r76
345정리과정을 끝냈으면 ru를 string으로 변환합니다.
346{{{#!if this.ru=ru.toString()
347}}}
r325
348-0.xxxx 같이 (ru==0인데) 연산결과가 -1보다 큰 음수로 나오는 경우가 있으므로 ru 앞에 음수 기호를 제거하고 ns에 "-"를 줍니다.
r326
349{{{#!if +ru<0
r325
350{{{#!if ru=ru.substr(1), ns="-"
r326
351}}}}}}
352{{{#!if +ru==0
353{{{#!if ns="-"
354}}}}}}
r76
355}}}
356여기까지가 소수점 아래 자릿수 숫자들의 계산과정입니다.
357}}}
r71
358
r94
359a와 b 모두 정수인 경우 ap, bp는 모두 0이 되므로 ru만을 그대로 문자열로 바꾸면 되며 소수점 아래(rb)는 표기해야 할 필요가 없으므로 rb="", (소수점 아래 자릿수)rp=0을 반환합니다.
360{{{#!if (ap==0)&&(bp==0)
361{{{#!if this.ru=ru.toString(), rb="", rp=0+0
362}}}}}}
363
r95
364rb==0인 경우 rb="", rp=0을 반환합니다.
365{{{#!if +rb==0
366{{{#!if rb="", rp=0+0
367}}}}}}
368
r99
369이제 rb=""이 아닌 경우 소수점 아래 숫자 정리를 합니다.
370rp를 rb의 문자열 길이로 다시 정의합니다.
r97
371{{{#!if rb!=""
372{{{#!if this.rp=rb.length
r103
373}}}
r97
374
r99
375+"000100"을 숫자로 바꾸면 100이 되는 문제가 있습니다. 이처럼 소수점 아래 자릿수를 연산한 결과를 문자열로 바꿨을 때 기존 소수점 아래 자릿수보다 작은 길이가 나오면 앞쪽에 0을 보충합니다.
376앞에서 ap,bp를 똑같이 맞췄으므로 ap를 가져옵니다. 자릿수가 모자랄 경우 0을 하나씩 보충합니다.
377{{{#!if rp<ap
r228
378{{{#!if rb=pd.substr(0,ap-rp)+rb
r99
379}}}}}}
380
381앞에 0을 채웠다면 이제, 소수점 아래로 나오는 숫자를 보고 마지막에서부터 0이 나오면 한 자리씩 지우는 과정을 시작합니다.
382
r164
383여기까지가 덧셈 또는 뺄셈연산의 계산과정이며 과정은 이후 rb 정리 과정으로 넘어갑니다.
r166
384}}}}}}
r76
385
r259
386##== 곱셈 & 나눗셈 ==
387##=== 숫자 초기화 ===
r186
388{{{#!if (f=="*")||(f=="/")
389곱셈 및 나눗셈 연산과정을 봅니다.
r64
39018자리 숫자로 입력할 수 있는 최대 정수는 999,999,999,999,999,999입니다.
391다행히 999,999,999,999,999,999*9=8,999,999,999,999,999,991 < long 한계치 9,223,372,036,854,775,807 이라서 a*각 자릿수로 덧셈해볼 수는 있습니다.
r120
392
r303
393a 또는 b가 음수가 될 경우 as 또는 bs 문자열은 "-" 기호가 붙으므로, 이것을 이용한 조건문을 하나 만들어 a와 b 둘의 부호가 서로 다를 경우 (a만 음수이거나 b가 음수일 경우) 계산 결과에 부호를 표시할 수 있게 만듭니다.
r293
394{{{#!if (as[0]==45)^(bs[0]==45)
r159
395{{{#!if ns="-"
396}}}}}}
r126
397a 또는 b가 음수가 될 경우 소수점 윗부분 문자열인 au 또는 bu에서 마이너스(-)를 제거합니다.
398{{{#!if au[0]==45
399{{{#!if au=au.substr(1,ad-1)
400}}}}}}
401{{{#!if bu[0]==45
402{{{#!if bu=bu.substr(1,bd-1)
403}}}}}}
404
r259
405##=== 자릿수 측정 ===
406나누는 자릿수에 맞춰 결과를 표시하고자 ac, bc를 자릿수를 나타내는 값으로 정의합니다.
407먼저 au는 앞에 적어놓은 0을 제거한 문자열이므로 +au>0인 경우 ac를 au의 문자열 길이에서 1을 뺀 값으로 정의합니다.
408{{{#!if +au>0
409{{{#!if ac=au.length-1
410}}}}}}
r302
411(au, ab 둘다 0인 경우 앞에 처리하는 식이 있고, au, ab 둘 중 하나라도 0이 아닐 때) au가 0이라면 ab는 단순 정수값으로 옮겼을 때 0보다 큰 값이 나옵니다. 소수점 아래 처음으로 0이 아닌 수가 나오는 자릿수를 구한 다음 덧셈 연산에서 그 수의 역원이 되는 수를 ac로 정의합니다. 이를 구하고자 ab의 뒤에 0을 더 붙여 18자리 숫자로 만든 다음 정수로 바꾸어 구합니다.
r259
412{{{#!if +au==0
413{{{#!if ac=ab+pd, ac=ac.substr(0,18), ac=+ac, ac=ac.toString(), ac=ac.length-19
414}}}}}}
r207
415
r259
416bc도 a와 같은 방법으로 정의합니다.
417{{{#!if +bu>0
418{{{#!if bc=bu.length-1
419}}}}}}{{{#!if +bu==0
420{{{#!if bc=bb+pd, bc=bc.substr(0,18), bc=+bc, bc=bc.toString(), bc=bc.length-19
421}}}}}}
422
423##=== 0인자 처리 ===
r186
424a 또는 b값이 0이 되려면 au, ab 둘 다 0이 되거나 bu, bb 둘 다 0이 되어야 합니다. a 또는 b 값이 0일 경우 당연히 음수 부호가 표시되지 않습니다.
r174
425{{{#!if ((+au==0)&&(+ab==0))||((+bu==0)&&(+bb==0))
r190
426곱셈에서 0을 곱하면 0이 되므로, 곱셈의 경우 a 또는 b가 0이 될 때 계산 결과에 0을 반환합니다.
427{{{#!if f=="*"
r159
428{{{#!if rs="", ru="0", rb="", ri="", rp=0, ns=""
r133
429}}}}}}
r190
430나눗셈에서 나누는 수(b)가 0이 될 경우 오류를 반환하고 ps=true를 걸어 나눗셈 연산이 되지 않게 만듭니다.
431{{{#!if f=="/"
432{{{#!if ((+bu==0)&&(+bb==0))
433error code 03 번 : 0으로 나눌 수 없습니다.
434{{{#!if eb=03, ps=true
435}}}}}}
436나누는 수가 0이 아니면서 나눌 대상이 0이 될 경우 곱셈에서 0을 곱하는 것처럼 계산 결과에 0을 반환합니다.
437{{{#!if ((+au==0)&&(+ab==0))&&((+bu!=0)||(+bb!=0))
438{{{#!if rs="", ru="0", rb="", ri="", rp=0, ns=""
439}}}}}}
r224
440}}}}}}
r198
441곱셈과 나눗셈에서 a와 b 모두 0이 아닌 경우를 봅니다.
r133
442{{{#!if ((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
443
r264
444##=== 3차 초기화 ===
r203
445{{{#!if f=="*"
446곱셈계산에서 18자리씩 곱셈을 할 수 있도록 입력했던 a와 b의 문자열을 확장할 것입니다.
r198
447
r124
448a와 b 각각 소수점 윗자리와 소수점 아래자리의 문자열의 빈 공간을 0으로 채워 18자로 만듭니다.
449소수점 윗자리는 왼쪽에서 0을 채워나갑니다.
r228
450{{{#!if au = pd + au
r172
451+18자}}}{{{#!if au=au.substr(au.length-18,18)
r145
452}}}
r228
453{{{#!if bu = pd + bu
r172
454+18자}}}{{{#!if bu=bu.substr(bu.length-18,18)
r145
455}}}
r124
456
457소수점 아래자리는 오른쪽에서 0을 채웁니다. (ap, bp값은 보존됩니다.)
r228
458{{{#!if ab += pd
r145
459+18자}}}{{{#!if ab=ab.substr(0,18)
460}}}
r228
461{{{#!if bb += pd
r145
462+18자}}}{{{#!if bb=bb.substr(0,18)
r191
463}}}}}}
r203
464
465{{{#!if f=="/"
r204
466나눗셈은 소수점 위 18번째 자리부터 내려가면서 처음으로 0이 아닌 숫자가 있으면 그 숫자가 처음 숫자가 되도록 숫자를 왼쪽으로 밀어두려고 합니다. 그 다음 오른쪽을 0으로 채웁니다.
r267
467
468a에서 au가 0인 경우 18자리 au를 18자리 ab로 바꾸고 ab를 18자의 0(pd)으로 채웁니다.
469소수점 아래 자리를 매겼던 ab가 소수점 위인 au자리로 옮겨지게 되므로 정수로 바꾸었다 다시 문자열로 바꿈으로써 왼쪽에 불필요하게 붙어있는 0을 삭제합니다.
470{{{#!if +au==0
471{{{#!if au=ab, ab=pd, au=+au, au=au.toString()
472}}}}}}
473
r206
474au를 왼쪽으로 밀 경우 남게 되는 자릿수를 변수 tu로 둡니다. (후술할 아래 곱셈연산과 겹치지 않습니다.)
r228
475{{{#!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
476}}}
r267
477
478b도 a와 같은 방법으로 초기화합니다.
479{{{#!if +bu==0
480{{{#!if bu=bb, bb=pd, bu=+bu, bu=bu.toString()
481}}}}}}
r228
482{{{#!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
483}}}
r207
484
r203
485}}}
r204
486}}}
r190
487여기까지 곱셈 또는 나눗셈에서 숫자를 초기화하는 과정입니다.
r224
488}}}
r133
489
r264
490##=== 곱셈 ===
r190
491a와 b 모두 0이 아닌 경우에서 곱셈을 연산하는 과정입니다.
492{{{#!if (f=="*")&&((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
r149
493곱셈은 18자리를 끊어서 계산합니다. 소수점 아래 18자리의 아래인 제19~36번 자리를 ri로 둡니다. 소수점 위 19~36번째 자리는 rs로 두어 ri, rb, ru, rs 순으로 계산합니다.
r204
494소수점 위 18자리, 소수점 아래 18자리인 두 수를 곱하면 해당하는 자리별로 곱셈을 할 때 최대 (18+18)**2=1296회를 곱해야 합니다.
r135
495
r147
496앞으로 있을 계산은 다음과 같습니다.
r135
497 * ri를 더했더니 ri가 19자리 숫자로 넘치면 넘친 앞의 1자리를 rb로 넘깁니다.
r147
498 * rb가 19자리로 넘쳤다면 넘친 앞의 1자리를 ru로 넘깁니다.
499 * ru가 19자리로 넘친다면 넘친 앞의 1자리를 rs로 넘깁니다.
r135
500(rs는 상용로그로 보았을 때 log a<18, log b<18 에서 log (a*b) = log a + log b < 36이므로 19자리로 넘치지 않습니다.)
501문자열로 바꾸고 문자열을 쪼갠 다음 숫자로 바꾸는 과정입니다. 이를 if로 바꾸면 다음과 같습니다.
r149
502{{{#!if false
r135
503{{{#!if ri=ri.toString(), ri.length==19
r249
504{{{#!if rb=(+rb)+(+ri.substr(0,1)), ri=(+ri.substr(1,18))
r135
505}}}}}}
506{{{#!if rb=rb.toString(), rb.length==19
r249
507{{{#!if ru=(+ru)+(+rb.substr(0,1)), rb=(+rb.substr(1,18))
r135
508}}}}}}
509{{{#!if ru=ru.toString(), ru.length==19
r249
510{{{#!if rs=(+rs)+(+ru.substr(0,1)), ru=(+ru.substr(1,18))
r135
511}}}}}}
r149
512}}}
r151
513변수 tv, tw, i, ps를 가져옵니다. tw는 0, tv는 1, i는 0, ps는 false으로 초기화 된 채로 있습니다. 연산 과정 중간중간에 마지막 자릿수를 보정하고자 10씩 곱하게 됩니다. ri에서 최대 18자리에서 1자리 수를 곱하면 19자리가 될 수 있으므로 곱셈할 때마다 19자리로 넘칠때마다 넘치는 숫자는 rb로 넘깁니다.
r153
514ri부분을 합산합니다. ab*bb 의 절반을 처리합니다. (자릿수끼리 대입했을 때 처리되는 부분이 먼저 입력한 절반이 나중에 입력하는 절반보다 더 많지만, 편의상 절반이라고 적습니다.)
r149
515## for i=0 to 17
r151
516{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
517}}}{{{#!if tw=tw.toString(), tw.length==19
r150
518{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
519}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
520{{{#!if ri=ri+(+tw)
r150
521}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
522{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
523}}}}}}{{{#!if (ri.length<=18)&&!ps
r150
524{{{#!if ri=(+ri)
r222
525}}}}}}{{{#!if i+=1, tv*=10, ps=false
r149
526}}}
r151
527## i=1
528{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
529}}}{{{#!if tw=tw.toString(), tw.length==19
r151
530{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
531}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
532{{{#!if ri=ri+(+tw)
r151
533}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
534{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
535}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
536{{{#!if ri=(+ri)
r222
537}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
538}}}
539## i=2
540{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
541}}}{{{#!if tw=tw.toString(), tw.length==19
r151
542{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
543}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
544{{{#!if ri=ri+(+tw)
r151
545}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
546{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
547}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
548{{{#!if ri=(+ri)
r222
549}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
550}}}
551## i=3
552{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
553}}}{{{#!if tw=tw.toString(), tw.length==19
r151
554{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
555}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
556{{{#!if ri=ri+(+tw)
r151
557}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
558{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
559}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
560{{{#!if ri=(+ri)
r222
561}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
562}}}
563## i=4
564{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
565}}}{{{#!if tw=tw.toString(), tw.length==19
r151
566{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
567}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
568{{{#!if ri=ri+(+tw)
r151
569}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
570{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
571}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
572{{{#!if ri=(+ri)
r222
573}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
574}}}
575## i=5
576{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
577}}}{{{#!if tw=tw.toString(), tw.length==19
r151
578{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
579}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
580{{{#!if ri=ri+(+tw)
r151
581}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
582{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
583}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
584{{{#!if ri=(+ri)
r222
585}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
586}}}
587## i=6
588{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
589}}}{{{#!if tw=tw.toString(), tw.length==19
r151
590{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
591}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
592{{{#!if ri=ri+(+tw)
r151
593}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
594{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
595}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
596{{{#!if ri=(+ri)
r222
597}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
598}}}
599## i=7
600{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
601}}}{{{#!if tw=tw.toString(), tw.length==19
r151
602{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
603}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
604{{{#!if ri=ri+(+tw)
r151
605}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
606{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
607}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
608{{{#!if ri=(+ri)
r222
609}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
610}}}
611## i=8
612{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
613}}}{{{#!if tw=tw.toString(), tw.length==19
r151
614{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
615}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
616{{{#!if ri=ri+(+tw)
r151
617}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
618{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
619}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
620{{{#!if ri=(+ri)
r222
621}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
622}}}
623## i=9
624{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
625}}}{{{#!if tw=tw.toString(), tw.length==19
r151
626{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
627}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
628{{{#!if ri=ri+(+tw)
r151
629}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
630{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
631}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
632{{{#!if ri=(+ri)
r222
633}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
634}}}
635## i=10
636{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
637}}}{{{#!if tw=tw.toString(), tw.length==19
r151
638{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
639}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
640{{{#!if ri=ri+(+tw)
r151
641}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
642{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
643}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
644{{{#!if ri=(+ri)
r222
645}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
646}}}
647## i=11
648{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
649}}}{{{#!if tw=tw.toString(), tw.length==19
r151
650{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
651}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
652{{{#!if ri=ri+(+tw)
r151
653}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
654{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
655}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
656{{{#!if ri=(+ri)
r222
657}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
658}}}
659## i=12
660{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
661}}}{{{#!if tw=tw.toString(), tw.length==19
r151
662{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
663}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
664{{{#!if ri=ri+(+tw)
r151
665}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
666{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
667}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
668{{{#!if ri=(+ri)
r222
669}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
670}}}
671## i=13
672{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
673}}}{{{#!if tw=tw.toString(), tw.length==19
r151
674{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
675}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
676{{{#!if ri=ri+(+tw)
r151
677}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
678{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
679}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
680{{{#!if ri=(+ri)
r222
681}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
682}}}
683## i=14
684{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
685}}}{{{#!if tw=tw.toString(), tw.length==19
r151
686{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
687}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
688{{{#!if ri=ri+(+tw)
r151
689}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
690{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
691}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
692{{{#!if ri=(+ri)
r222
693}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
694}}}
695## i=15
696{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
697}}}{{{#!if tw=tw.toString(), tw.length==19
r151
698{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
699}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
700{{{#!if ri=ri+(+tw)
r151
701}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
702{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
703}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
704{{{#!if ri=(+ri)
r222
705}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
706}}}
707## i=16
708{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
709}}}{{{#!if tw=tw.toString(), tw.length==19
r151
710{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
711}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
712{{{#!if ri=ri+(+tw)
r151
713}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
714{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
715}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
716{{{#!if ri=(+ri)
r222
717}}}}}}{{{#!if i+=1, tv*=10, ps=false
r151
718}}}
719## i=17
720{{{#!if tw=(+ab.substr(i,18-i))*(+bb.substr(17-i,1))*tv
r181
721}}}{{{#!if tw=tw.toString(), tw.length==19
r151
722{{{#!if rb=rb+(+tw.substr(0,1)), ri=ri+(+tw.substr(1,18)), ps=true
r232
723}}}}}}{{{#!if (tw.length<=18)&&!ps
r156
724{{{#!if ri=ri+(+tw)
r151
725}}}}}}{{{#!if ps=false, ri=ri.toString(), ri.length==19
726{{{#!if rb=rb+(+ri.substr(0,1)), ri=(+ri.substr(1,18)), ps=true
r232
727}}}}}}{{{#!if (ri.length<=18)&&!ps
r151
728{{{#!if ri=(+ri)
729}}}}}}
r134
730
r151
731##rb
r184
732rb부분을 합산합니다. substr(-1,0)은 빈 문자열 값이 나옵니다. (ab*bb의 나머지 절반 + au*bb의 절반), ab*bu의 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다.
r151
733{{{#!if i=0+0, tv=1, ps=false
734}}}
735##for i=0 to 17
r185
736{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
737}}}{{{#!if tw=tw.toString(), tw.length==19
r152
738{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
739}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
740{{{#!if rb=rb+(+tw)
r152
741}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
742{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
743}}}}}}{{{#!if (rb.length<=18)&&!ps
r152
744{{{#!if rb=(+rb)
745}}}}}}
r176
746{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
747}}}{{{#!if tw=tw.toString(), tw.length==19
r152
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)
r152
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
r152
754{{{#!if rb=(+rb)
r222
755}}}}}}{{{#!if i+=1, tv*=10, ps=false
r152
756}}}
r153
757## i=1
r185
758{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
759}}}{{{#!if tw=tw.toString(), tw.length==19
r153
760{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
761}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
762{{{#!if rb=rb+(+tw)
r153
763}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
764{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
765}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
766{{{#!if rb=(+rb)
767}}}}}}
r176
768{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
777}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
778}}}
779## i=2
r185
780{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
781}}}{{{#!if tw=tw.toString(), tw.length==19
r153
782{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
783}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
784{{{#!if rb=rb+(+tw)
r153
785}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
786{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
787}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
788{{{#!if rb=(+rb)
789}}}}}}
r176
790{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
799}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
800}}}
801## i=3
r185
802{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
803}}}{{{#!if tw=tw.toString(), tw.length==19
r153
804{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
805}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
806{{{#!if rb=rb+(+tw)
r153
807}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
808{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
809}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
810{{{#!if rb=(+rb)
811}}}}}}
r176
812{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
821}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
822}}}
823## i=4
r185
824{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
825}}}{{{#!if tw=tw.toString(), tw.length==19
r153
826{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
827}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
828{{{#!if rb=rb+(+tw)
r153
829}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
830{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
831}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
832{{{#!if rb=(+rb)
833}}}}}}
r176
834{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
843}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
844}}}
845## i=5
r185
846{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
847}}}{{{#!if tw=tw.toString(), tw.length==19
r153
848{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
849}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
850{{{#!if rb=rb+(+tw)
r153
851}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
852{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
853}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
854{{{#!if rb=(+rb)
855}}}}}}
r176
856{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
865}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
866}}}
867## i=6
r185
868{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
869}}}{{{#!if tw=tw.toString(), tw.length==19
r153
870{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
871}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
872{{{#!if rb=rb+(+tw)
r153
873}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
874{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
875}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
876{{{#!if rb=(+rb)
877}}}}}}
r176
878{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
887}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
888}}}
889## i=7
r185
890{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
891}}}{{{#!if tw=tw.toString(), tw.length==19
r153
892{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
893}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
894{{{#!if rb=rb+(+tw)
r153
895}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
896{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
897}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
898{{{#!if rb=(+rb)
899}}}}}}
r176
900{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
909}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
910}}}
911## i=8
r185
912{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
913}}}{{{#!if tw=tw.toString(), tw.length==19
r153
914{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
915}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
916{{{#!if rb=rb+(+tw)
r153
917}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
918{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
919}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
920{{{#!if rb=(+rb)
921}}}}}}
r176
922{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
931}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
932}}}
933## i=9
r185
934{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
935}}}{{{#!if tw=tw.toString(), tw.length==19
r153
936{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
937}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
938{{{#!if rb=rb+(+tw)
r153
939}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
940{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
941}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
942{{{#!if rb=(+rb)
943}}}}}}
r176
944{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
953}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
954}}}
955## i=10
r185
956{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
957}}}{{{#!if tw=tw.toString(), tw.length==19
r153
958{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
959}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
960{{{#!if rb=rb+(+tw)
r153
961}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
962{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
963}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
964{{{#!if rb=(+rb)
965}}}}}}
r176
966{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
975}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
976}}}
977## i=11
r185
978{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
979}}}{{{#!if tw=tw.toString(), tw.length==19
r153
980{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
981}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
982{{{#!if rb=rb+(+tw)
r153
983}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
984{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
985}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
986{{{#!if rb=(+rb)
987}}}}}}
r176
988{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
997}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
998}}}
999## i=12
r185
1000{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1001}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1002{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1003}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1004{{{#!if rb=rb+(+tw)
r153
1005}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1006{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1007}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1008{{{#!if rb=(+rb)
1009}}}}}}
r176
1010{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
1019}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1020}}}
1021## i=13
r185
1022{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1023}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1024{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1025}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1026{{{#!if rb=rb+(+tw)
r153
1027}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1028{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1029}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1030{{{#!if rb=(+rb)
1031}}}}}}
r176
1032{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
1041}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1042}}}
1043## i=14
r185
1044{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1045}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1046{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1047}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1048{{{#!if rb=rb+(+tw)
r153
1049}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1050{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1051}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1052{{{#!if rb=(+rb)
1053}}}}}}
r176
1054{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
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)
r222
1063}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1064}}}
1065## i=15
r185
1066{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1067}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1068{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1069}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1070{{{#!if rb=rb+(+tw)
r153
1071}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1072{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1073}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1074{{{#!if rb=(+rb)
1075}}}}}}
r176
1076{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1077}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1078{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1079}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1080{{{#!if rb=rb+(+tw)
r153
1081}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1082{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1083}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1084{{{#!if rb=(+rb)
r222
1085}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1086}}}
1087## i=16
r185
1088{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1089}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1090{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1091}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1092{{{#!if rb=rb+(+tw)
r153
1093}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1094{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1095}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1096{{{#!if rb=(+rb)
1097}}}}}}
r176
1098{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1099}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1100{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1101}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1102{{{#!if rb=rb+(+tw)
r153
1103}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1104{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1105}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1106{{{#!if rb=(+rb)
r222
1107}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1108}}}
1109## i=17
r185
1110{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bb.substr(17-i,1))
r181
1111}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1112{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1113}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1114{{{#!if rb=rb+(+tw)
r153
1115}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1116{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1117}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1118{{{#!if rb=(+rb)
1119}}}}}}
r176
1120{{{#!if ps=false, tw=(+ab.substr(i,18-i))*(+bu.substr(17-i,1))*tv
r181
1121}}}{{{#!if tw=tw.toString(), tw.length==19
r153
1122{{{#!if ru=ru+(+tw.substr(0,1)), rb=rb+(+tw.substr(1,18)), ps=true
r232
1123}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1124{{{#!if rb=rb+(+tw)
r153
1125}}}}}}{{{#!if ps=false, rb=rb.toString(), rb.length==19
1126{{{#!if ru=ru+(+rb.substr(0,1)), rb=(+rb.substr(1,18)), ps=true
r232
1127}}}}}}{{{#!if (rb.length<=18)&&!ps
r153
1128{{{#!if rb=(+rb)
r222
1129}}}}}}{{{#!if i+=1, tv*=10, ps=false
r153
1130}}}
r134
1131
r153
1132##ru
r184
1133ru부분을 합산합니다. substr(-1,0)은 빈 문자열 값이 나옵니다. (ab*bu의 나머지 절반 + au*bu의 절반), au*bb의 나머지 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다.
r153
1134{{{#!if i=0+0, tv=1, ps=false
1135}}}
r155
1136##for i=0 to 17
r185
1137{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1138}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1139{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1140}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1141{{{#!if ru=ru+(+tw)
1142}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1143{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1144}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1145{{{#!if ru=(+ru)
1146}}}}}}
r184
1147{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1148}}}{{{#!if ru.length==19
r155
1149{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1150}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1151{{{#!if ru=(+ru)
r222
1152}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1153}}}
1154## i=1
r185
1155{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1156}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1157{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1158}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1159{{{#!if ru=ru+(+tw)
1160}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1161{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1162}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1163{{{#!if ru=(+ru)
1164}}}}}}
r184
1165{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1166}}}{{{#!if ru.length==19
r155
1167{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1168}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1169{{{#!if ru=(+ru)
r222
1170}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1171}}}
1172## i=2
r185
1173{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1174}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1175{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1176}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1177{{{#!if ru=ru+(+tw)
1178}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1179{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1180}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1181{{{#!if ru=(+ru)
1182}}}}}}
r184
1183{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1184}}}{{{#!if ru.length==19
r155
1185{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1186}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1187{{{#!if ru=(+ru)
r222
1188}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1189}}}
1190## i=3
r185
1191{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1192}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1193{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1194}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1195{{{#!if ru=ru+(+tw)
1196}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1197{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1198}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1199{{{#!if ru=(+ru)
1200}}}}}}
r184
1201{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1202}}}{{{#!if ru.length==19
r155
1203{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1204}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1205{{{#!if ru=(+ru)
r222
1206}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1207}}}
1208## i=4
r185
1209{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1210}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1211{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1212}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1213{{{#!if ru=ru+(+tw)
1214}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1215{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1216}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1217{{{#!if ru=(+ru)
1218}}}}}}
r184
1219{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1220}}}{{{#!if ru.length==19
r155
1221{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1222}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1223{{{#!if ru=(+ru)
r222
1224}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1225}}}
1226## i=5
r185
1227{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1228}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1229{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1230}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1231{{{#!if ru=ru+(+tw)
1232}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1233{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1234}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1235{{{#!if ru=(+ru)
1236}}}}}}
r184
1237{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1238}}}{{{#!if ru.length==19
r155
1239{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1240}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1241{{{#!if ru=(+ru)
r222
1242}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1243}}}
1244## i=6
r185
1245{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1246}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1247{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1248}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1249{{{#!if ru=ru+(+tw)
1250}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1251{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1252}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1253{{{#!if ru=(+ru)
1254}}}}}}
r184
1255{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1256}}}{{{#!if ru.length==19
r155
1257{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1258}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1259{{{#!if ru=(+ru)
r222
1260}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1261}}}
1262## i=7
r185
1263{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1264}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1265{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1266}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1267{{{#!if ru=ru+(+tw)
1268}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1269{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1270}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1271{{{#!if ru=(+ru)
1272}}}}}}
r184
1273{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1274}}}{{{#!if ru.length==19
r155
1275{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1276}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1277{{{#!if ru=(+ru)
r222
1278}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1279}}}
1280## i=8
r185
1281{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1282}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1283{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1284}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1285{{{#!if ru=ru+(+tw)
1286}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1287{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1288}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1289{{{#!if ru=(+ru)
1290}}}}}}
r184
1291{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1292}}}{{{#!if ru.length==19
r155
1293{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1294}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1295{{{#!if ru=(+ru)
r222
1296}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1297}}}
1298## i=9
r185
1299{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1300}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1301{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1302}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1303{{{#!if ru=ru+(+tw)
1304}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1305{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1306}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1307{{{#!if ru=(+ru)
1308}}}}}}
r184
1309{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1310}}}{{{#!if ru.length==19
r155
1311{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1312}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1313{{{#!if ru=(+ru)
r222
1314}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1315}}}
1316## i=10
r185
1317{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1318}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1319{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1320}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1321{{{#!if ru=ru+(+tw)
1322}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1323{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1324}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1325{{{#!if ru=(+ru)
1326}}}}}}
r184
1327{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1328}}}{{{#!if ru.length==19
r155
1329{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1330}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1331{{{#!if ru=(+ru)
r222
1332}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1333}}}
1334## i=11
r185
1335{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1336}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1337{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1338}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1339{{{#!if ru=ru+(+tw)
1340}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1341{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1342}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1343{{{#!if ru=(+ru)
1344}}}}}}
r184
1345{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1346}}}{{{#!if ru.length==19
r155
1347{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1348}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1349{{{#!if ru=(+ru)
r222
1350}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1351}}}
1352## i=12
r185
1353{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1354}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1355{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1356}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1357{{{#!if ru=ru+(+tw)
1358}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1359{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1360}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1361{{{#!if ru=(+ru)
1362}}}}}}
r184
1363{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1364}}}{{{#!if ru.length==19
r155
1365{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1366}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1367{{{#!if ru=(+ru)
r222
1368}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1369}}}
1370## i=13
r185
1371{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1372}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1373{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1374}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1375{{{#!if ru=ru+(+tw)
1376}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1377{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1378}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1379{{{#!if ru=(+ru)
1380}}}}}}
r184
1381{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1382}}}{{{#!if ru.length==19
r155
1383{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1384}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1385{{{#!if ru=(+ru)
r222
1386}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1387}}}
1388## i=14
r185
1389{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1390}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1391{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1392}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1393{{{#!if ru=ru+(+tw)
1394}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1395{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1396}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1397{{{#!if ru=(+ru)
1398}}}}}}
r184
1399{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1400}}}{{{#!if ru.length==19
r155
1401{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1402}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1403{{{#!if ru=(+ru)
r222
1404}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1405}}}
1406## i=15
r185
1407{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1408}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1409{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1410}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1411{{{#!if ru=ru+(+tw)
1412}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1413{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1414}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1415{{{#!if ru=(+ru)
1416}}}}}}
r184
1417{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1418}}}{{{#!if ru.length==19
r155
1419{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1420}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1421{{{#!if ru=(+ru)
r222
1422}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1423}}}
1424## i=16
r185
1425{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1426}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1427{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1428}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1429{{{#!if ru=ru+(+tw)
1430}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1431{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1432}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1433{{{#!if ru=(+ru)
1434}}}}}}
r184
1435{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1436}}}{{{#!if ru.length==19
r155
1437{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1438}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1439{{{#!if ru=(+ru)
r222
1440}}}}}}{{{#!if i+=1, tv*=10, ps=false
r155
1441}}}
1442## i=17
r185
1443{{{#!if ps=false, tw=+(au.substr(i,18-i)+ab.substr(0,i)), tw=tw*(+bu.substr(17-i,1))
r181
1444}}}{{{#!if tw=tw.toString(), tw.length==19
r155
1445{{{#!if rs=rs+(+tw.substr(0,1)), ru=ru+(+tw.substr(1,18)), ps=true
r232
1446}}}}}}{{{#!if (tw.length<=18)&&!ps
r155
1447{{{#!if ru=ru+(+tw)
1448}}}}}}{{{#!if ps=false, ru=ru.toString(), ru.length==19
1449{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1450}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1451{{{#!if ru=(+ru)
1452}}}}}}
r184
1453{{{#!if ps=false, tw=(+au.substr(0,i))*(+bb.substr(17-i,1)), ru=ru+(+tw), ru=ru.toString()
1454}}}{{{#!if ru.length==19
r155
1455{{{#!if rs=rs+(+ru.substr(0,1)), ru=(+ru.substr(1,18)), ps=true
r232
1456}}}}}}{{{#!if (ru.length<=18)&&!ps
r155
1457{{{#!if ru=(+ru)
r222
1458}}}}}}{{{#!if i+=1, tv*=10, ps=false
r184
1459}}}
r156
1460##rs
1461rs부분을 합산합니다. au*bu의 나머지 절반을 처리합니다. i, tv, ps를 다시 초기화하고 시작합니다. 소수점 윗자리는 많아야 36자리이므로 rs에서 더 이상 넘치지 않습니다.
1462{{{#!if i=0+0, tv=1, ps=false
1463}}}
1464##for i=0 to 17
r184
1465{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1466}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1467}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1468}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1469}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1470}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1471}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1472}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1473}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1474}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
r156
1475}}}
r184
1476{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1477}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1478}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1479}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1480}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1481}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1482}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
1483}}}{{{#!if tw=(+au.substr(0,i))*(+bu.substr(17-i,1)), rs=rs+tw, i+=1
r156
1484}}}
r190
1485여기까지가 곱셈에서 a*b 의 연산 과정이며 rb 정리 부분으로 넘어갑니다.
r164
1486}}}
1487
r261
1488##=== 나눗셈 ===
r194
1489a와 b 모두 0이 아닌 경우에서 나눗셈을 연산하는 과정입니다.
1490{{{#!if (f=="/")&&((+au!=0)||(+ab!=0))&&((+bu!=0)||(+bb!=0))
1491
1492au, ab, bu, bb를 18자로 만들었으므로 36자리 정수의 나눗셈으로 봅니다.
1493a/b=(au+ab)/(bu+bb)=(+(au.substr(0,18)+ab.substr(0,18)))/(+(bu.substr(0,18)+bb.substr(0,18)))와 같습니다.
r195
1494
r229
1495##몫 서술
1496제일 높은 자리부터 내려오면서 처음으로 0이 아닌 수를 왼쪽으로 당기는 과정을 거쳤으므로 (1부터 시작하는 18자리+18자리 숫자)/(1부터 시작하는 18자리+18자리 수) 연산이 됩니다.
1497
1498{{{#!if ps=false
1499}}}숫자에서 해당하는 (10**n) 자리에 몫을 더 이상 계산하지 않고 그 다음 자리(10**(n+1))의 몫을 계산하게 된다면 ps를 true로 바꿉니다.
1500
1501##i=0
1502{{{#!if br=false
1503}}}다시 정렬된 bu, bb의 값은 바뀌지 않습니다. bu, bb로 나눈 몫만큼 au, ab에서 감소시킨 다음 au와 ab를 다시 정렬시키며, au와 ab가 모두 0이 되면 더 이상 계산하지 않도록 br를 true로 반환합니다.
r230
1504그 다음 계산을 편하게 할 수 있도록 텍스트값으로 된 au, ab, bu, bb를 정수값으로 변환합니다.
r291
1505{{{#!if au=+au, ab=+ab, bu=+bu, bb=+bb
r230
1506}}}
r229
1507
r281
1508변수 ps(logical)를 false로 초기화한 다음 변수 ps를 가져옵니다. au의 값이 bu보다 작거나, au==bu이더라도 ab<bb이면 해당하는 자릿수의 몫이 0이라는 의미이므로 변수 ps를 true로 바꾸고 다음 자릿수로 넘깁니다.
r249
1509{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
1510{{{#!if ps=true
r229
1511}}}}}}
r281
1512ps==true가 되려면 ① au>bu이거나, ② au==bu이고 ab>=bb인 경우입니다. !ps(다음 자릿수로 계산을 넘기지 않음)임을 if 조건문으로 둔 상태에서 진행합니다.
r241
1513{{{#!if !ps
r230
1514au를 bu로 나눈 몫을 tw로 정의합니다. 정수를 정수로 나누면 몫만 계산되며, 100,000,000,000,000,000 이상 999,999,999 999,999,999 이하의 한 정수를 100,000,000,000,000,000 이상의 다른 한 정수로 나눈 몫이므로 tw의 값은 최소 0 최대 9가 됩니다.
1515{{{#!if tw=au/bu
1516}}}
1517bu, bb를 각각 tw만큼 곱한 값을 tx, ty로 정의합니다.
1518{{{#!if tx=bu*tw, ty=bb*tw
1519}}}
r231
1520이 때 ty가 19자리가 되면 넘친 첫번째 자리의 값을 tx의 일의 자리로 더하고 아래 18자리의 값을 ty로 다시 정의합니다. tx는 19자리 숫자가 되어도 문제가 없습니다.
1521{{{#!if ty=ty.toString(), ty.length==19
r239
1522{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
r231
1523}}}}}}
1524이렇게 하면 tx=bu*tw<=au가 됩니다. (bu가 au보다 크면 tw는 tw의 정의에서 값이 0이 되므로 부등호가 성립됩니다.)
r239
1525ty를 정수로 바꿉니다.
1526{{{#!if ty=+ty
1527}}}
r231
1528(2.1/1.6 처럼) ty가 넘쳐 tx 값이 더해지는 경우가 있으므로 몫이 유효한 값인지 검산합니다. 만일 tx ty 가 기존 au ab을 넘게 되면 tw에서 1을 빼고, tx, ty를 다시 정의합니다.
1529{{{#!if (tx>au)||((tx==au)&&(ty>ab))
1530{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1531}}}
1532마찬가지로 ty가 19자리가 된다면 넘친 첫번째 자리의 값을 tx의 일의 자리로 더합니다.
1533{{{#!if ty=ty.toString(), ty.length==19
r239
1534{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1535}}}}}}
1536ty를 정수로 바꿉니다.
1537{{{#!if ty=+ty
1538}}}
1539}}}
r231
1540이렇게 만들어진 tx, ty가 있으면 이를 반영합니다.
1541}}}
r253
1542ps일 경우 해당 자리의 몫(tw)을 0으로 처리합니다.
r231
1543{{{#!if ps
r253
1544{{{#!if tw=0
r231
1545}}}}}}
r258
1546!ps일 경우 au에서 tx를, ab에서 ty를 뺍니다. 만약 ty>ab일 경우 au에서 1을 가져와 (au에서 1을 빼고) ab에 1,000,000,000,000,000,000을 더한 다음 계산합니다.
r231
1547{{{#!if !ps
r233
1548{{{#!if ty>ab
r234
1549{{{#!if au-=1, ab+=+("1"+pd)
r231
1550}}}}}}
r233
1551{{{#!if au-=tx, ab-=ty
1552}}}}}}
r253
1553몫인 tw를 문자열로 바꾸고 tm의 오른쪽에 더합니다.
1554{{{#!if tw=tw.toString(), tm+=tw
1555}}}
r241
1556au, ab에서 몫을 빼고 나니 au, ab가 모두 0으로 된다면 더 이상 계산을 하지 않아야 하므로 br를 true로 반환합니다.
1557{{{#!if (au==0)&&(ab==0)
r233
1558{{{#!if br=true
1559}}}}}}
r241
1560어느 하나가 0이 되지 않는다면 br는 여전히 false이므로 !br일 때 자릿수를 옮깁니다.
1561{{{#!if !br
r233
1562au, ab를 문자열로 다시 바꿉니다.
1563{{{#!if au=au.toString(), ab=ab.toString()
1564}}}
r234
1565tn을 빈 문자열로 초기화합니다. 그리고 역할을 다 한 ps를 false로 초기화합니다. 그 다음 au가 여전히 18자리 숫자일 경우 au의 첫번째 자리를 분리해 내어 tn으로 정의합니다. 여기서 ps는 au의 길이에 따른 처리가 겹쳐지지 않게 만듭니다.
r252
1566{{{#!if ps=false, tn="", au.length==18
1567{{{#!if tn=au.substr(0,1), au=au.substr(1,17), ps=true
r233
1568}}}}}}
r252
1569au가 17자리 미만의 숫자가 되었다면 au의 왼쪽을 0으로 채워 18자리 숫자로 만듭니다.
1570{{{#!if !ps&&(au.length<17)
1571{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r234
1572}}}}}}
1573ab가 18자리 미만의 숫자가 되었다면 왼쪽을 0으로 채워 18자리 숫자로 만듭니다.
1574{{{#!if ab.length<18
1575{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1576}}}}}}
1577au의 뒤로 ab의 처음 자리를 끌어옵니다.
1578{{{#!if au+=ab.substr(0,1)
r233
1579}}}
r234
1580ab의 나머지 17자리를 앞으로 당긴 다음 "0"을 더합니다.
1581{{{#!if ab=ab.substr(1,17)+"0"
r241
1582}}}
1583여기까지가 자릿수를 한 칸씩 옮기는 과정입니다.
1584}}}
r234
1585##i=1 part 1
r239
1586몫으로 기록할 숫자의 첫번째 자리를 구했다면, 그 다음 자리의 숫자를 찾기 위해 (변수 tn으로 만들 수 있는 여분의 1자리 +) 18자리 + 18자리 숫자를 18자리+18자리 숫자로 나누는 계산을 합니다. tn이 9가 될 경우 9로 시작하는 19자리 숫자를 long integer로 모두 표현할 수 없으므로 10**18 자리부터 먼저 계산합니다. 10**18의 1번째 숫자의 몫을 구한 다음 나머지를 18자리 숫자에 더하는 과정(part 1)을 거친 다음 그 18자리에서 몫을 구하는 과정(part 2)을 거칩니다.
r235
1587
r240
1588au와 ab를 정수로 다시 바꾸고 tz를 0으로 초기화합니다. 그리고 tn이 빈 문자열이 아니라면 (앞에 au에서 한 자리 수를 떼온 것이므로) tn에 0을 더하여 19자리로 만들고 몫을 구합니다.
1589{{{#!if au=+au, ab=+ab, tz=0, tn!=""
r239
1590tn을 19자리 정수로 바꿉니다.
1591{{{#!if tn+=pd, tn=+tn,
r235
1592}}}
1593tz를 몫으로 정의합니다. 앞의 tw를 처리하는 방법과 같습니다. tn을 정수로 만들었으므로 소수점 아래를 비교한다면 정수의 소수점 아래에 해당하는 0과 비교합니다.
1594{{{#!if tz=tn/bu, tx=bu*tz, ty=bb*tz
1595}}}{{{#!if ty=ty.toString(), ty.length==19
r239
1596{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
r235
1597}}}}}}
r239
1598{{{#!if ty=+ty
1599}}}
r235
1600{{{#!if (tx>tn)||((tx==tn)&&(ty>0))
1601{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1602}}}{{{#!if ty=ty.toString(), ty.length==19
r239
1603{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1604}}}}}}
1605{{{#!if ty=+ty
1606}}}}}}
r238
1607tn에서 나누어떨어지는 값을 뺀 나머지를 반영하여 au, ab에 더합니다. 소수점 아래 부분인 ab보다 ty가 크다면 tn에서 1을 빼어 계산합니다.
r237
1608{{{#!if ty>ab
1609{{{#!if tn-=1, ab+=+("1"+pd)
r236
1610}}}}}}
r237
1611{{{#!if au+=(tn-tx), ab-=ty
r234
1612}}}
r237
1613tn을 빈 문자열로 초기화합니다.
1614{{{#!if tn=""
1615}}}
1616}}}
r234
1617##i=1 part 2
r239
1618br(0으로 나누어떨어짐) 이 걸려있으면 실행하지 않습니다. 그러므로 전체적으로 조건을 !br로 둔 다음 계산을 진행합니다.
r238
1619{{{#!if !br
r239
1620ps를 false로 초기화한 다음 앞에서 했던 처리와 동일하게 진행합니다.
r249
1621{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r283
1622"ps일 경우 tw를 0으로 처리하는 과정"을 여기로 병합합니다.
r253
1623{{{#!if ps=true, tw=0
r239
1624}}}}}}
r241
1625{{{#!if !ps
r239
1626tw, tx, ty를 정의하고 처리하는 과정은 앞자리에서 몫을 찾는 과정과 동일합니다. 앞에서 이미 au, ab를 정수로 만들었으므로 여기에 au, ab를 정수로 만드는 처리를 할 필요가 없습니다.
1627{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
r240
1628}}}{{{#!if ty=ty.toString(), ty.length==19
1629{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1630}}}}}}
1631ty를 정수로 바꾸는 과정을 아래 if 조건문으로 병합합니다.
1632{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1633{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1634}}}{{{#!if ty=ty.toString(), ty.length==19
1635{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1636}}}}}}{{{#!if ty=+ty
1637}}}}}}
r253
1638{{{#!if ty>ab
r240
1639{{{#!if au-=1, ab+=+("1"+pd)
1640}}}}}}{{{#!if au-=tx, ab-=ty
r254
1641}}}}}}
1642앞에서 계산된 tz의 값을 tw에 더한 다음 tw를 문자열로 바꿉니다. 그리고 tm에 문자열로 바꾼 tw을 더합니다.
r253
1643{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
1644}}}
r281
1645au와 ab가 모두 0이 될 때 br를 true로 정의합니다.
r241
1646{{{#!if (au==0)&&(ab==0)
1647{{{#!if br=true
r240
1648}}}}}}}}}
1649어느 자릿수부터 br가 true로 되면 이후 자릿수 옮겨 몫을 구하는 과정이나 나머지를 정리하는 과정을 더 이상 할 필요가 없습니다.
r241
1650{{{#!if !br
r240
1651au, ab를 문자열로 다시 바꾸고 처리하는 과정은 동일합니다.
1652{{{#!if au=au.toString(), ab=ab.toString()
r239
1653}}}
r252
1654ps를 au 자릿수가 18이 되었을 때 true가 되는 논리값으로 정의합니다.
1655{{{#!if tn="", ps=(au.length==18), ps
1656{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
r240
1657}}}}}}
r252
1658{{{#!if !ps&&(au.length<17)
1659{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r240
1660}}}}}}
1661{{{#!if ab.length<18
1662{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1663}}}}}}
1664{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r239
1665}}}
r240
1666}}}
1667##i=2
r242
1668이후부터 과정은 동일합니다. 많아야 소수점 위 36자리, 소수점 아래 36자리 모두를 쓰면 72개이므로 총 72회(for i=0 to i=71)를 진행합니다.
r240
1669{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1670{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1671}}}{{{#!if ty=ty.toString(), ty.length==19
1672{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1673}}}}}}
1674{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1675{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1676}}}{{{#!if ty=ty.toString(), ty.length==19
1677{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1678}}}}}}{{{#!if ty=+ty
1679}}}}}}
1680{{{#!if ty>ab
1681{{{#!if tn-=1, ab+=+("1"+pd)
1682}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
r241
1683}}}}}}
1684{{{#!if !br
r249
1685{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r255
1686{{{#!if ps=true, tw=0
r241
1687}}}}}}
1688{{{#!if !ps
1689{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1690}}}{{{#!if ty=ty.toString(), ty.length==19
1691{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1692}}}}}}
1693{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1694{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1695}}}{{{#!if ty=ty.toString(), ty.length==19
1696{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1697}}}}}}{{{#!if ty=+ty
1698}}}}}}
r255
1699{{{#!if ty>ab
r241
1700{{{#!if au-=1, ab+=+("1"+pd)
1701}}}}}}{{{#!if au-=tx, ab-=ty
r255
1702}}}}}}
1703{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r240
1704}}}
r241
1705{{{#!if (au==0)&&(ab==0)
1706{{{#!if br=true
r256
1707}}}}}}}}}
r241
1708{{{#!if !br
1709{{{#!if au=au.toString(), ab=ab.toString()
r252
1710}}}{{{#!if tn="", ps=(au.length==18), ps
1711{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1712}}}}}}{{{#!if !ps&&(au.length<17)
1713{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r241
1714}}}}}}{{{#!if ab.length<18
1715{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1716}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1717}}}}}}
r242
1718##i=3
1719{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1720{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1721}}}{{{#!if ty=ty.toString(), ty.length==19
1722{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1723}}}}}}
1724{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1725{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1726}}}{{{#!if ty=ty.toString(), ty.length==19
1727{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1728}}}}}}{{{#!if ty=+ty
1729}}}}}}
1730{{{#!if ty>ab
1731{{{#!if tn-=1, ab+=+("1"+pd)
1732}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1733}}}}}}
1734{{{#!if !br
r249
1735{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1736{{{#!if ps=true, tw=0
r242
1737}}}}}}
1738{{{#!if !ps
1739{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1740}}}{{{#!if ty=ty.toString(), ty.length==19
1741{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1742}}}}}}
1743{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1744{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1745}}}{{{#!if ty=ty.toString(), ty.length==19
1746{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1747}}}}}}{{{#!if ty=+ty
1748}}}}}}
r256
1749{{{#!if ty>ab
r242
1750{{{#!if au-=1, ab+=+("1"+pd)
1751}}}}}}{{{#!if au-=tx, ab-=ty
r256
1752}}}}}}
1753{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1754}}}
1755{{{#!if (au==0)&&(ab==0)
1756{{{#!if br=true
1757}}}}}}}}}
1758{{{#!if !br
1759{{{#!if au=au.toString(), ab=ab.toString()
r252
1760}}}{{{#!if tn="", ps=(au.length==18), ps
1761{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1762}}}}}}{{{#!if !ps&&(au.length<17)
1763{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1764}}}}}}{{{#!if ab.length<18
1765{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1766}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1767}}}}}}
r242
1768##i=4
1769{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1770{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1771}}}{{{#!if ty=ty.toString(), ty.length==19
1772{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1773}}}}}}
1774{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1775{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1776}}}{{{#!if ty=ty.toString(), ty.length==19
1777{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1778}}}}}}{{{#!if ty=+ty
1779}}}}}}
1780{{{#!if ty>ab
1781{{{#!if tn-=1, ab+=+("1"+pd)
1782}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1783}}}}}}
1784{{{#!if !br
r249
1785{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1786{{{#!if ps=true, tw=0
r242
1787}}}}}}
1788{{{#!if !ps
1789{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1790}}}{{{#!if ty=ty.toString(), ty.length==19
1791{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1792}}}}}}
1793{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1794{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1795}}}{{{#!if ty=ty.toString(), ty.length==19
1796{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1797}}}}}}{{{#!if ty=+ty
1798}}}}}}
r256
1799{{{#!if ty>ab
r242
1800{{{#!if au-=1, ab+=+("1"+pd)
1801}}}}}}{{{#!if au-=tx, ab-=ty
r256
1802}}}}}}
1803{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1804}}}
1805{{{#!if (au==0)&&(ab==0)
1806{{{#!if br=true
1807}}}}}}}}}
1808{{{#!if !br
1809{{{#!if au=au.toString(), ab=ab.toString()
r252
1810}}}{{{#!if tn="", ps=(au.length==18), ps
1811{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1812}}}}}}{{{#!if !ps&&(au.length<17)
1813{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1814}}}}}}{{{#!if ab.length<18
1815{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1816}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1817}}}}}}
r242
1818##i=5
1819{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1820{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1821}}}{{{#!if ty=ty.toString(), ty.length==19
1822{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1823}}}}}}
1824{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1825{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1826}}}{{{#!if ty=ty.toString(), ty.length==19
1827{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1828}}}}}}{{{#!if ty=+ty
1829}}}}}}
1830{{{#!if ty>ab
1831{{{#!if tn-=1, ab+=+("1"+pd)
1832}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1833}}}}}}
1834{{{#!if !br
r249
1835{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1836{{{#!if ps=true, tw=0
r242
1837}}}}}}
1838{{{#!if !ps
1839{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1840}}}{{{#!if ty=ty.toString(), ty.length==19
1841{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1842}}}}}}
1843{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1844{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1845}}}{{{#!if ty=ty.toString(), ty.length==19
1846{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1847}}}}}}{{{#!if ty=+ty
1848}}}}}}
r256
1849{{{#!if ty>ab
r242
1850{{{#!if au-=1, ab+=+("1"+pd)
1851}}}}}}{{{#!if au-=tx, ab-=ty
r256
1852}}}}}}
1853{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1854}}}
1855{{{#!if (au==0)&&(ab==0)
1856{{{#!if br=true
1857}}}}}}}}}
1858{{{#!if !br
1859{{{#!if au=au.toString(), ab=ab.toString()
r252
1860}}}{{{#!if tn="", ps=(au.length==18), ps
1861{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1862}}}}}}{{{#!if !ps&&(au.length<17)
1863{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1864}}}}}}{{{#!if ab.length<18
1865{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1866}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1867}}}}}}
r242
1868##i=6
1869{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1870{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1871}}}{{{#!if ty=ty.toString(), ty.length==19
1872{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1873}}}}}}
1874{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1875{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1876}}}{{{#!if ty=ty.toString(), ty.length==19
1877{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1878}}}}}}{{{#!if ty=+ty
1879}}}}}}
1880{{{#!if ty>ab
1881{{{#!if tn-=1, ab+=+("1"+pd)
1882}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1883}}}}}}
1884{{{#!if !br
r249
1885{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1886{{{#!if ps=true, tw=0
r242
1887}}}}}}
1888{{{#!if !ps
1889{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1890}}}{{{#!if ty=ty.toString(), ty.length==19
1891{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1892}}}}}}
1893{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1894{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1895}}}{{{#!if ty=ty.toString(), ty.length==19
1896{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1897}}}}}}{{{#!if ty=+ty
1898}}}}}}
r256
1899{{{#!if ty>ab
r242
1900{{{#!if au-=1, ab+=+("1"+pd)
1901}}}}}}{{{#!if au-=tx, ab-=ty
r256
1902}}}}}}
1903{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1904}}}
1905{{{#!if (au==0)&&(ab==0)
1906{{{#!if br=true
1907}}}}}}}}}
1908{{{#!if !br
1909{{{#!if au=au.toString(), ab=ab.toString()
r252
1910}}}{{{#!if tn="", ps=(au.length==18), ps
1911{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1912}}}}}}{{{#!if !ps&&(au.length<17)
1913{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1914}}}}}}{{{#!if ab.length<18
1915{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1916}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1917}}}}}}
r242
1918##i=7
1919{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1920{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1921}}}{{{#!if ty=ty.toString(), ty.length==19
1922{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1923}}}}}}
1924{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1925{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1926}}}{{{#!if ty=ty.toString(), ty.length==19
1927{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1928}}}}}}{{{#!if ty=+ty
1929}}}}}}
1930{{{#!if ty>ab
1931{{{#!if tn-=1, ab+=+("1"+pd)
1932}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1933}}}}}}
1934{{{#!if !br
r249
1935{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1936{{{#!if ps=true, tw=0
r242
1937}}}}}}
1938{{{#!if !ps
1939{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1940}}}{{{#!if ty=ty.toString(), ty.length==19
1941{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1942}}}}}}
1943{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1944{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1945}}}{{{#!if ty=ty.toString(), ty.length==19
1946{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1947}}}}}}{{{#!if ty=+ty
1948}}}}}}
r256
1949{{{#!if ty>ab
r242
1950{{{#!if au-=1, ab+=+("1"+pd)
1951}}}}}}{{{#!if au-=tx, ab-=ty
r256
1952}}}}}}
1953{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
1954}}}
1955{{{#!if (au==0)&&(ab==0)
1956{{{#!if br=true
1957}}}}}}}}}
1958{{{#!if !br
1959{{{#!if au=au.toString(), ab=ab.toString()
r252
1960}}}{{{#!if tn="", ps=(au.length==18), ps
1961{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
1962}}}}}}{{{#!if !ps&&(au.length<17)
1963{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
1964}}}}}}{{{#!if ab.length<18
1965{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
1966}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
1967}}}}}}
r242
1968##i=8
1969{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
1970{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
1971}}}{{{#!if ty=ty.toString(), ty.length==19
1972{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1973}}}}}}
1974{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
1975{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
1976}}}{{{#!if ty=ty.toString(), ty.length==19
1977{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1978}}}}}}{{{#!if ty=+ty
1979}}}}}}
1980{{{#!if ty>ab
1981{{{#!if tn-=1, ab+=+("1"+pd)
1982}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
1983}}}}}}
1984{{{#!if !br
r249
1985{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
1986{{{#!if ps=true, tw=0
r242
1987}}}}}}
1988{{{#!if !ps
1989{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
1990}}}{{{#!if ty=ty.toString(), ty.length==19
1991{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1992}}}}}}
1993{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
1994{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
1995}}}{{{#!if ty=ty.toString(), ty.length==19
1996{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
1997}}}}}}{{{#!if ty=+ty
1998}}}}}}
r256
1999{{{#!if ty>ab
r242
2000{{{#!if au-=1, ab+=+("1"+pd)
2001}}}}}}{{{#!if au-=tx, ab-=ty
r256
2002}}}}}}
2003{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
2004}}}
2005{{{#!if (au==0)&&(ab==0)
2006{{{#!if br=true
2007}}}}}}}}}
2008{{{#!if !br
2009{{{#!if au=au.toString(), ab=ab.toString()
r252
2010}}}{{{#!if tn="", ps=(au.length==18), ps
2011{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2012}}}}}}{{{#!if !ps&&(au.length<17)
2013{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
2014}}}}}}{{{#!if ab.length<18
2015{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2016}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2017}}}}}}
r242
2018##i=9
2019{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2020{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2021}}}{{{#!if ty=ty.toString(), ty.length==19
2022{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2023}}}}}}
2024{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2025{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2026}}}{{{#!if ty=ty.toString(), ty.length==19
2027{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2028}}}}}}{{{#!if ty=+ty
2029}}}}}}
2030{{{#!if ty>ab
2031{{{#!if tn-=1, ab+=+("1"+pd)
2032}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2033}}}}}}
2034{{{#!if !br
r249
2035{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2036{{{#!if ps=true, tw=0
r242
2037}}}}}}
2038{{{#!if !ps
2039{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2040}}}{{{#!if ty=ty.toString(), ty.length==19
2041{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2042}}}}}}
2043{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2044{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2045}}}{{{#!if ty=ty.toString(), ty.length==19
2046{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2047}}}}}}{{{#!if ty=+ty
2048}}}}}}
r256
2049{{{#!if ty>ab
r242
2050{{{#!if au-=1, ab+=+("1"+pd)
2051}}}}}}{{{#!if au-=tx, ab-=ty
r256
2052}}}}}}
2053{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
2054}}}
2055{{{#!if (au==0)&&(ab==0)
2056{{{#!if br=true
2057}}}}}}}}}
2058{{{#!if !br
2059{{{#!if au=au.toString(), ab=ab.toString()
r252
2060}}}{{{#!if tn="", ps=(au.length==18), ps
2061{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2062}}}}}}{{{#!if !ps&&(au.length<17)
2063{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
2064}}}}}}{{{#!if ab.length<18
2065{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2066}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2067}}}}}}
r242
2068##i=10
2069{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2070{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2071}}}{{{#!if ty=ty.toString(), ty.length==19
2072{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2073}}}}}}
2074{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2075{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2076}}}{{{#!if ty=ty.toString(), ty.length==19
2077{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2078}}}}}}{{{#!if ty=+ty
2079}}}}}}
2080{{{#!if ty>ab
2081{{{#!if tn-=1, ab+=+("1"+pd)
2082}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2083}}}}}}
2084{{{#!if !br
r249
2085{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2086{{{#!if ps=true, tw=0
r242
2087}}}}}}
2088{{{#!if !ps
2089{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2090}}}{{{#!if ty=ty.toString(), ty.length==19
2091{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2092}}}}}}
2093{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2094{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2095}}}{{{#!if ty=ty.toString(), ty.length==19
2096{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2097}}}}}}{{{#!if ty=+ty
2098}}}}}}
r256
2099{{{#!if ty>ab
r242
2100{{{#!if au-=1, ab+=+("1"+pd)
2101}}}}}}{{{#!if au-=tx, ab-=ty
r256
2102}}}}}}
2103{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r242
2104}}}
2105{{{#!if (au==0)&&(ab==0)
2106{{{#!if br=true
2107}}}}}}}}}
2108{{{#!if !br
2109{{{#!if au=au.toString(), ab=ab.toString()
r252
2110}}}{{{#!if tn="", ps=(au.length==18), ps
2111{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2112}}}}}}{{{#!if !ps&&(au.length<17)
2113{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r242
2114}}}}}}{{{#!if ab.length<18
2115{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2116}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2117}}}}}}
r243
2118##i=11
2119{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2120{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2121}}}{{{#!if ty=ty.toString(), ty.length==19
2122{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2123}}}}}}
2124{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2125{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2126}}}{{{#!if ty=ty.toString(), ty.length==19
2127{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2128}}}}}}{{{#!if ty=+ty
2129}}}}}}
2130{{{#!if ty>ab
2131{{{#!if tn-=1, ab+=+("1"+pd)
2132}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2133}}}}}}
2134{{{#!if !br
r249
2135{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2136{{{#!if ps=true, tw=0
r243
2137}}}}}}
2138{{{#!if !ps
2139{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2140}}}{{{#!if ty=ty.toString(), ty.length==19
2141{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2142}}}}}}
2143{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2144{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2145}}}{{{#!if ty=ty.toString(), ty.length==19
2146{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2147}}}}}}{{{#!if ty=+ty
2148}}}}}}
r256
2149{{{#!if ty>ab
r243
2150{{{#!if au-=1, ab+=+("1"+pd)
2151}}}}}}{{{#!if au-=tx, ab-=ty
r256
2152}}}}}}
2153{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2154}}}
2155{{{#!if (au==0)&&(ab==0)
2156{{{#!if br=true
2157}}}}}}}}}
2158{{{#!if !br
2159{{{#!if au=au.toString(), ab=ab.toString()
r252
2160}}}{{{#!if tn="", ps=(au.length==18), ps
2161{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2162}}}}}}{{{#!if !ps&&(au.length<17)
2163{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2164}}}}}}{{{#!if ab.length<18
2165{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2166}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2167}}}}}}
r243
2168##i=12
2169{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2170{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2171}}}{{{#!if ty=ty.toString(), ty.length==19
2172{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2173}}}}}}
2174{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2175{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2176}}}{{{#!if ty=ty.toString(), ty.length==19
2177{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2178}}}}}}{{{#!if ty=+ty
2179}}}}}}
2180{{{#!if ty>ab
2181{{{#!if tn-=1, ab+=+("1"+pd)
2182}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2183}}}}}}
2184{{{#!if !br
r249
2185{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2186{{{#!if ps=true, tw=0
r243
2187}}}}}}
2188{{{#!if !ps
2189{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2190}}}{{{#!if ty=ty.toString(), ty.length==19
2191{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2192}}}}}}
2193{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2194{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2195}}}{{{#!if ty=ty.toString(), ty.length==19
2196{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2197}}}}}}{{{#!if ty=+ty
2198}}}}}}
r256
2199{{{#!if ty>ab
r243
2200{{{#!if au-=1, ab+=+("1"+pd)
2201}}}}}}{{{#!if au-=tx, ab-=ty
r256
2202}}}}}}
2203{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2204}}}
2205{{{#!if (au==0)&&(ab==0)
2206{{{#!if br=true
2207}}}}}}}}}
2208{{{#!if !br
2209{{{#!if au=au.toString(), ab=ab.toString()
r252
2210}}}{{{#!if tn="", ps=(au.length==18), ps
2211{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2212}}}}}}{{{#!if !ps&&(au.length<17)
2213{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2214}}}}}}{{{#!if ab.length<18
2215{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2216}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2217}}}}}}
r243
2218##i=13
2219{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2220{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2221}}}{{{#!if ty=ty.toString(), ty.length==19
2222{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2223}}}}}}
2224{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2225{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2226}}}{{{#!if ty=ty.toString(), ty.length==19
2227{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2228}}}}}}{{{#!if ty=+ty
2229}}}}}}
2230{{{#!if ty>ab
2231{{{#!if tn-=1, ab+=+("1"+pd)
2232}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2233}}}}}}
2234{{{#!if !br
r249
2235{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2236{{{#!if ps=true, tw=0
r243
2237}}}}}}
2238{{{#!if !ps
2239{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2240}}}{{{#!if ty=ty.toString(), ty.length==19
2241{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2242}}}}}}
2243{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2244{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2245}}}{{{#!if ty=ty.toString(), ty.length==19
2246{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2247}}}}}}{{{#!if ty=+ty
2248}}}}}}
r256
2249{{{#!if ty>ab
r243
2250{{{#!if au-=1, ab+=+("1"+pd)
2251}}}}}}{{{#!if au-=tx, ab-=ty
r256
2252}}}}}}
2253{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2254}}}
2255{{{#!if (au==0)&&(ab==0)
2256{{{#!if br=true
2257}}}}}}}}}
2258{{{#!if !br
2259{{{#!if au=au.toString(), ab=ab.toString()
r252
2260}}}{{{#!if tn="", ps=(au.length==18), ps
2261{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2262}}}}}}{{{#!if !ps&&(au.length<17)
2263{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2264}}}}}}{{{#!if ab.length<18
2265{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2266}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2267}}}}}}
r243
2268##i=14
2269{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2270{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2271}}}{{{#!if ty=ty.toString(), ty.length==19
2272{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2273}}}}}}
2274{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2275{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2276}}}{{{#!if ty=ty.toString(), ty.length==19
2277{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2278}}}}}}{{{#!if ty=+ty
2279}}}}}}
2280{{{#!if ty>ab
2281{{{#!if tn-=1, ab+=+("1"+pd)
2282}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2283}}}}}}
2284{{{#!if !br
r249
2285{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2286{{{#!if ps=true, tw=0
r243
2287}}}}}}
2288{{{#!if !ps
2289{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2290}}}{{{#!if ty=ty.toString(), ty.length==19
2291{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2292}}}}}}
2293{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2294{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2295}}}{{{#!if ty=ty.toString(), ty.length==19
2296{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2297}}}}}}{{{#!if ty=+ty
2298}}}}}}
r256
2299{{{#!if ty>ab
r243
2300{{{#!if au-=1, ab+=+("1"+pd)
2301}}}}}}{{{#!if au-=tx, ab-=ty
r256
2302}}}}}}
2303{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2304}}}
2305{{{#!if (au==0)&&(ab==0)
2306{{{#!if br=true
2307}}}}}}}}}
2308{{{#!if !br
2309{{{#!if au=au.toString(), ab=ab.toString()
r252
2310}}}{{{#!if tn="", ps=(au.length==18), ps
2311{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2312}}}}}}{{{#!if !ps&&(au.length<17)
2313{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2314}}}}}}{{{#!if ab.length<18
2315{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2316}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2317}}}}}}
r243
2318##i=15
2319{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2320{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2321}}}{{{#!if ty=ty.toString(), ty.length==19
2322{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2323}}}}}}
2324{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2325{{{#!if tz-=1, 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}}}}}}{{{#!if ty=+ty
2329}}}}}}
2330{{{#!if ty>ab
2331{{{#!if tn-=1, ab+=+("1"+pd)
2332}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2333}}}}}}
2334{{{#!if !br
r249
2335{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2336{{{#!if ps=true, tw=0
r243
2337}}}}}}
2338{{{#!if !ps
2339{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2340}}}{{{#!if ty=ty.toString(), ty.length==19
2341{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2342}}}}}}
2343{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2344{{{#!if tw-=1, 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}}}}}}{{{#!if ty=+ty
2348}}}}}}
r256
2349{{{#!if ty>ab
r243
2350{{{#!if au-=1, ab+=+("1"+pd)
2351}}}}}}{{{#!if au-=tx, ab-=ty
r256
2352}}}}}}
2353{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2354}}}
2355{{{#!if (au==0)&&(ab==0)
2356{{{#!if br=true
2357}}}}}}}}}
2358{{{#!if !br
2359{{{#!if au=au.toString(), ab=ab.toString()
r252
2360}}}{{{#!if tn="", ps=(au.length==18), ps
2361{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2362}}}}}}{{{#!if !ps&&(au.length<17)
2363{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2364}}}}}}{{{#!if ab.length<18
2365{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2366}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2367}}}}}}
r243
2368##i=16
2369{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2370{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2371}}}{{{#!if ty=ty.toString(), ty.length==19
2372{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2373}}}}}}
2374{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2375{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2376}}}{{{#!if ty=ty.toString(), ty.length==19
2377{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2378}}}}}}{{{#!if ty=+ty
2379}}}}}}
2380{{{#!if ty>ab
2381{{{#!if tn-=1, ab+=+("1"+pd)
2382}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2383}}}}}}
2384{{{#!if !br
r249
2385{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2386{{{#!if ps=true, tw=0
r243
2387}}}}}}
2388{{{#!if !ps
2389{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2390}}}{{{#!if ty=ty.toString(), ty.length==19
2391{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2392}}}}}}
2393{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2394{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2395}}}{{{#!if ty=ty.toString(), ty.length==19
2396{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2397}}}}}}{{{#!if ty=+ty
2398}}}}}}
r256
2399{{{#!if ty>ab
r243
2400{{{#!if au-=1, ab+=+("1"+pd)
2401}}}}}}{{{#!if au-=tx, ab-=ty
r256
2402}}}}}}
2403{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2404}}}
2405{{{#!if (au==0)&&(ab==0)
2406{{{#!if br=true
2407}}}}}}}}}
2408{{{#!if !br
2409{{{#!if au=au.toString(), ab=ab.toString()
r252
2410}}}{{{#!if tn="", ps=(au.length==18), ps
2411{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2412}}}}}}{{{#!if !ps&&(au.length<17)
2413{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2414}}}}}}{{{#!if ab.length<18
2415{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2416}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2417}}}}}}
r243
2418##i=17
2419{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2420{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2421}}}{{{#!if ty=ty.toString(), ty.length==19
2422{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2423}}}}}}
2424{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2425{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2426}}}{{{#!if ty=ty.toString(), ty.length==19
2427{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2428}}}}}}{{{#!if ty=+ty
2429}}}}}}
2430{{{#!if ty>ab
2431{{{#!if tn-=1, ab+=+("1"+pd)
2432}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2433}}}}}}
2434{{{#!if !br
r249
2435{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2436{{{#!if ps=true, tw=0
r243
2437}}}}}}
2438{{{#!if !ps
2439{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2440}}}{{{#!if ty=ty.toString(), ty.length==19
2441{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2442}}}}}}
2443{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2444{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2445}}}{{{#!if ty=ty.toString(), ty.length==19
2446{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2447}}}}}}{{{#!if ty=+ty
2448}}}}}}
r256
2449{{{#!if ty>ab
r243
2450{{{#!if au-=1, ab+=+("1"+pd)
2451}}}}}}{{{#!if au-=tx, ab-=ty
r256
2452}}}}}}
2453{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2454}}}
2455{{{#!if (au==0)&&(ab==0)
2456{{{#!if br=true
2457}}}}}}}}}
2458{{{#!if !br
2459{{{#!if au=au.toString(), ab=ab.toString()
r252
2460}}}{{{#!if tn="", ps=(au.length==18), ps
2461{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2462}}}}}}{{{#!if !ps&&(au.length<17)
2463{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2464}}}}}}{{{#!if ab.length<18
2465{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2466}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2467}}}}}}
r243
2468##i=18
2469{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2470{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2471}}}{{{#!if ty=ty.toString(), ty.length==19
2472{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2473}}}}}}
2474{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2475{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2476}}}{{{#!if ty=ty.toString(), ty.length==19
2477{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2478}}}}}}{{{#!if ty=+ty
2479}}}}}}
2480{{{#!if ty>ab
2481{{{#!if tn-=1, ab+=+("1"+pd)
2482}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2483}}}}}}
2484{{{#!if !br
r249
2485{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2486{{{#!if ps=true, tw=0
r243
2487}}}}}}
2488{{{#!if !ps
2489{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2490}}}{{{#!if ty=ty.toString(), ty.length==19
2491{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2492}}}}}}
2493{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2494{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2495}}}{{{#!if ty=ty.toString(), ty.length==19
2496{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2497}}}}}}{{{#!if ty=+ty
2498}}}}}}
r256
2499{{{#!if ty>ab
r243
2500{{{#!if au-=1, ab+=+("1"+pd)
2501}}}}}}{{{#!if au-=tx, ab-=ty
r256
2502}}}}}}
2503{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2504}}}
2505{{{#!if (au==0)&&(ab==0)
2506{{{#!if br=true
2507}}}}}}}}}
2508{{{#!if !br
2509{{{#!if au=au.toString(), ab=ab.toString()
r252
2510}}}{{{#!if tn="", ps=(au.length==18), ps
2511{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2512}}}}}}{{{#!if !ps&&(au.length<17)
2513{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2514}}}}}}{{{#!if ab.length<18
2515{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2516}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2517}}}}}}
r243
2518##i=19
2519{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2520{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2521}}}{{{#!if ty=ty.toString(), ty.length==19
2522{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2523}}}}}}
2524{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2525{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2526}}}{{{#!if ty=ty.toString(), ty.length==19
2527{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2528}}}}}}{{{#!if ty=+ty
2529}}}}}}
2530{{{#!if ty>ab
2531{{{#!if tn-=1, ab+=+("1"+pd)
2532}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2533}}}}}}
2534{{{#!if !br
r249
2535{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2536{{{#!if ps=true, tw=0
r243
2537}}}}}}
2538{{{#!if !ps
2539{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2540}}}{{{#!if ty=ty.toString(), ty.length==19
2541{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2542}}}}}}
2543{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2544{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2545}}}{{{#!if ty=ty.toString(), ty.length==19
2546{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2547}}}}}}{{{#!if ty=+ty
2548}}}}}}
r256
2549{{{#!if ty>ab
r243
2550{{{#!if au-=1, ab+=+("1"+pd)
2551}}}}}}{{{#!if au-=tx, ab-=ty
r256
2552}}}}}}
2553{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
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"
r256
2567}}}}}}
r243
2568##i=20
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))
r256
2586{{{#!if ps=true, tw=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}}}}}}
r256
2599{{{#!if ty>ab
r243
2600{{{#!if au-=1, ab+=+("1"+pd)
2601}}}}}}{{{#!if au-=tx, ab-=ty
r256
2602}}}}}}
2603{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2604}}}
2605{{{#!if (au==0)&&(ab==0)
2606{{{#!if br=true
2607}}}}}}}}}
2608{{{#!if !br
2609{{{#!if au=au.toString(), ab=ab.toString()
r252
2610}}}{{{#!if tn="", ps=(au.length==18), ps
2611{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2612}}}}}}{{{#!if !ps&&(au.length<17)
2613{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2614}}}}}}{{{#!if ab.length<18
2615{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2616}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2617}}}}}}
r243
2618##i=21
2619{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2620{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2621}}}{{{#!if ty=ty.toString(), ty.length==19
2622{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2623}}}}}}
2624{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2625{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2626}}}{{{#!if ty=ty.toString(), ty.length==19
2627{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2628}}}}}}{{{#!if ty=+ty
2629}}}}}}
2630{{{#!if ty>ab
2631{{{#!if tn-=1, ab+=+("1"+pd)
2632}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2633}}}}}}
2634{{{#!if !br
r249
2635{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2636{{{#!if ps=true, tw=0
r243
2637}}}}}}
2638{{{#!if !ps
2639{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2640}}}{{{#!if ty=ty.toString(), ty.length==19
2641{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2642}}}}}}
2643{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2644{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2645}}}{{{#!if ty=ty.toString(), ty.length==19
2646{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2647}}}}}}{{{#!if ty=+ty
2648}}}}}}
r256
2649{{{#!if ty>ab
r243
2650{{{#!if au-=1, ab+=+("1"+pd)
2651}}}}}}{{{#!if au-=tx, ab-=ty
r256
2652}}}}}}
2653{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2654}}}
2655{{{#!if (au==0)&&(ab==0)
2656{{{#!if br=true
2657}}}}}}}}}
2658{{{#!if !br
2659{{{#!if au=au.toString(), ab=ab.toString()
r252
2660}}}{{{#!if tn="", ps=(au.length==18), ps
2661{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2662}}}}}}{{{#!if !ps&&(au.length<17)
2663{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2664}}}}}}{{{#!if ab.length<18
2665{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2666}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2667}}}}}}
r243
2668##i=22
2669{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2670{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2671}}}{{{#!if ty=ty.toString(), ty.length==19
2672{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2673}}}}}}
2674{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2675{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2676}}}{{{#!if ty=ty.toString(), ty.length==19
2677{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2678}}}}}}{{{#!if ty=+ty
2679}}}}}}
2680{{{#!if ty>ab
2681{{{#!if tn-=1, ab+=+("1"+pd)
2682}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2683}}}}}}
2684{{{#!if !br
r249
2685{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2686{{{#!if ps=true, tw=0
r243
2687}}}}}}
2688{{{#!if !ps
2689{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2690}}}{{{#!if ty=ty.toString(), ty.length==19
2691{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2692}}}}}}
2693{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2694{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2695}}}{{{#!if ty=ty.toString(), ty.length==19
2696{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2697}}}}}}{{{#!if ty=+ty
2698}}}}}}
r256
2699{{{#!if ty>ab
r243
2700{{{#!if au-=1, ab+=+("1"+pd)
2701}}}}}}{{{#!if au-=tx, ab-=ty
r256
2702}}}}}}
2703{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2704}}}
2705{{{#!if (au==0)&&(ab==0)
2706{{{#!if br=true
2707}}}}}}}}}
2708{{{#!if !br
2709{{{#!if au=au.toString(), ab=ab.toString()
r252
2710}}}{{{#!if tn="", ps=(au.length==18), ps
2711{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2712}}}}}}{{{#!if !ps&&(au.length<17)
2713{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2714}}}}}}{{{#!if ab.length<18
2715{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2716}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2717}}}}}}
r243
2718##i=23
2719{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2720{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2721}}}{{{#!if ty=ty.toString(), ty.length==19
2722{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2723}}}}}}
2724{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2725{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2726}}}{{{#!if ty=ty.toString(), ty.length==19
2727{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2728}}}}}}{{{#!if ty=+ty
2729}}}}}}
2730{{{#!if ty>ab
2731{{{#!if tn-=1, ab+=+("1"+pd)
2732}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2733}}}}}}
2734{{{#!if !br
r249
2735{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2736{{{#!if ps=true, tw=0
r243
2737}}}}}}
2738{{{#!if !ps
2739{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2740}}}{{{#!if ty=ty.toString(), ty.length==19
2741{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2742}}}}}}
2743{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2744{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2745}}}{{{#!if ty=ty.toString(), ty.length==19
2746{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2747}}}}}}{{{#!if ty=+ty
2748}}}}}}
r256
2749{{{#!if ty>ab
r243
2750{{{#!if au-=1, ab+=+("1"+pd)
2751}}}}}}{{{#!if au-=tx, ab-=ty
r256
2752}}}}}}
2753{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2754}}}
2755{{{#!if (au==0)&&(ab==0)
2756{{{#!if br=true
2757}}}}}}}}}
2758{{{#!if !br
2759{{{#!if au=au.toString(), ab=ab.toString()
r252
2760}}}{{{#!if tn="", ps=(au.length==18), ps
2761{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2762}}}}}}{{{#!if !ps&&(au.length<17)
2763{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2764}}}}}}{{{#!if ab.length<18
2765{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2766}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2767}}}}}}
r243
2768##i=24
2769{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2770{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2771}}}{{{#!if ty=ty.toString(), ty.length==19
2772{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2773}}}}}}
2774{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2775{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2776}}}{{{#!if ty=ty.toString(), ty.length==19
2777{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2778}}}}}}{{{#!if ty=+ty
2779}}}}}}
2780{{{#!if ty>ab
2781{{{#!if tn-=1, ab+=+("1"+pd)
2782}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2783}}}}}}
2784{{{#!if !br
r249
2785{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2786{{{#!if ps=true, tw=0
r243
2787}}}}}}
2788{{{#!if !ps
2789{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2790}}}{{{#!if ty=ty.toString(), ty.length==19
2791{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2792}}}}}}
2793{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2794{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2795}}}{{{#!if ty=ty.toString(), ty.length==19
2796{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2797}}}}}}{{{#!if ty=+ty
2798}}}}}}
r256
2799{{{#!if ty>ab
r243
2800{{{#!if au-=1, ab+=+("1"+pd)
2801}}}}}}{{{#!if au-=tx, ab-=ty
r256
2802}}}}}}
2803{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2804}}}
2805{{{#!if (au==0)&&(ab==0)
2806{{{#!if br=true
2807}}}}}}}}}
2808{{{#!if !br
2809{{{#!if au=au.toString(), ab=ab.toString()
r252
2810}}}{{{#!if tn="", ps=(au.length==18), ps
2811{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2812}}}}}}{{{#!if !ps&&(au.length<17)
2813{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2814}}}}}}{{{#!if ab.length<18
2815{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2816}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2817}}}}}}
r243
2818##i=25
2819{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2820{{{#!if tn+=pd, tn=+tn, tz=tn/bu, 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}}}}}}
2824{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2825{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2826}}}{{{#!if ty=ty.toString(), ty.length==19
2827{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2828}}}}}}{{{#!if ty=+ty
2829}}}}}}
2830{{{#!if ty>ab
2831{{{#!if tn-=1, ab+=+("1"+pd)
2832}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2833}}}}}}
2834{{{#!if !br
r249
2835{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2836{{{#!if ps=true, tw=0
r243
2837}}}}}}
2838{{{#!if !ps
2839{{{#!if tw=au/bu, 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}}}}}}
2843{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2844{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2845}}}{{{#!if ty=ty.toString(), ty.length==19
2846{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2847}}}}}}{{{#!if ty=+ty
2848}}}}}}
r256
2849{{{#!if ty>ab
r243
2850{{{#!if au-=1, ab+=+("1"+pd)
2851}}}}}}{{{#!if au-=tx, ab-=ty
r256
2852}}}}}}
2853{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2854}}}
2855{{{#!if (au==0)&&(ab==0)
2856{{{#!if br=true
2857}}}}}}}}}
2858{{{#!if !br
2859{{{#!if au=au.toString(), ab=ab.toString()
r252
2860}}}{{{#!if tn="", ps=(au.length==18), ps
2861{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2862}}}}}}{{{#!if !ps&&(au.length<17)
2863{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2864}}}}}}{{{#!if ab.length<18
2865{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2866}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2867}}}}}}
r243
2868##i=26
2869{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2870{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2871}}}{{{#!if ty=ty.toString(), ty.length==19
2872{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2873}}}}}}
2874{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2875{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2876}}}{{{#!if ty=ty.toString(), ty.length==19
2877{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2878}}}}}}{{{#!if ty=+ty
2879}}}}}}
2880{{{#!if ty>ab
2881{{{#!if tn-=1, ab+=+("1"+pd)
2882}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2883}}}}}}
2884{{{#!if !br
r249
2885{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2886{{{#!if ps=true, tw=0
r243
2887}}}}}}
2888{{{#!if !ps
2889{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2890}}}{{{#!if ty=ty.toString(), ty.length==19
2891{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2892}}}}}}
2893{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2894{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2895}}}{{{#!if ty=ty.toString(), ty.length==19
2896{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2897}}}}}}{{{#!if ty=+ty
2898}}}}}}
r256
2899{{{#!if ty>ab
r243
2900{{{#!if au-=1, ab+=+("1"+pd)
2901}}}}}}{{{#!if au-=tx, ab-=ty
r256
2902}}}}}}
2903{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2904}}}
2905{{{#!if (au==0)&&(ab==0)
2906{{{#!if br=true
2907}}}}}}}}}
2908{{{#!if !br
2909{{{#!if au=au.toString(), ab=ab.toString()
r252
2910}}}{{{#!if tn="", ps=(au.length==18), ps
2911{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2912}}}}}}{{{#!if !ps&&(au.length<17)
2913{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2914}}}}}}{{{#!if ab.length<18
2915{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2916}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2917}}}}}}
r243
2918##i=27
2919{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2920{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2921}}}{{{#!if ty=ty.toString(), ty.length==19
2922{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2923}}}}}}
2924{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2925{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2926}}}{{{#!if ty=ty.toString(), ty.length==19
2927{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2928}}}}}}{{{#!if ty=+ty
2929}}}}}}
2930{{{#!if ty>ab
2931{{{#!if tn-=1, ab+=+("1"+pd)
2932}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2933}}}}}}
2934{{{#!if !br
r249
2935{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2936{{{#!if ps=true, tw=0
r243
2937}}}}}}
2938{{{#!if !ps
2939{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2940}}}{{{#!if ty=ty.toString(), ty.length==19
2941{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2942}}}}}}
2943{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2944{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2945}}}{{{#!if ty=ty.toString(), ty.length==19
2946{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2947}}}}}}{{{#!if ty=+ty
2948}}}}}}
r256
2949{{{#!if ty>ab
r243
2950{{{#!if au-=1, ab+=+("1"+pd)
2951}}}}}}{{{#!if au-=tx, ab-=ty
r256
2952}}}}}}
2953{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
2954}}}
2955{{{#!if (au==0)&&(ab==0)
2956{{{#!if br=true
2957}}}}}}}}}
2958{{{#!if !br
2959{{{#!if au=au.toString(), ab=ab.toString()
r252
2960}}}{{{#!if tn="", ps=(au.length==18), ps
2961{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
2962}}}}}}{{{#!if !ps&&(au.length<17)
2963{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
2964}}}}}}{{{#!if ab.length<18
2965{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
2966}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
2967}}}}}}
r243
2968##i=28
2969{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
2970{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
2971}}}{{{#!if ty=ty.toString(), ty.length==19
2972{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2973}}}}}}
2974{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
2975{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
2976}}}{{{#!if ty=ty.toString(), ty.length==19
2977{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2978}}}}}}{{{#!if ty=+ty
2979}}}}}}
2980{{{#!if ty>ab
2981{{{#!if tn-=1, ab+=+("1"+pd)
2982}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
2983}}}}}}
2984{{{#!if !br
r249
2985{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
2986{{{#!if ps=true, tw=0
r243
2987}}}}}}
2988{{{#!if !ps
2989{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
2990}}}{{{#!if ty=ty.toString(), ty.length==19
2991{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2992}}}}}}
2993{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
2994{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
2995}}}{{{#!if ty=ty.toString(), ty.length==19
2996{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
2997}}}}}}{{{#!if ty=+ty
2998}}}}}}
r256
2999{{{#!if ty>ab
r243
3000{{{#!if au-=1, ab+=+("1"+pd)
3001}}}}}}{{{#!if au-=tx, ab-=ty
r256
3002}}}}}}
3003{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3004}}}
3005{{{#!if (au==0)&&(ab==0)
3006{{{#!if br=true
3007}}}}}}}}}
3008{{{#!if !br
3009{{{#!if au=au.toString(), ab=ab.toString()
r252
3010}}}{{{#!if tn="", ps=(au.length==18), ps
3011{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3012}}}}}}{{{#!if !ps&&(au.length<17)
3013{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3014}}}}}}{{{#!if ab.length<18
3015{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3016}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3017}}}}}}
r243
3018##i=29
3019{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3020{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3021}}}{{{#!if ty=ty.toString(), ty.length==19
3022{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3023}}}}}}
3024{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3025{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3026}}}{{{#!if ty=ty.toString(), ty.length==19
3027{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3028}}}}}}{{{#!if ty=+ty
3029}}}}}}
3030{{{#!if ty>ab
3031{{{#!if tn-=1, ab+=+("1"+pd)
3032}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3033}}}}}}
3034{{{#!if !br
r249
3035{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3036{{{#!if ps=true, tw=0
r243
3037}}}}}}
3038{{{#!if !ps
3039{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3040}}}{{{#!if ty=ty.toString(), ty.length==19
3041{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3042}}}}}}
3043{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3044{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3045}}}{{{#!if ty=ty.toString(), ty.length==19
3046{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3047}}}}}}{{{#!if ty=+ty
3048}}}}}}
r256
3049{{{#!if ty>ab
r243
3050{{{#!if au-=1, ab+=+("1"+pd)
3051}}}}}}{{{#!if au-=tx, ab-=ty
r256
3052}}}}}}
3053{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3054}}}
3055{{{#!if (au==0)&&(ab==0)
3056{{{#!if br=true
3057}}}}}}}}}
3058{{{#!if !br
3059{{{#!if au=au.toString(), ab=ab.toString()
r252
3060}}}{{{#!if tn="", ps=(au.length==18), ps
3061{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3062}}}}}}{{{#!if !ps&&(au.length<17)
3063{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3064}}}}}}{{{#!if ab.length<18
3065{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3066}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3067}}}}}}
r243
3068##i=30
3069{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3070{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3071}}}{{{#!if ty=ty.toString(), ty.length==19
3072{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3073}}}}}}
3074{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3075{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3076}}}{{{#!if ty=ty.toString(), ty.length==19
3077{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3078}}}}}}{{{#!if ty=+ty
3079}}}}}}
3080{{{#!if ty>ab
3081{{{#!if tn-=1, ab+=+("1"+pd)
3082}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3083}}}}}}
3084{{{#!if !br
r249
3085{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3086{{{#!if ps=true, tw=0
r243
3087}}}}}}
3088{{{#!if !ps
3089{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3090}}}{{{#!if ty=ty.toString(), ty.length==19
3091{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3092}}}}}}
3093{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3094{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3095}}}{{{#!if ty=ty.toString(), ty.length==19
3096{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3097}}}}}}{{{#!if ty=+ty
3098}}}}}}
r256
3099{{{#!if ty>ab
r243
3100{{{#!if au-=1, ab+=+("1"+pd)
3101}}}}}}{{{#!if au-=tx, ab-=ty
r256
3102}}}}}}
3103{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3104}}}
3105{{{#!if (au==0)&&(ab==0)
3106{{{#!if br=true
3107}}}}}}}}}
3108{{{#!if !br
3109{{{#!if au=au.toString(), ab=ab.toString()
r252
3110}}}{{{#!if tn="", ps=(au.length==18), ps
3111{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3112}}}}}}{{{#!if !ps&&(au.length<17)
3113{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3114}}}}}}{{{#!if ab.length<18
3115{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3116}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3117}}}}}}
r243
3118##i=31
3119{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3120{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3121}}}{{{#!if ty=ty.toString(), ty.length==19
3122{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3123}}}}}}
3124{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3125{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3126}}}{{{#!if ty=ty.toString(), ty.length==19
3127{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3128}}}}}}{{{#!if ty=+ty
3129}}}}}}
3130{{{#!if ty>ab
3131{{{#!if tn-=1, ab+=+("1"+pd)
3132}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3133}}}}}}
3134{{{#!if !br
r249
3135{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3136{{{#!if ps=true, tw=0
r243
3137}}}}}}
3138{{{#!if !ps
3139{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3140}}}{{{#!if ty=ty.toString(), ty.length==19
3141{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3142}}}}}}
3143{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3144{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3145}}}{{{#!if ty=ty.toString(), ty.length==19
3146{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3147}}}}}}{{{#!if ty=+ty
3148}}}}}}
r256
3149{{{#!if ty>ab
r243
3150{{{#!if au-=1, ab+=+("1"+pd)
3151}}}}}}{{{#!if au-=tx, ab-=ty
r256
3152}}}}}}
3153{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3154}}}
3155{{{#!if (au==0)&&(ab==0)
3156{{{#!if br=true
3157}}}}}}}}}
3158{{{#!if !br
3159{{{#!if au=au.toString(), ab=ab.toString()
r252
3160}}}{{{#!if tn="", ps=(au.length==18), ps
3161{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3162}}}}}}{{{#!if !ps&&(au.length<17)
3163{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3164}}}}}}{{{#!if ab.length<18
3165{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3166}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3167}}}}}}
r243
3168##i=32
3169{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3170{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3171}}}{{{#!if ty=ty.toString(), ty.length==19
3172{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3173}}}}}}
3174{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3175{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3176}}}{{{#!if ty=ty.toString(), ty.length==19
3177{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3178}}}}}}{{{#!if ty=+ty
3179}}}}}}
3180{{{#!if ty>ab
3181{{{#!if tn-=1, ab+=+("1"+pd)
3182}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3183}}}}}}
3184{{{#!if !br
r249
3185{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3186{{{#!if ps=true, tw=0
r243
3187}}}}}}
3188{{{#!if !ps
3189{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3190}}}{{{#!if ty=ty.toString(), ty.length==19
3191{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3192}}}}}}
3193{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3194{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3195}}}{{{#!if ty=ty.toString(), ty.length==19
3196{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3197}}}}}}{{{#!if ty=+ty
3198}}}}}}
r256
3199{{{#!if ty>ab
r243
3200{{{#!if au-=1, ab+=+("1"+pd)
3201}}}}}}{{{#!if au-=tx, ab-=ty
r256
3202}}}}}}
3203{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3204}}}
3205{{{#!if (au==0)&&(ab==0)
3206{{{#!if br=true
3207}}}}}}}}}
3208{{{#!if !br
3209{{{#!if au=au.toString(), ab=ab.toString()
r252
3210}}}{{{#!if tn="", ps=(au.length==18), ps
3211{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3212}}}}}}{{{#!if !ps&&(au.length<17)
3213{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3214}}}}}}{{{#!if ab.length<18
3215{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3216}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3217}}}}}}
r243
3218##i=33
3219{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3220{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3221}}}{{{#!if ty=ty.toString(), ty.length==19
3222{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3223}}}}}}
3224{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3225{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3226}}}{{{#!if ty=ty.toString(), ty.length==19
3227{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3228}}}}}}{{{#!if ty=+ty
3229}}}}}}
3230{{{#!if ty>ab
3231{{{#!if tn-=1, ab+=+("1"+pd)
3232}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3233}}}}}}
3234{{{#!if !br
r249
3235{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3236{{{#!if ps=true, tw=0
r243
3237}}}}}}
3238{{{#!if !ps
3239{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3240}}}{{{#!if ty=ty.toString(), ty.length==19
3241{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3242}}}}}}
3243{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3244{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3245}}}{{{#!if ty=ty.toString(), ty.length==19
3246{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3247}}}}}}{{{#!if ty=+ty
3248}}}}}}
r256
3249{{{#!if ty>ab
r243
3250{{{#!if au-=1, ab+=+("1"+pd)
3251}}}}}}{{{#!if au-=tx, ab-=ty
r256
3252}}}}}}
3253{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3254}}}
3255{{{#!if (au==0)&&(ab==0)
3256{{{#!if br=true
3257}}}}}}}}}
3258{{{#!if !br
3259{{{#!if au=au.toString(), ab=ab.toString()
r252
3260}}}{{{#!if tn="", ps=(au.length==18), ps
3261{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3262}}}}}}{{{#!if !ps&&(au.length<17)
3263{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3264}}}}}}{{{#!if ab.length<18
3265{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3266}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3267}}}}}}
r243
3268##i=34
3269{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3270{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3271}}}{{{#!if ty=ty.toString(), ty.length==19
3272{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3273}}}}}}
3274{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3275{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3276}}}{{{#!if ty=ty.toString(), ty.length==19
3277{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3278}}}}}}{{{#!if ty=+ty
3279}}}}}}
3280{{{#!if ty>ab
3281{{{#!if tn-=1, ab+=+("1"+pd)
3282}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3283}}}}}}
3284{{{#!if !br
r249
3285{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3286{{{#!if ps=true, tw=0
r243
3287}}}}}}
3288{{{#!if !ps
3289{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3290}}}{{{#!if ty=ty.toString(), ty.length==19
3291{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3292}}}}}}
3293{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3294{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3295}}}{{{#!if ty=ty.toString(), ty.length==19
3296{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3297}}}}}}{{{#!if ty=+ty
3298}}}}}}
r256
3299{{{#!if ty>ab
r243
3300{{{#!if au-=1, ab+=+("1"+pd)
3301}}}}}}{{{#!if au-=tx, ab-=ty
r256
3302}}}}}}
3303{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3304}}}
3305{{{#!if (au==0)&&(ab==0)
3306{{{#!if br=true
3307}}}}}}}}}
3308{{{#!if !br
3309{{{#!if au=au.toString(), ab=ab.toString()
r252
3310}}}{{{#!if tn="", ps=(au.length==18), ps
3311{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3312}}}}}}{{{#!if !ps&&(au.length<17)
3313{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3314}}}}}}{{{#!if ab.length<18
3315{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3316}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3317}}}}}}
r243
3318##i=35
3319{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3320{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3321}}}{{{#!if ty=ty.toString(), ty.length==19
3322{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3323}}}}}}
3324{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3325{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3326}}}{{{#!if ty=ty.toString(), ty.length==19
3327{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3328}}}}}}{{{#!if ty=+ty
3329}}}}}}
3330{{{#!if ty>ab
3331{{{#!if tn-=1, ab+=+("1"+pd)
3332}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3333}}}}}}
3334{{{#!if !br
r249
3335{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3336{{{#!if ps=true, tw=0
r243
3337}}}}}}
3338{{{#!if !ps
3339{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3340}}}{{{#!if ty=ty.toString(), ty.length==19
3341{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3342}}}}}}
3343{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3344{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3345}}}{{{#!if ty=ty.toString(), ty.length==19
3346{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3347}}}}}}{{{#!if ty=+ty
3348}}}}}}
r256
3349{{{#!if ty>ab
r243
3350{{{#!if au-=1, ab+=+("1"+pd)
3351}}}}}}{{{#!if au-=tx, ab-=ty
r256
3352}}}}}}
3353{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3354}}}
3355{{{#!if (au==0)&&(ab==0)
3356{{{#!if br=true
3357}}}}}}}}}
3358{{{#!if !br
3359{{{#!if au=au.toString(), ab=ab.toString()
r252
3360}}}{{{#!if tn="", ps=(au.length==18), ps
3361{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3362}}}}}}{{{#!if !ps&&(au.length<17)
3363{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3364}}}}}}{{{#!if ab.length<18
3365{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3366}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3367}}}}}}
r243
3368##i=36
3369{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3370{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3371}}}{{{#!if ty=ty.toString(), ty.length==19
3372{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3373}}}}}}
3374{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3375{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3376}}}{{{#!if ty=ty.toString(), ty.length==19
3377{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3378}}}}}}{{{#!if ty=+ty
3379}}}}}}
3380{{{#!if ty>ab
3381{{{#!if tn-=1, ab+=+("1"+pd)
3382}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3383}}}}}}
3384{{{#!if !br
r249
3385{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3386{{{#!if ps=true, tw=0
r243
3387}}}}}}
3388{{{#!if !ps
3389{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3390}}}{{{#!if ty=ty.toString(), ty.length==19
3391{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3392}}}}}}
3393{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3394{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3395}}}{{{#!if ty=ty.toString(), ty.length==19
3396{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3397}}}}}}{{{#!if ty=+ty
3398}}}}}}
r256
3399{{{#!if ty>ab
r243
3400{{{#!if au-=1, ab+=+("1"+pd)
3401}}}}}}{{{#!if au-=tx, ab-=ty
r256
3402}}}}}}
3403{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3404}}}
3405{{{#!if (au==0)&&(ab==0)
3406{{{#!if br=true
3407}}}}}}}}}
3408{{{#!if !br
3409{{{#!if au=au.toString(), ab=ab.toString()
r252
3410}}}{{{#!if tn="", ps=(au.length==18), ps
3411{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3412}}}}}}{{{#!if !ps&&(au.length<17)
3413{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3414}}}}}}{{{#!if ab.length<18
3415{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3416}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3417}}}}}}
r243
3418##i=37
3419{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3420{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3421}}}{{{#!if ty=ty.toString(), ty.length==19
3422{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3423}}}}}}
3424{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3425{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3426}}}{{{#!if ty=ty.toString(), ty.length==19
3427{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3428}}}}}}{{{#!if ty=+ty
3429}}}}}}
3430{{{#!if ty>ab
3431{{{#!if tn-=1, ab+=+("1"+pd)
3432}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3433}}}}}}
3434{{{#!if !br
r249
3435{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3436{{{#!if ps=true, tw=0
r243
3437}}}}}}
3438{{{#!if !ps
3439{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3440}}}{{{#!if ty=ty.toString(), ty.length==19
3441{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3442}}}}}}
3443{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3444{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3445}}}{{{#!if ty=ty.toString(), ty.length==19
3446{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3447}}}}}}{{{#!if ty=+ty
3448}}}}}}
r256
3449{{{#!if ty>ab
r243
3450{{{#!if au-=1, ab+=+("1"+pd)
3451}}}}}}{{{#!if au-=tx, ab-=ty
r256
3452}}}}}}
3453{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3454}}}
3455{{{#!if (au==0)&&(ab==0)
3456{{{#!if br=true
3457}}}}}}}}}
3458{{{#!if !br
3459{{{#!if au=au.toString(), ab=ab.toString()
r252
3460}}}{{{#!if tn="", ps=(au.length==18), ps
3461{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3462}}}}}}{{{#!if !ps&&(au.length<17)
3463{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3464}}}}}}{{{#!if ab.length<18
3465{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3466}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3467}}}}}}
r243
3468##i=38
3469{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3470{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3471}}}{{{#!if ty=ty.toString(), ty.length==19
3472{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3473}}}}}}
3474{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3475{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3476}}}{{{#!if ty=ty.toString(), ty.length==19
3477{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3478}}}}}}{{{#!if ty=+ty
3479}}}}}}
3480{{{#!if ty>ab
3481{{{#!if tn-=1, ab+=+("1"+pd)
3482}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3483}}}}}}
3484{{{#!if !br
r249
3485{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3486{{{#!if ps=true, tw=0
r243
3487}}}}}}
3488{{{#!if !ps
3489{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3490}}}{{{#!if ty=ty.toString(), ty.length==19
3491{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3492}}}}}}
3493{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3494{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3495}}}{{{#!if ty=ty.toString(), ty.length==19
3496{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3497}}}}}}{{{#!if ty=+ty
3498}}}}}}
r256
3499{{{#!if ty>ab
r243
3500{{{#!if au-=1, ab+=+("1"+pd)
3501}}}}}}{{{#!if au-=tx, ab-=ty
r256
3502}}}}}}
3503{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3504}}}
3505{{{#!if (au==0)&&(ab==0)
3506{{{#!if br=true
3507}}}}}}}}}
3508{{{#!if !br
3509{{{#!if au=au.toString(), ab=ab.toString()
r252
3510}}}{{{#!if tn="", ps=(au.length==18), ps
3511{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3512}}}}}}{{{#!if !ps&&(au.length<17)
3513{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3514}}}}}}{{{#!if ab.length<18
3515{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3516}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3517}}}}}}
r243
3518##i=39
3519{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3520{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
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>tn)||((tx==tn)&&(ty>0))
3525{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
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 ty>ab
3531{{{#!if tn-=1, ab+=+("1"+pd)
3532}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3533}}}}}}
3534{{{#!if !br
r249
3535{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3536{{{#!if ps=true, tw=0
r243
3537}}}}}}
3538{{{#!if !ps
3539{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3540}}}{{{#!if ty=ty.toString(), ty.length==19
3541{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3542}}}}}}
3543{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3544{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3545}}}{{{#!if ty=ty.toString(), ty.length==19
3546{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3547}}}}}}{{{#!if ty=+ty
3548}}}}}}
r256
3549{{{#!if ty>ab
r243
3550{{{#!if au-=1, ab+=+("1"+pd)
3551}}}}}}{{{#!if au-=tx, ab-=ty
r256
3552}}}}}}
3553{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3554}}}
3555{{{#!if (au==0)&&(ab==0)
3556{{{#!if br=true
3557}}}}}}}}}
3558{{{#!if !br
3559{{{#!if au=au.toString(), ab=ab.toString()
r252
3560}}}{{{#!if tn="", ps=(au.length==18), ps
3561{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3562}}}}}}{{{#!if !ps&&(au.length<17)
3563{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3564}}}}}}{{{#!if ab.length<18
3565{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3566}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3567}}}}}}
r243
3568##i=40
3569{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3570{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3571}}}{{{#!if ty=ty.toString(), ty.length==19
3572{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3573}}}}}}
3574{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3575{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3576}}}{{{#!if ty=ty.toString(), ty.length==19
3577{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3578}}}}}}{{{#!if ty=+ty
3579}}}}}}
3580{{{#!if ty>ab
3581{{{#!if tn-=1, ab+=+("1"+pd)
3582}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3583}}}}}}
3584{{{#!if !br
r249
3585{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3586{{{#!if ps=true, tw=0
r243
3587}}}}}}
3588{{{#!if !ps
3589{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3590}}}{{{#!if ty=ty.toString(), ty.length==19
3591{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3592}}}}}}
3593{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3594{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3595}}}{{{#!if ty=ty.toString(), ty.length==19
3596{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3597}}}}}}{{{#!if ty=+ty
3598}}}}}}
r256
3599{{{#!if ty>ab
r243
3600{{{#!if au-=1, ab+=+("1"+pd)
3601}}}}}}{{{#!if au-=tx, ab-=ty
r256
3602}}}}}}
3603{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3604}}}
3605{{{#!if (au==0)&&(ab==0)
3606{{{#!if br=true
3607}}}}}}}}}
3608{{{#!if !br
3609{{{#!if au=au.toString(), ab=ab.toString()
r252
3610}}}{{{#!if tn="", ps=(au.length==18), ps
3611{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3612}}}}}}{{{#!if !ps&&(au.length<17)
3613{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3614}}}}}}{{{#!if ab.length<18
3615{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3616}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3617}}}}}}
r243
3618##i=41
3619{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3620{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3621}}}{{{#!if ty=ty.toString(), ty.length==19
3622{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3623}}}}}}
3624{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3625{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3626}}}{{{#!if ty=ty.toString(), ty.length==19
3627{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3628}}}}}}{{{#!if ty=+ty
3629}}}}}}
3630{{{#!if ty>ab
3631{{{#!if tn-=1, ab+=+("1"+pd)
3632}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3633}}}}}}
3634{{{#!if !br
r249
3635{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3636{{{#!if ps=true, tw=0
r243
3637}}}}}}
3638{{{#!if !ps
3639{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3640}}}{{{#!if ty=ty.toString(), ty.length==19
3641{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3642}}}}}}
3643{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3644{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3645}}}{{{#!if ty=ty.toString(), ty.length==19
3646{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3647}}}}}}{{{#!if ty=+ty
3648}}}}}}
r256
3649{{{#!if ty>ab
r243
3650{{{#!if au-=1, ab+=+("1"+pd)
3651}}}}}}{{{#!if au-=tx, ab-=ty
r256
3652}}}}}}
3653{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3654}}}
3655{{{#!if (au==0)&&(ab==0)
3656{{{#!if br=true
3657}}}}}}}}}
3658{{{#!if !br
3659{{{#!if au=au.toString(), ab=ab.toString()
r252
3660}}}{{{#!if tn="", ps=(au.length==18), ps
3661{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3662}}}}}}{{{#!if !ps&&(au.length<17)
3663{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3664}}}}}}{{{#!if ab.length<18
3665{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3666}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3667}}}}}}
r243
3668##i=42
3669{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3670{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3671}}}{{{#!if ty=ty.toString(), ty.length==19
3672{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3673}}}}}}
3674{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3675{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3676}}}{{{#!if ty=ty.toString(), ty.length==19
3677{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3678}}}}}}{{{#!if ty=+ty
3679}}}}}}
3680{{{#!if ty>ab
3681{{{#!if tn-=1, ab+=+("1"+pd)
3682}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3683}}}}}}
3684{{{#!if !br
r249
3685{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3686{{{#!if ps=true, tw=0
r243
3687}}}}}}
3688{{{#!if !ps
3689{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3690}}}{{{#!if ty=ty.toString(), ty.length==19
3691{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3692}}}}}}
3693{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3694{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3695}}}{{{#!if ty=ty.toString(), ty.length==19
3696{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3697}}}}}}{{{#!if ty=+ty
3698}}}}}}
r256
3699{{{#!if ty>ab
r243
3700{{{#!if au-=1, ab+=+("1"+pd)
3701}}}}}}{{{#!if au-=tx, ab-=ty
r256
3702}}}}}}
3703{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3704}}}
3705{{{#!if (au==0)&&(ab==0)
3706{{{#!if br=true
3707}}}}}}}}}
3708{{{#!if !br
3709{{{#!if au=au.toString(), ab=ab.toString()
r252
3710}}}{{{#!if tn="", ps=(au.length==18), ps
3711{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3712}}}}}}{{{#!if !ps&&(au.length<17)
3713{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3714}}}}}}{{{#!if ab.length<18
3715{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3716}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3717}}}}}}
r243
3718##i=43
3719{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3720{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3721}}}{{{#!if ty=ty.toString(), ty.length==19
3722{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3723}}}}}}
3724{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3725{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3726}}}{{{#!if ty=ty.toString(), ty.length==19
3727{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3728}}}}}}{{{#!if ty=+ty
3729}}}}}}
3730{{{#!if ty>ab
3731{{{#!if tn-=1, ab+=+("1"+pd)
3732}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3733}}}}}}
3734{{{#!if !br
r249
3735{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3736{{{#!if ps=true, tw=0
r243
3737}}}}}}
3738{{{#!if !ps
3739{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3740}}}{{{#!if ty=ty.toString(), ty.length==19
3741{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3742}}}}}}
3743{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3744{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3745}}}{{{#!if ty=ty.toString(), ty.length==19
3746{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3747}}}}}}{{{#!if ty=+ty
3748}}}}}}
r256
3749{{{#!if ty>ab
r243
3750{{{#!if au-=1, ab+=+("1"+pd)
3751}}}}}}{{{#!if au-=tx, ab-=ty
r256
3752}}}}}}
3753{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3754}}}
3755{{{#!if (au==0)&&(ab==0)
3756{{{#!if br=true
3757}}}}}}}}}
3758{{{#!if !br
3759{{{#!if au=au.toString(), ab=ab.toString()
r252
3760}}}{{{#!if tn="", ps=(au.length==18), ps
3761{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3762}}}}}}{{{#!if !ps&&(au.length<17)
3763{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3764}}}}}}{{{#!if ab.length<18
3765{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3766}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3767}}}}}}
r243
3768##i=44
3769{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3770{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3771}}}{{{#!if ty=ty.toString(), ty.length==19
3772{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3773}}}}}}
3774{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3775{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3776}}}{{{#!if ty=ty.toString(), ty.length==19
3777{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3778}}}}}}{{{#!if ty=+ty
3779}}}}}}
3780{{{#!if ty>ab
3781{{{#!if tn-=1, ab+=+("1"+pd)
3782}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3783}}}}}}
3784{{{#!if !br
r249
3785{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3786{{{#!if ps=true, tw=0
r243
3787}}}}}}
3788{{{#!if !ps
3789{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3790}}}{{{#!if ty=ty.toString(), ty.length==19
3791{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3792}}}}}}
3793{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3794{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3795}}}{{{#!if ty=ty.toString(), ty.length==19
3796{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3797}}}}}}{{{#!if ty=+ty
3798}}}}}}
r256
3799{{{#!if ty>ab
r243
3800{{{#!if au-=1, ab+=+("1"+pd)
3801}}}}}}{{{#!if au-=tx, ab-=ty
r256
3802}}}}}}
3803{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3804}}}
3805{{{#!if (au==0)&&(ab==0)
3806{{{#!if br=true
3807}}}}}}}}}
3808{{{#!if !br
3809{{{#!if au=au.toString(), ab=ab.toString()
r252
3810}}}{{{#!if tn="", ps=(au.length==18), ps
3811{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3812}}}}}}{{{#!if !ps&&(au.length<17)
3813{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3814}}}}}}{{{#!if ab.length<18
3815{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3816}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3817}}}}}}
r243
3818##i=45
3819{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3820{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3821}}}{{{#!if ty=ty.toString(), ty.length==19
3822{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3823}}}}}}
3824{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3825{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3826}}}{{{#!if ty=ty.toString(), ty.length==19
3827{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3828}}}}}}{{{#!if ty=+ty
3829}}}}}}
3830{{{#!if ty>ab
3831{{{#!if tn-=1, ab+=+("1"+pd)
3832}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3833}}}}}}
3834{{{#!if !br
r249
3835{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3836{{{#!if ps=true, tw=0
r243
3837}}}}}}
3838{{{#!if !ps
3839{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3840}}}{{{#!if ty=ty.toString(), ty.length==19
3841{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3842}}}}}}
3843{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3844{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3845}}}{{{#!if ty=ty.toString(), ty.length==19
3846{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3847}}}}}}{{{#!if ty=+ty
3848}}}}}}
r256
3849{{{#!if ty>ab
r243
3850{{{#!if au-=1, ab+=+("1"+pd)
3851}}}}}}{{{#!if au-=tx, ab-=ty
r256
3852}}}}}}
3853{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3854}}}
3855{{{#!if (au==0)&&(ab==0)
3856{{{#!if br=true
3857}}}}}}}}}
3858{{{#!if !br
3859{{{#!if au=au.toString(), ab=ab.toString()
r252
3860}}}{{{#!if tn="", ps=(au.length==18), ps
3861{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3862}}}}}}{{{#!if !ps&&(au.length<17)
3863{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3864}}}}}}{{{#!if ab.length<18
3865{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3866}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3867}}}}}}
r243
3868##i=46
3869{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3870{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3871}}}{{{#!if ty=ty.toString(), ty.length==19
3872{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3873}}}}}}
3874{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3875{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3876}}}{{{#!if ty=ty.toString(), ty.length==19
3877{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3878}}}}}}{{{#!if ty=+ty
3879}}}}}}
3880{{{#!if ty>ab
3881{{{#!if tn-=1, ab+=+("1"+pd)
3882}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3883}}}}}}
3884{{{#!if !br
r249
3885{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3886{{{#!if ps=true, tw=0
r243
3887}}}}}}
3888{{{#!if !ps
3889{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3890}}}{{{#!if ty=ty.toString(), ty.length==19
3891{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3892}}}}}}
3893{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3894{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3895}}}{{{#!if ty=ty.toString(), ty.length==19
3896{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3897}}}}}}{{{#!if ty=+ty
3898}}}}}}
r256
3899{{{#!if ty>ab
r243
3900{{{#!if au-=1, ab+=+("1"+pd)
3901}}}}}}{{{#!if au-=tx, ab-=ty
r256
3902}}}}}}
3903{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3904}}}
3905{{{#!if (au==0)&&(ab==0)
3906{{{#!if br=true
3907}}}}}}}}}
3908{{{#!if !br
3909{{{#!if au=au.toString(), ab=ab.toString()
r252
3910}}}{{{#!if tn="", ps=(au.length==18), ps
3911{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3912}}}}}}{{{#!if !ps&&(au.length<17)
3913{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3914}}}}}}{{{#!if ab.length<18
3915{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3916}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3917}}}}}}
r243
3918##i=47
3919{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3920{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3921}}}{{{#!if ty=ty.toString(), ty.length==19
3922{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3923}}}}}}
3924{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3925{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3926}}}{{{#!if ty=ty.toString(), ty.length==19
3927{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3928}}}}}}{{{#!if ty=+ty
3929}}}}}}
3930{{{#!if ty>ab
3931{{{#!if tn-=1, ab+=+("1"+pd)
3932}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3933}}}}}}
3934{{{#!if !br
r249
3935{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3936{{{#!if ps=true, tw=0
r243
3937}}}}}}
3938{{{#!if !ps
3939{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3940}}}{{{#!if ty=ty.toString(), ty.length==19
3941{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3942}}}}}}
3943{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3944{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3945}}}{{{#!if ty=ty.toString(), ty.length==19
3946{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3947}}}}}}{{{#!if ty=+ty
3948}}}}}}
r256
3949{{{#!if ty>ab
r243
3950{{{#!if au-=1, ab+=+("1"+pd)
3951}}}}}}{{{#!if au-=tx, ab-=ty
r256
3952}}}}}}
3953{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
3954}}}
3955{{{#!if (au==0)&&(ab==0)
3956{{{#!if br=true
3957}}}}}}}}}
3958{{{#!if !br
3959{{{#!if au=au.toString(), ab=ab.toString()
r252
3960}}}{{{#!if tn="", ps=(au.length==18), ps
3961{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
3962}}}}}}{{{#!if !ps&&(au.length<17)
3963{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
3964}}}}}}{{{#!if ab.length<18
3965{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
3966}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
3967}}}}}}
r243
3968##i=48
3969{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
3970{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
3971}}}{{{#!if ty=ty.toString(), ty.length==19
3972{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3973}}}}}}
3974{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
3975{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
3976}}}{{{#!if ty=ty.toString(), ty.length==19
3977{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3978}}}}}}{{{#!if ty=+ty
3979}}}}}}
3980{{{#!if ty>ab
3981{{{#!if tn-=1, ab+=+("1"+pd)
3982}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
3983}}}}}}
3984{{{#!if !br
r249
3985{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
3986{{{#!if ps=true, tw=0
r243
3987}}}}}}
3988{{{#!if !ps
3989{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
3990}}}{{{#!if ty=ty.toString(), ty.length==19
3991{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3992}}}}}}
3993{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
3994{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
3995}}}{{{#!if ty=ty.toString(), ty.length==19
3996{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
3997}}}}}}{{{#!if ty=+ty
3998}}}}}}
r256
3999{{{#!if ty>ab
r243
4000{{{#!if au-=1, ab+=+("1"+pd)
4001}}}}}}{{{#!if au-=tx, ab-=ty
r256
4002}}}}}}
4003{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4004}}}
4005{{{#!if (au==0)&&(ab==0)
4006{{{#!if br=true
4007}}}}}}}}}
4008{{{#!if !br
4009{{{#!if au=au.toString(), ab=ab.toString()
r252
4010}}}{{{#!if tn="", ps=(au.length==18), ps
4011{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4012}}}}}}{{{#!if !ps&&(au.length<17)
4013{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4014}}}}}}{{{#!if ab.length<18
4015{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4016}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4017}}}}}}
r243
4018##i=49
4019{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4020{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4021}}}{{{#!if ty=ty.toString(), ty.length==19
4022{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4023}}}}}}
4024{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4025{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4026}}}{{{#!if ty=ty.toString(), ty.length==19
4027{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4028}}}}}}{{{#!if ty=+ty
4029}}}}}}
4030{{{#!if ty>ab
4031{{{#!if tn-=1, ab+=+("1"+pd)
4032}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4033}}}}}}
4034{{{#!if !br
r249
4035{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4036{{{#!if ps=true, tw=0
r243
4037}}}}}}
4038{{{#!if !ps
4039{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4040}}}{{{#!if ty=ty.toString(), ty.length==19
4041{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4042}}}}}}
4043{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4044{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4045}}}{{{#!if ty=ty.toString(), ty.length==19
4046{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4047}}}}}}{{{#!if ty=+ty
4048}}}}}}
r256
4049{{{#!if ty>ab
r243
4050{{{#!if au-=1, ab+=+("1"+pd)
4051}}}}}}{{{#!if au-=tx, ab-=ty
r256
4052}}}}}}
4053{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4054}}}
4055{{{#!if (au==0)&&(ab==0)
4056{{{#!if br=true
4057}}}}}}}}}
4058{{{#!if !br
4059{{{#!if au=au.toString(), ab=ab.toString()
r252
4060}}}{{{#!if tn="", ps=(au.length==18), ps
4061{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4062}}}}}}{{{#!if !ps&&(au.length<17)
4063{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4064}}}}}}{{{#!if ab.length<18
4065{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4066}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4067}}}}}}
r243
4068##i=50
4069{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4070{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4071}}}{{{#!if ty=ty.toString(), ty.length==19
4072{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4073}}}}}}
4074{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4075{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4076}}}{{{#!if ty=ty.toString(), ty.length==19
4077{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4078}}}}}}{{{#!if ty=+ty
4079}}}}}}
4080{{{#!if ty>ab
4081{{{#!if tn-=1, ab+=+("1"+pd)
4082}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4083}}}}}}
4084{{{#!if !br
r249
4085{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4086{{{#!if ps=true, tw=0
r243
4087}}}}}}
4088{{{#!if !ps
4089{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
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>au)||((tx==au)&&(ty>ab))
4094{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
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}}}}}}
r256
4099{{{#!if ty>ab
r243
4100{{{#!if au-=1, ab+=+("1"+pd)
4101}}}}}}{{{#!if au-=tx, ab-=ty
r256
4102}}}}}}
4103{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4104}}}
4105{{{#!if (au==0)&&(ab==0)
4106{{{#!if br=true
4107}}}}}}}}}
4108{{{#!if !br
4109{{{#!if au=au.toString(), ab=ab.toString()
r252
4110}}}{{{#!if tn="", ps=(au.length==18), ps
4111{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4112}}}}}}{{{#!if !ps&&(au.length<17)
4113{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4114}}}}}}{{{#!if ab.length<18
4115{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4116}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4117}}}}}}
r243
4118##i=51
4119{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4120{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4121}}}{{{#!if ty=ty.toString(), ty.length==19
4122{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4123}}}}}}
4124{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4125{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4126}}}{{{#!if ty=ty.toString(), ty.length==19
4127{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4128}}}}}}{{{#!if ty=+ty
4129}}}}}}
4130{{{#!if ty>ab
4131{{{#!if tn-=1, ab+=+("1"+pd)
4132}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4133}}}}}}
4134{{{#!if !br
r249
4135{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4136{{{#!if ps=true, tw=0
r243
4137}}}}}}
4138{{{#!if !ps
4139{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4140}}}{{{#!if ty=ty.toString(), ty.length==19
4141{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4142}}}}}}
4143{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4144{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4145}}}{{{#!if ty=ty.toString(), ty.length==19
4146{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4147}}}}}}{{{#!if ty=+ty
4148}}}}}}
r256
4149{{{#!if ty>ab
r243
4150{{{#!if au-=1, ab+=+("1"+pd)
4151}}}}}}{{{#!if au-=tx, ab-=ty
r256
4152}}}}}}
4153{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4154}}}
4155{{{#!if (au==0)&&(ab==0)
4156{{{#!if br=true
4157}}}}}}}}}
4158{{{#!if !br
4159{{{#!if au=au.toString(), ab=ab.toString()
r252
4160}}}{{{#!if tn="", ps=(au.length==18), ps
4161{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4162}}}}}}{{{#!if !ps&&(au.length<17)
4163{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4164}}}}}}{{{#!if ab.length<18
4165{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4166}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4167}}}}}}
r243
4168##i=52
4169{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4170{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4171}}}{{{#!if ty=ty.toString(), ty.length==19
4172{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4173}}}}}}
4174{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4175{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4176}}}{{{#!if ty=ty.toString(), ty.length==19
4177{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4178}}}}}}{{{#!if ty=+ty
4179}}}}}}
4180{{{#!if ty>ab
4181{{{#!if tn-=1, ab+=+("1"+pd)
4182}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4183}}}}}}
4184{{{#!if !br
r249
4185{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4186{{{#!if ps=true, tw=0
r243
4187}}}}}}
4188{{{#!if !ps
4189{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4190}}}{{{#!if ty=ty.toString(), ty.length==19
4191{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4192}}}}}}
4193{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4194{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4195}}}{{{#!if ty=ty.toString(), ty.length==19
4196{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4197}}}}}}{{{#!if ty=+ty
4198}}}}}}
r256
4199{{{#!if ty>ab
r243
4200{{{#!if au-=1, ab+=+("1"+pd)
4201}}}}}}{{{#!if au-=tx, ab-=ty
r256
4202}}}}}}
4203{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4204}}}
4205{{{#!if (au==0)&&(ab==0)
4206{{{#!if br=true
4207}}}}}}}}}
4208{{{#!if !br
4209{{{#!if au=au.toString(), ab=ab.toString()
r252
4210}}}{{{#!if tn="", ps=(au.length==18), ps
4211{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4212}}}}}}{{{#!if !ps&&(au.length<17)
4213{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4214}}}}}}{{{#!if ab.length<18
4215{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4216}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4217}}}}}}
r243
4218##i=53
4219{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4220{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4221}}}{{{#!if ty=ty.toString(), ty.length==19
4222{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4223}}}}}}
4224{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4225{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4226}}}{{{#!if ty=ty.toString(), ty.length==19
4227{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4228}}}}}}{{{#!if ty=+ty
4229}}}}}}
4230{{{#!if ty>ab
4231{{{#!if tn-=1, ab+=+("1"+pd)
4232}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4233}}}}}}
4234{{{#!if !br
r249
4235{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4236{{{#!if ps=true, tw=0
r243
4237}}}}}}
4238{{{#!if !ps
4239{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4240}}}{{{#!if ty=ty.toString(), ty.length==19
4241{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4242}}}}}}
4243{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4244{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4245}}}{{{#!if ty=ty.toString(), ty.length==19
4246{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4247}}}}}}{{{#!if ty=+ty
4248}}}}}}
r256
4249{{{#!if ty>ab
r243
4250{{{#!if au-=1, ab+=+("1"+pd)
4251}}}}}}{{{#!if au-=tx, ab-=ty
r256
4252}}}}}}
4253{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4254}}}
4255{{{#!if (au==0)&&(ab==0)
4256{{{#!if br=true
4257}}}}}}}}}
4258{{{#!if !br
4259{{{#!if au=au.toString(), ab=ab.toString()
r252
4260}}}{{{#!if tn="", ps=(au.length==18), ps
4261{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4262}}}}}}{{{#!if !ps&&(au.length<17)
4263{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4264}}}}}}{{{#!if ab.length<18
4265{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4266}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4267}}}}}}
r243
4268##i=54
4269{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4270{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4271}}}{{{#!if ty=ty.toString(), ty.length==19
4272{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4273}}}}}}
4274{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4275{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4276}}}{{{#!if ty=ty.toString(), ty.length==19
4277{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4278}}}}}}{{{#!if ty=+ty
4279}}}}}}
4280{{{#!if ty>ab
4281{{{#!if tn-=1, ab+=+("1"+pd)
4282}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4283}}}}}}
4284{{{#!if !br
r249
4285{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4286{{{#!if ps=true, tw=0
r243
4287}}}}}}
4288{{{#!if !ps
4289{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4290}}}{{{#!if ty=ty.toString(), ty.length==19
4291{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4292}}}}}}
4293{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4294{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4295}}}{{{#!if ty=ty.toString(), ty.length==19
4296{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4297}}}}}}{{{#!if ty=+ty
4298}}}}}}
r256
4299{{{#!if ty>ab
r243
4300{{{#!if au-=1, ab+=+("1"+pd)
4301}}}}}}{{{#!if au-=tx, ab-=ty
r256
4302}}}}}}
4303{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4304}}}
4305{{{#!if (au==0)&&(ab==0)
4306{{{#!if br=true
4307}}}}}}}}}
4308{{{#!if !br
4309{{{#!if au=au.toString(), ab=ab.toString()
r252
4310}}}{{{#!if tn="", ps=(au.length==18), ps
4311{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4312}}}}}}{{{#!if !ps&&(au.length<17)
4313{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4314}}}}}}{{{#!if ab.length<18
4315{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4316}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4317}}}}}}
r243
4318##i=55
4319{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4320{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4321}}}{{{#!if ty=ty.toString(), ty.length==19
4322{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4323}}}}}}
4324{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4325{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4326}}}{{{#!if ty=ty.toString(), ty.length==19
4327{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4328}}}}}}{{{#!if ty=+ty
4329}}}}}}
4330{{{#!if ty>ab
4331{{{#!if tn-=1, ab+=+("1"+pd)
4332}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4333}}}}}}
4334{{{#!if !br
r249
4335{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4336{{{#!if ps=true, tw=0
r243
4337}}}}}}
4338{{{#!if !ps
4339{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4340}}}{{{#!if ty=ty.toString(), ty.length==19
4341{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4342}}}}}}
4343{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4344{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4345}}}{{{#!if ty=ty.toString(), ty.length==19
4346{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4347}}}}}}{{{#!if ty=+ty
4348}}}}}}
r256
4349{{{#!if ty>ab
r243
4350{{{#!if au-=1, ab+=+("1"+pd)
4351}}}}}}{{{#!if au-=tx, ab-=ty
r256
4352}}}}}}
4353{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4354}}}
4355{{{#!if (au==0)&&(ab==0)
4356{{{#!if br=true
4357}}}}}}}}}
4358{{{#!if !br
4359{{{#!if au=au.toString(), ab=ab.toString()
r252
4360}}}{{{#!if tn="", ps=(au.length==18), ps
4361{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4362}}}}}}{{{#!if !ps&&(au.length<17)
4363{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4364}}}}}}{{{#!if ab.length<18
4365{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4366}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4367}}}}}}
r243
4368##i=56
4369{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4370{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4371}}}{{{#!if ty=ty.toString(), ty.length==19
4372{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4373}}}}}}
4374{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4375{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4376}}}{{{#!if ty=ty.toString(), ty.length==19
4377{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4378}}}}}}{{{#!if ty=+ty
4379}}}}}}
4380{{{#!if ty>ab
4381{{{#!if tn-=1, ab+=+("1"+pd)
4382}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4383}}}}}}
4384{{{#!if !br
r249
4385{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4386{{{#!if ps=true, tw=0
r243
4387}}}}}}
4388{{{#!if !ps
4389{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4390}}}{{{#!if ty=ty.toString(), ty.length==19
4391{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4392}}}}}}
4393{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4394{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4395}}}{{{#!if ty=ty.toString(), ty.length==19
4396{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4397}}}}}}{{{#!if ty=+ty
4398}}}}}}
r256
4399{{{#!if ty>ab
r243
4400{{{#!if au-=1, ab+=+("1"+pd)
4401}}}}}}{{{#!if au-=tx, ab-=ty
r256
4402}}}}}}
4403{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4404}}}
4405{{{#!if (au==0)&&(ab==0)
4406{{{#!if br=true
4407}}}}}}}}}
4408{{{#!if !br
4409{{{#!if au=au.toString(), ab=ab.toString()
r252
4410}}}{{{#!if tn="", ps=(au.length==18), ps
4411{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4412}}}}}}{{{#!if !ps&&(au.length<17)
4413{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4414}}}}}}{{{#!if ab.length<18
4415{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4416}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4417}}}}}}
r243
4418##i=57
4419{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4420{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4421}}}{{{#!if ty=ty.toString(), ty.length==19
4422{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4423}}}}}}
4424{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4425{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4426}}}{{{#!if ty=ty.toString(), ty.length==19
4427{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4428}}}}}}{{{#!if ty=+ty
4429}}}}}}
4430{{{#!if ty>ab
4431{{{#!if tn-=1, ab+=+("1"+pd)
4432}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4433}}}}}}
4434{{{#!if !br
r249
4435{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4436{{{#!if ps=true, tw=0
r243
4437}}}}}}
4438{{{#!if !ps
4439{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4440}}}{{{#!if ty=ty.toString(), ty.length==19
4441{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4442}}}}}}
4443{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4444{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4445}}}{{{#!if ty=ty.toString(), ty.length==19
4446{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4447}}}}}}{{{#!if ty=+ty
4448}}}}}}
r256
4449{{{#!if ty>ab
r243
4450{{{#!if au-=1, ab+=+("1"+pd)
4451}}}}}}{{{#!if au-=tx, ab-=ty
r256
4452}}}}}}
4453{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4454}}}
4455{{{#!if (au==0)&&(ab==0)
4456{{{#!if br=true
4457}}}}}}}}}
4458{{{#!if !br
4459{{{#!if au=au.toString(), ab=ab.toString()
r252
4460}}}{{{#!if tn="", ps=(au.length==18), ps
4461{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4462}}}}}}{{{#!if !ps&&(au.length<17)
4463{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4464}}}}}}{{{#!if ab.length<18
4465{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4466}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4467}}}}}}
r243
4468##i=58
4469{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4470{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4471}}}{{{#!if ty=ty.toString(), ty.length==19
4472{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4473}}}}}}
4474{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4475{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4476}}}{{{#!if ty=ty.toString(), ty.length==19
4477{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4478}}}}}}{{{#!if ty=+ty
4479}}}}}}
4480{{{#!if ty>ab
4481{{{#!if tn-=1, ab+=+("1"+pd)
4482}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4483}}}}}}
4484{{{#!if !br
r249
4485{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4486{{{#!if ps=true, tw=0
r243
4487}}}}}}
4488{{{#!if !ps
4489{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4490}}}{{{#!if ty=ty.toString(), ty.length==19
4491{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4492}}}}}}
4493{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4494{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4495}}}{{{#!if ty=ty.toString(), ty.length==19
4496{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4497}}}}}}{{{#!if ty=+ty
4498}}}}}}
r256
4499{{{#!if ty>ab
r243
4500{{{#!if au-=1, ab+=+("1"+pd)
4501}}}}}}{{{#!if au-=tx, ab-=ty
r256
4502}}}}}}
4503{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4504}}}
4505{{{#!if (au==0)&&(ab==0)
4506{{{#!if br=true
4507}}}}}}}}}
4508{{{#!if !br
4509{{{#!if au=au.toString(), ab=ab.toString()
r252
4510}}}{{{#!if tn="", ps=(au.length==18), ps
4511{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4512}}}}}}{{{#!if !ps&&(au.length<17)
4513{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4514}}}}}}{{{#!if ab.length<18
4515{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4516}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4517}}}}}}
r243
4518##i=59
4519{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4520{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4521}}}{{{#!if ty=ty.toString(), ty.length==19
4522{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4523}}}}}}
4524{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4525{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4526}}}{{{#!if ty=ty.toString(), ty.length==19
4527{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4528}}}}}}{{{#!if ty=+ty
4529}}}}}}
4530{{{#!if ty>ab
4531{{{#!if tn-=1, ab+=+("1"+pd)
4532}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4533}}}}}}
4534{{{#!if !br
r249
4535{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4536{{{#!if ps=true, tw=0
r243
4537}}}}}}
4538{{{#!if !ps
4539{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4540}}}{{{#!if ty=ty.toString(), ty.length==19
4541{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4542}}}}}}
4543{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4544{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4545}}}{{{#!if ty=ty.toString(), ty.length==19
4546{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4547}}}}}}{{{#!if ty=+ty
4548}}}}}}
r256
4549{{{#!if ty>ab
r243
4550{{{#!if au-=1, ab+=+("1"+pd)
4551}}}}}}{{{#!if au-=tx, ab-=ty
r256
4552}}}}}}
4553{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4554}}}
4555{{{#!if (au==0)&&(ab==0)
4556{{{#!if br=true
4557}}}}}}}}}
4558{{{#!if !br
4559{{{#!if au=au.toString(), ab=ab.toString()
r252
4560}}}{{{#!if tn="", ps=(au.length==18), ps
4561{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4562}}}}}}{{{#!if !ps&&(au.length<17)
4563{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4564}}}}}}{{{#!if ab.length<18
4565{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4566}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4567}}}}}}
r243
4568##i=60
4569{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4570{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4571}}}{{{#!if ty=ty.toString(), ty.length==19
4572{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4573}}}}}}
4574{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4575{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4576}}}{{{#!if ty=ty.toString(), ty.length==19
4577{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4578}}}}}}{{{#!if ty=+ty
4579}}}}}}
4580{{{#!if ty>ab
4581{{{#!if tn-=1, ab+=+("1"+pd)
4582}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4583}}}}}}
4584{{{#!if !br
r249
4585{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4586{{{#!if ps=true, tw=0
r243
4587}}}}}}
4588{{{#!if !ps
4589{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4590}}}{{{#!if ty=ty.toString(), ty.length==19
4591{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4592}}}}}}
4593{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4594{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4595}}}{{{#!if ty=ty.toString(), ty.length==19
4596{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4597}}}}}}{{{#!if ty=+ty
4598}}}}}}
r256
4599{{{#!if ty>ab
r243
4600{{{#!if au-=1, ab+=+("1"+pd)
4601}}}}}}{{{#!if au-=tx, ab-=ty
r256
4602}}}}}}
4603{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4604}}}
4605{{{#!if (au==0)&&(ab==0)
4606{{{#!if br=true
4607}}}}}}}}}
4608{{{#!if !br
4609{{{#!if au=au.toString(), ab=ab.toString()
r252
4610}}}{{{#!if tn="", ps=(au.length==18), ps
4611{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4612}}}}}}{{{#!if !ps&&(au.length<17)
4613{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4614}}}}}}{{{#!if ab.length<18
4615{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4616}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4617}}}}}}
r243
4618##i=61
4619{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4620{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4621}}}{{{#!if ty=ty.toString(), ty.length==19
4622{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4623}}}}}}
4624{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4625{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4626}}}{{{#!if ty=ty.toString(), ty.length==19
4627{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4628}}}}}}{{{#!if ty=+ty
4629}}}}}}
4630{{{#!if ty>ab
4631{{{#!if tn-=1, ab+=+("1"+pd)
4632}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4633}}}}}}
4634{{{#!if !br
r249
4635{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4636{{{#!if ps=true, tw=0
r243
4637}}}}}}
4638{{{#!if !ps
4639{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4640}}}{{{#!if ty=ty.toString(), ty.length==19
4641{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4642}}}}}}
4643{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4644{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4645}}}{{{#!if ty=ty.toString(), ty.length==19
4646{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4647}}}}}}{{{#!if ty=+ty
4648}}}}}}
r256
4649{{{#!if ty>ab
r243
4650{{{#!if au-=1, ab+=+("1"+pd)
4651}}}}}}{{{#!if au-=tx, ab-=ty
r256
4652}}}}}}
4653{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4654}}}
4655{{{#!if (au==0)&&(ab==0)
4656{{{#!if br=true
4657}}}}}}}}}
4658{{{#!if !br
4659{{{#!if au=au.toString(), ab=ab.toString()
r252
4660}}}{{{#!if tn="", ps=(au.length==18), ps
4661{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4662}}}}}}{{{#!if !ps&&(au.length<17)
4663{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4664}}}}}}{{{#!if ab.length<18
4665{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4666}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4667}}}}}}
r243
4668##i=62
4669{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4670{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4671}}}{{{#!if ty=ty.toString(), ty.length==19
4672{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4673}}}}}}
4674{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4675{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4676}}}{{{#!if ty=ty.toString(), ty.length==19
4677{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4678}}}}}}{{{#!if ty=+ty
4679}}}}}}
4680{{{#!if ty>ab
4681{{{#!if tn-=1, ab+=+("1"+pd)
4682}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4683}}}}}}
4684{{{#!if !br
r249
4685{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4686{{{#!if ps=true, tw=0
r243
4687}}}}}}
4688{{{#!if !ps
4689{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4690}}}{{{#!if ty=ty.toString(), ty.length==19
4691{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4692}}}}}}
4693{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4694{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4695}}}{{{#!if ty=ty.toString(), ty.length==19
4696{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4697}}}}}}{{{#!if ty=+ty
4698}}}}}}
r256
4699{{{#!if ty>ab
r243
4700{{{#!if au-=1, ab+=+("1"+pd)
4701}}}}}}{{{#!if au-=tx, ab-=ty
r256
4702}}}}}}
4703{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4704}}}
4705{{{#!if (au==0)&&(ab==0)
4706{{{#!if br=true
4707}}}}}}}}}
4708{{{#!if !br
4709{{{#!if au=au.toString(), ab=ab.toString()
r252
4710}}}{{{#!if tn="", ps=(au.length==18), ps
4711{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4712}}}}}}{{{#!if !ps&&(au.length<17)
4713{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4714}}}}}}{{{#!if ab.length<18
4715{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4716}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4717}}}}}}
r243
4718##i=63
4719{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4720{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4721}}}{{{#!if ty=ty.toString(), ty.length==19
4722{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4723}}}}}}
4724{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4725{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4726}}}{{{#!if ty=ty.toString(), ty.length==19
4727{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4728}}}}}}{{{#!if ty=+ty
4729}}}}}}
4730{{{#!if ty>ab
4731{{{#!if tn-=1, ab+=+("1"+pd)
4732}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4733}}}}}}
4734{{{#!if !br
r249
4735{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4736{{{#!if ps=true, tw=0
r243
4737}}}}}}
4738{{{#!if !ps
4739{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4740}}}{{{#!if ty=ty.toString(), ty.length==19
4741{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4742}}}}}}
4743{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4744{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4745}}}{{{#!if ty=ty.toString(), ty.length==19
4746{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4747}}}}}}{{{#!if ty=+ty
4748}}}}}}
r256
4749{{{#!if ty>ab
r243
4750{{{#!if au-=1, ab+=+("1"+pd)
4751}}}}}}{{{#!if au-=tx, ab-=ty
r256
4752}}}}}}
4753{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4754}}}
4755{{{#!if (au==0)&&(ab==0)
4756{{{#!if br=true
4757}}}}}}}}}
4758{{{#!if !br
4759{{{#!if au=au.toString(), ab=ab.toString()
r252
4760}}}{{{#!if tn="", ps=(au.length==18), ps
4761{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4762}}}}}}{{{#!if !ps&&(au.length<17)
4763{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4764}}}}}}{{{#!if ab.length<18
4765{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4766}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4767}}}}}}
r243
4768##i=64
4769{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4770{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4771}}}{{{#!if ty=ty.toString(), ty.length==19
4772{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4773}}}}}}
4774{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4775{{{#!if tz-=1, 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}}}}}}{{{#!if ty=+ty
4779}}}}}}
4780{{{#!if ty>ab
4781{{{#!if tn-=1, ab+=+("1"+pd)
4782}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4783}}}}}}
4784{{{#!if !br
r249
4785{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4786{{{#!if ps=true, tw=0
r243
4787}}}}}}
4788{{{#!if !ps
4789{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4790}}}{{{#!if ty=ty.toString(), ty.length==19
4791{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4792}}}}}}
4793{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4794{{{#!if tw-=1, 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}}}}}}{{{#!if ty=+ty
4798}}}}}}
r256
4799{{{#!if ty>ab
r243
4800{{{#!if au-=1, ab+=+("1"+pd)
4801}}}}}}{{{#!if au-=tx, ab-=ty
r256
4802}}}}}}
4803{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4804}}}
4805{{{#!if (au==0)&&(ab==0)
4806{{{#!if br=true
4807}}}}}}}}}
4808{{{#!if !br
4809{{{#!if au=au.toString(), ab=ab.toString()
r252
4810}}}{{{#!if tn="", ps=(au.length==18), ps
4811{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4812}}}}}}{{{#!if !ps&&(au.length<17)
4813{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4814}}}}}}{{{#!if ab.length<18
4815{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4816}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4817}}}}}}
r243
4818##i=65
4819{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4820{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4821}}}{{{#!if ty=ty.toString(), ty.length==19
4822{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4823}}}}}}
4824{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4825{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4826}}}{{{#!if ty=ty.toString(), ty.length==19
4827{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4828}}}}}}{{{#!if ty=+ty
4829}}}}}}
4830{{{#!if ty>ab
4831{{{#!if tn-=1, ab+=+("1"+pd)
4832}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4833}}}}}}
4834{{{#!if !br
r249
4835{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4836{{{#!if ps=true, tw=0
r243
4837}}}}}}
4838{{{#!if !ps
4839{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4840}}}{{{#!if ty=ty.toString(), ty.length==19
4841{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4842}}}}}}
4843{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4844{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4845}}}{{{#!if ty=ty.toString(), ty.length==19
4846{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4847}}}}}}{{{#!if ty=+ty
4848}}}}}}
r256
4849{{{#!if ty>ab
r243
4850{{{#!if au-=1, ab+=+("1"+pd)
4851}}}}}}{{{#!if au-=tx, ab-=ty
r256
4852}}}}}}
4853{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4854}}}
4855{{{#!if (au==0)&&(ab==0)
4856{{{#!if br=true
4857}}}}}}}}}
4858{{{#!if !br
4859{{{#!if au=au.toString(), ab=ab.toString()
r252
4860}}}{{{#!if tn="", ps=(au.length==18), ps
4861{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4862}}}}}}{{{#!if !ps&&(au.length<17)
4863{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4864}}}}}}{{{#!if ab.length<18
4865{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4866}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4867}}}}}}
r243
4868##i=66
4869{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4870{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4871}}}{{{#!if ty=ty.toString(), ty.length==19
4872{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4873}}}}}}
4874{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4875{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4876}}}{{{#!if ty=ty.toString(), ty.length==19
4877{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4878}}}}}}{{{#!if ty=+ty
4879}}}}}}
4880{{{#!if ty>ab
4881{{{#!if tn-=1, ab+=+("1"+pd)
4882}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4883}}}}}}
4884{{{#!if !br
r249
4885{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4886{{{#!if ps=true, tw=0
r243
4887}}}}}}
4888{{{#!if !ps
4889{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4890}}}{{{#!if ty=ty.toString(), ty.length==19
4891{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4892}}}}}}
4893{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4894{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4895}}}{{{#!if ty=ty.toString(), ty.length==19
4896{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4897}}}}}}{{{#!if ty=+ty
4898}}}}}}
r256
4899{{{#!if ty>ab
r243
4900{{{#!if au-=1, ab+=+("1"+pd)
4901}}}}}}{{{#!if au-=tx, ab-=ty
r256
4902}}}}}}
4903{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4904}}}
4905{{{#!if (au==0)&&(ab==0)
4906{{{#!if br=true
4907}}}}}}}}}
4908{{{#!if !br
4909{{{#!if au=au.toString(), ab=ab.toString()
r252
4910}}}{{{#!if tn="", ps=(au.length==18), ps
4911{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4912}}}}}}{{{#!if !ps&&(au.length<17)
4913{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4914}}}}}}{{{#!if ab.length<18
4915{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4916}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4917}}}}}}
r243
4918##i=67
4919{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4920{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4921}}}{{{#!if ty=ty.toString(), ty.length==19
4922{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4923}}}}}}
4924{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4925{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4926}}}{{{#!if ty=ty.toString(), ty.length==19
4927{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4928}}}}}}{{{#!if ty=+ty
4929}}}}}}
4930{{{#!if ty>ab
4931{{{#!if tn-=1, ab+=+("1"+pd)
4932}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4933}}}}}}
4934{{{#!if !br
r249
4935{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4936{{{#!if ps=true, tw=0
r243
4937}}}}}}
4938{{{#!if !ps
4939{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4940}}}{{{#!if ty=ty.toString(), ty.length==19
4941{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4942}}}}}}
4943{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4944{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4945}}}{{{#!if ty=ty.toString(), ty.length==19
4946{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4947}}}}}}{{{#!if ty=+ty
4948}}}}}}
r256
4949{{{#!if ty>ab
r243
4950{{{#!if au-=1, ab+=+("1"+pd)
4951}}}}}}{{{#!if au-=tx, ab-=ty
r256
4952}}}}}}
4953{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
4954}}}
4955{{{#!if (au==0)&&(ab==0)
4956{{{#!if br=true
4957}}}}}}}}}
4958{{{#!if !br
4959{{{#!if au=au.toString(), ab=ab.toString()
r252
4960}}}{{{#!if tn="", ps=(au.length==18), ps
4961{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
4962}}}}}}{{{#!if !ps&&(au.length<17)
4963{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
4964}}}}}}{{{#!if ab.length<18
4965{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
4966}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
4967}}}}}}
r243
4968##i=68
4969{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
4970{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
4971}}}{{{#!if ty=ty.toString(), ty.length==19
4972{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4973}}}}}}
4974{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
4975{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
4976}}}{{{#!if ty=ty.toString(), ty.length==19
4977{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4978}}}}}}{{{#!if ty=+ty
4979}}}}}}
4980{{{#!if ty>ab
4981{{{#!if tn-=1, ab+=+("1"+pd)
4982}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
4983}}}}}}
4984{{{#!if !br
r249
4985{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
4986{{{#!if ps=true, tw=0
r243
4987}}}}}}
4988{{{#!if !ps
4989{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
4990}}}{{{#!if ty=ty.toString(), ty.length==19
4991{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4992}}}}}}
4993{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
4994{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
4995}}}{{{#!if ty=ty.toString(), ty.length==19
4996{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
4997}}}}}}{{{#!if ty=+ty
4998}}}}}}
r256
4999{{{#!if ty>ab
r243
5000{{{#!if au-=1, ab+=+("1"+pd)
5001}}}}}}{{{#!if au-=tx, ab-=ty
r256
5002}}}}}}
5003{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
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"
r256
5017}}}}}}
r243
5018##i=69
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))
r256
5036{{{#!if ps=true, tw=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}}}}}}
r256
5049{{{#!if ty>ab
r243
5050{{{#!if au-=1, ab+=+("1"+pd)
5051}}}}}}{{{#!if au-=tx, ab-=ty
r256
5052}}}}}}
5053{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
5054}}}
5055{{{#!if (au==0)&&(ab==0)
5056{{{#!if br=true
5057}}}}}}}}}
5058{{{#!if !br
5059{{{#!if au=au.toString(), ab=ab.toString()
r252
5060}}}{{{#!if tn="", ps=(au.length==18), ps
5061{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
5062}}}}}}{{{#!if !ps&&(au.length<17)
5063{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
5064}}}}}}{{{#!if ab.length<18
5065{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
5066}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
5067}}}}}}
r243
5068##i=70
5069{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
5070{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
5071}}}{{{#!if ty=ty.toString(), ty.length==19
5072{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5073}}}}}}
5074{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
5075{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
5076}}}{{{#!if ty=ty.toString(), ty.length==19
5077{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5078}}}}}}{{{#!if ty=+ty
5079}}}}}}
5080{{{#!if ty>ab
5081{{{#!if tn-=1, ab+=+("1"+pd)
5082}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
5083}}}}}}
5084{{{#!if !br
r249
5085{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
5086{{{#!if ps=true, tw=0
r243
5087}}}}}}
5088{{{#!if !ps
5089{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
5090}}}{{{#!if ty=ty.toString(), ty.length==19
5091{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5092}}}}}}
5093{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
5094{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
5095}}}{{{#!if ty=ty.toString(), ty.length==19
5096{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5097}}}}}}{{{#!if ty=+ty
5098}}}}}}
r256
5099{{{#!if ty>ab
r243
5100{{{#!if au-=1, ab+=+("1"+pd)
5101}}}}}}{{{#!if au-=tx, ab-=ty
r256
5102}}}}}}
5103{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
5104}}}
5105{{{#!if (au==0)&&(ab==0)
5106{{{#!if br=true
5107}}}}}}}}}
5108{{{#!if !br
5109{{{#!if au=au.toString(), ab=ab.toString()
r252
5110}}}{{{#!if tn="", ps=(au.length==18), ps
5111{{{#!if tn=au.substr(0,1), au=au.substr(1,17)
5112}}}}}}{{{#!if !ps&&(au.length<17)
5113{{{#!if au=pd+au, au=au.substr(au.length-17,17)
r243
5114}}}}}}{{{#!if ab.length<18
5115{{{#!if ab=pd+ab, ab=ab.substr(ab.length-18,18)
5116}}}}}}{{{#!if au+=ab.substr(0,1), ab=ab.substr(1,17)+"0"
r256
5117}}}}}}
r243
5118##i=71
5119{{{#!if au=+au, ab=+ab, tz=0, !br&&(tn!="")
5120{{{#!if tn+=pd, tn=+tn, tz=tn/bu, tx=bu*tz, ty=bb*tz
5121}}}{{{#!if ty=ty.toString(), ty.length==19
5122{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5123}}}}}}
5124{{{#!if ty=+ty, (tx>tn)||((tx==tn)&&(ty>0))
5125{{{#!if tz-=1, tx=bu*tz, ty=bb*tz
5126}}}{{{#!if ty=ty.toString(), ty.length==19
5127{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5128}}}}}}{{{#!if ty=+ty
5129}}}}}}
5130{{{#!if ty>ab
5131{{{#!if tn-=1, ab+=+("1"+pd)
5132}}}}}}{{{#!if au+=(tn-tx), ab-=ty, tn=""
5133}}}}}}
5134{{{#!if !br
r249
5135{{{#!if ps=false, (au<bu)||((au==bu)&&(ab<bb))
r256
5136{{{#!if ps=true, tw=0
r243
5137}}}}}}
5138{{{#!if !ps
5139{{{#!if tw=au/bu, tx=bu*tw, ty=bb*tw
5140}}}{{{#!if ty=ty.toString(), ty.length==19
5141{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5142}}}}}}
5143{{{#!if ty=+ty, (tx>au)||((tx==au)&&(ty>ab))
5144{{{#!if tw-=1, tx=bu*tw, ty=bb*tw
5145}}}{{{#!if ty=ty.toString(), ty.length==19
5146{{{#!if tx+=+(ty.substr(0,1)), ty=ty.substr(1,18)
5147}}}}}}{{{#!if ty=+ty
5148}}}}}}
r256
5149{{{#!if ty>ab
r243
5150{{{#!if au-=1, ab+=+("1"+pd)
5151}}}}}}{{{#!if au-=tx, ab-=ty
r256
5152}}}}}}
5153{{{#!if tw+=tz, tw=tw.toString(), tm+=tw
r243
5154}}}
5155{{{#!if (au==0)&&(ab==0)
5156{{{#!if br=true
r256
5157}}}}}}}}}
r285
5158tn을 빈 문자열로 초기화하고 변수 ts를 가져옵니다. 마지막 72회까지 몫을 구하는 계산을 했음에도 불구하고 나머지가 나누어떨어져 0이 되지 않는다면 tn을 "..."로, ts를 true로 바꿉니다.
5159{{{#!if tn="", !br
r245
5160{{{#!if tn="...", ts=true
r247
5161}}}}}}
r229
5162
r196
5163##rs 매기기
r248
5164앞에 매겼던 ac와 bc로 판별식을 만듭니다. i=ac-bc로 둡니다. a의 가장 큰 자리와 b의 가장 큰 자리가 얼마나 차이나는가에 따라 몫에 매기는 소수점 위치가 달라집니다. i>=-35 (ac==-18이고 bc==17일 경우), i<=35 (ac==17이고 bc=-18일 경우)입니다.
r264
5165{{{#!if i=ac-bc
5166}}}
r272
5167a에서 b를 나누면 몫을 10^i 의 자리부터 매기게 됩니다. 소수점 아랫부분까지 몫 기록이 이어지면 상관이 없겠으나, 몫이 소수가 아닌 정수로 기록될 때 실제 자릿수에 해당하는 길이보다 (금방 나누어떨어져) 몫이 짧게 기록되고 그치는 경우 남는 자리에 자동적으로 0을 채워주지 않게 됩니다. 이러면 수동으로 0을 채워주어야 하며, (i==0일 경우 10^0의 자리부터 몫을 기록하므로 10^1과 같거나 큰 자리부터 기록할 경우 곧) i>0일 때에만 의미가 있습니다.
5168이를테면 4000/2를 계산하는 경우 몫이 "2"까지만 기록되며 뒤에 000은 수동으로 채워주어야 합니다.
5169{{{#!if i>0
5170몫은 tm으로 기록되므로 tm의 길이를 따집니다. i가 양수이고 몫이 정수로 나누어떨어질 경우, tm의 길이가 적어도 i+1이 되게 맞춥니다.
5171{{{#!if i+1>tm.length
5172i+1보타 tm의 길이가 작은 경우 i==35인 경우를 감안하여 tm의 뒷부분을 pd+pd --더블 패드--로 채운 다음 i+1길이만큼 오려냅니다.
5173{{{#!if tm+=pd+pd, tm=tm.substr(0,i+1)
5174}}}}}}}}}
5175
r248
5176i가 18 이상 (18 이상 35 이하)이면 rs를 매길 수 있습니다. 몫을 적어놓은 문자열 tm의 0번 index에 들어가는 문자부터 i에서 18을 뺀 값의 index에 들어가는 문자까지를 rs로 두며, rs의 문자열 길이는 i-18+1 곧 i-17입니다.
r264
5177{{{#!if i>=18
r248
5178tm에서 rs를 오려낸 문자열을 tm으로 다시 둡니다.
5179{{{#!if rs=tm.substr(0,i-17), tm=tm.substr(i-17)
5180}}}}}}
r264
5181
r196
5182##ru 매기기
r284
5183ps를 먼저 false로 초기화한 다음, i>=18 이 되(어 rs를 매기)는 경우 ps를 true로 맞춥니다.
5184{{{#!if ps=false, i>=18
r264
5185{{{#!if ps=true
r248
5186}}}}}}
r264
5187ps가 true이면 문자열 tm에서 18번째 자리까지를 ru로 두고, tm에서 ru를 오려낸 문자열을 tm으로 둡니다.
5188{{{#!if ps
5189{{{#!if ru=tm.substr(0,18), tm=tm.substr(18)
5190}}}}}}
5191ps가 false이고 (i가 충분히 큰 값이 아니고) i가 0 이상 (0 이상 17 이하)인 수라면 ru를 매길 수 있으며 문자열의 길이는 i+1이 됩니다.
5192{{{#!if !ps&&(i>=0)
r261
5193{{{#!if ru=tm.substr(0,i+1), tm=tm.substr(i+1)
r248
5194}}}}}}
r196
5195
5196##rb 매기기
r264
5197i>=0이 되(어 ru를 매기)는 경우 ps를 true로 맞춥니다.
r248
5198{{{#!if i>=0
r264
5199{{{#!if ps=true
r260
5200}}}}}}
r264
5201ps가 true이면 문자열 tm에서 18번째 자리까지를 rb로 두고, tm에서 rb를 오려낸 문자열을 tm으로 둡니다.
5202{{{#!if ps
5203{{{#!if rb=tm.substr(0,18), tm=tm.substr(18)
r248
5204}}}}}}
r264
5205ps가 false이고 i가 -18 이상 (-18 이상 -1 이하)이면 rb를 매길 수 있습니다.
r266
5206이 때 몫으로 문자열의 길이는 i+18+1 곧 i+19가 되며 그 앞부분은 0으로 채워집니다.
5207몫으로 i+19개의 자리가 채워진다면, 몫 앞을 0으로 채우는 수량은 18에서 i+19를 뺀 -i-1이 됩니다.
5208이것을 substr을 이용하여 (18자리 문자열인) pd의 substr로 채워보자면
520918에서 (-i-1)을 뺀 i+19 번부터 끝까지 해당하는 문자열로 채우면 됩니다.
r292
5210{{{#!if !ps
5211{{{#!if i>=-18
r266
5212{{{#!if rb=tm.substr(0,i+19), tm=tm.substr(i+19), rb=pd.substr(i+19)+rb
r264
5213}}}}}}
r292
5214만일 i<0이고 i가 -18보다 작아 rb에 몫을 기록하지 않고 rb보다 더 아래 자리에 기록하게 된다면 rb의 18자리를 모두 0으로 채웁니다.
5215{{{#!if i<-18
5216{{{#!if rb=pd
5217}}}}}}
5218}}}
r196
5219
5220##ri 매기기
r264
5221i>=-18이 되(어 rb를 매기)는 경우 ps를 true로 맞춥니다.
r248
5222{{{#!if i>=-18
r264
5223{{{#!if ps=true
r260
5224}}}}}}
r264
5225ps가 true이면 rb와 같은 방법으로 ri를 매기고, tm을 다시 정의합니다.
5226{{{#!if ps
5227{{{#!if ri=tm.substr(0,18), tm=tm.substr(18)
r248
5228}}}}}}
r264
5229ps가 false이며 i가 -19 이하 (-36이상 -19 이하이나, i의 최소값은 -35)이면 ri를 매길 수 있습니다. rb와 같습니다.
5230{{{#!if !ps&&(i>=-36)
r266
5231{{{#!if ri=tm.substr(0,i+37), tm=tm.substr(i+37), ri=pd.substr(i+37)+ri
r264
5232}}}
5233}}}
5234
r281
5235ri까지 몫을 기록했음에도 불구하고 여전히 몫이 남는다면 ... 처리를 하고 ts를 true로 바꿉니다.
r273
5236{{{#!if tm.length>0
r281
5237{{{#!if tn="...", ts=true
r273
5238}}}}}}
5239
r231
5240여기까지가 나눗셈의 계산과정입니다.
r194
5241}}}
5242
r261
5243##== 계산 결과 표시 정리하기 ==
r302
5244##=== 결과값 표시 정리하기 ===
r231
5245연산이 끝났으면 표기된 숫자를 정리합니다.
5246
r285
5247##rs, ru 정리 부분
r304
5248먼저 ru를 (곱셈연산에서 정수값으로 나올 수 있고, 나눗셈에서 몫이 1보다 작은 값이 나오는 경우같이 값을 부여하지 않았다면 초기화할 때 정의했던 정수 0인 채로 있으므로) 문자열로 바꿉니다.
r164
5249{{{#!if ru=ru.toString()
r262
5250}}}
525118자리씩 끊어 표기하므로 소수점 위 19~36번째 자리에 해당하는 rs값이 (가령 곱셈에서, 곱한 값을 더한 결과가) 0일 경우 rs를 빈 문자열로 바꿉니다. 이 때 ru를 정수로 바꿔 ru 왼쪽에 있는 0들을 지운 다음, ru를 문자열로 바꿉니다.
5252{{{#!if +rs==0
5253{{{#!if rs="", ru=+ru, ru=ru.toString()
5254}}}}}}
5255
5256계산과정에서 ru의 윗자리인 rs값이 0보다 클 경우, 1~18번째 자리인 ru에 빈 자리를 채우도록 ru의 왼쪽을 0으로 채웁니다.
5257{{{#!if +rs>0
r228
5258{{{#!if rs=rs.toString(), ru=pd+ru, ru=ru.substr(ru.length-18, 18)
r262
5259}}}
5260rs를 정수로 바꿔 rs 앞에 있는 0들을 지운 다음 rs를 문자열로 바꿉니다.
5261{{{#!if rs=+rs, rs=rs.toString()
r171
5262}}}}}}
r156
5263
r285
5264##rb, ri 정리 부분
r287
5265i보다 소수점 아래부분을 더 써내려가야 하는 상황이 아닌(나눗셈에서 ts가 false인) 경우에서, 소수점 아래 19~36번째 자리에 해당하는 ri값이 0일 경우 ri를 빈 문자열로 바꿉니다.
r179
5266이 때 ri와 rb가 모두 0일 경우 rb도 빈 문자열로 바꾸고 rp=0으로 둡니다.
r285
5267{{{#!if !ts
r273
5268{{{#!if +ri==0
r164
5269{{{#!if ri=""
r273
5270}}}{{{#!if +rb==0
r179
5271{{{#!if rb="", rp=0
r285
5272}}}}}}}}}}}}
r179
5273
r285
5274ri가 빈 문자열이 아닐 (+ri가 0보다 클) 때 true를 주는 논리값으로 ps를 정의합니다.
5275{{{#!if ps=(+ri>0)
5276}}}
r164
5277
r287
5278{{{#!if f=="*"
r288
5279곱셈연산에서 ri가 비어있지 않을 경우 ri와 rb를 문자열로 바꾼 다음 각각 왼쪽을 0으로 채웁니다.
5280{{{#!if ps
5281{{{#!if ri=ri.toString(), ri=pd+ri, ri=ri.substr(ri.length-18, 18), rb=rb.toString(), rb=pd+rb, rb=rb.substr(rb.length-18, 18)
5282}}}}}}
r289
5283곱셈연산에서 ri가 비어있으나 rb가 비어있지 않을 경우 rb를 문자열로 바꾼 다음 rb의 왼쪽을 0으로 채웁니다.
5284{{{#!if !ps&&(+rb>0)
r228
5285{{{#!if rb=rb.toString(), rb=pd+rb, rb=rb.substr(rb.length-18, 18)
r179
5286}}}}}}
r287
5287}}}
r179
5288
r285
5289!ts인 상황에서 ps가 true이면 rp를 ri의 길이로, 그렇지 않고 rb만 0이 아닌경우 rp를 rb의 길이로 정의합니다.
5290{{{#!if !ts
r187
5291{{{#!if ps
r189
5292{{{#!if this.rp=ri.length
r277
5293}}}
r290
5294ps가 true일 때 19~36번째 자리인 ri까지 계산하므로 rp에 18을 더해야 하지만, 문자열 정리를 하기 위해 문자열의 index 번호를 다루고자 18을 더하는 작업은 뒤로 뻅니다.
5295}}}
r277
5296
5297{{{#!if !ps&&(rb!="")
r189
5298{{{#!if this.rp=rb.length
r160
5299}}}}}}
5300
r285
5301!ts이면서 ri가 빈 문자열이 아닐 경우 ri의 오른쪽부터 붙은 "0"들을 모두 지웁니다.
r167
5302{{{#!if ps
r223
5303{{{#!if (rp>9)&&(ri.substr(rp-9,9)=="000000000")
r290
5304{{{#!if this.ri=ri.substr(0,rp-9), rp-=9
r167
5305}}}}}}
r223
5306{{{#!if (rp>4)&&(ri.substr(rp-4,4)=="0000")
r290
5307{{{#!if this.ri=ri.substr(0,rp-4), rp-=4
r167
5308}}}}}}
r223
5309{{{#!if (rp>2)&&(ri.substr(rp-2,2)=="00")
r290
5310{{{#!if this.ri=ri.substr(0,rp-2), rp-=2
r167
5311}}}}}}
r223
5312{{{#!if (rp>2)&&(ri.substr(rp-2,2)=="00")
r290
5313{{{#!if this.ri=ri.substr(0,rp-2), rp-=2
r167
5314}}}}}}
r223
5315{{{#!if (rp>1)&&(ri.substr(rp-1,1)=="0")
r290
5316{{{#!if this.ri=ri.substr(0,rp-1), rp-=1
5317}}}}}}
5318문자열 정리를 끝냈을 때 rp에 18을 더합니다.
5319{{{#!if rp+=18
5320}}}}}}
r62
5321
r285
5322!ts이면서 이면서 ri가 빈 문자열일 경우, rb의 오른쪽에 붙은 "0"들을 모두 지웁니다,
r168
5323{{{#!if !ps
r223
5324{{{#!if (rp>9)&&(rb.substr(rp-9,9)=="000000000")
r290
5325{{{#!if this.rb=rb.substr(0,rp-9), rp-=9
r164
5326}}}}}}
r223
5327{{{#!if (rp>4)&&(rb.substr(rp-4,4)=="0000")
r290
5328{{{#!if this.rb=rb.substr(0,rp-4), rp-=4
r164
5329}}}}}}
r223
5330{{{#!if (rp>2)&&(rb.substr(rp-2,2)=="00")
r290
5331{{{#!if this.rb=rb.substr(0,rp-2), rp-=2
r164
5332}}}}}}
r223
5333{{{#!if (rp>2)&&(rb.substr(rp-2,2)=="00")
r290
5334{{{#!if this.rb=rb.substr(0,rp-2), rp-=2
r164
5335}}}}}}
r223
5336{{{#!if (rp>1)&&(rb.substr(rp-1,1)=="0")
r290
5337{{{#!if this.rb=rb.substr(0,rp-1), rp-=1
r167
5338}}}}}}}}}
r285
5339}}}
r188
5340
r285
5341ts인 경우 rb, ri의 오른쪽 부분을 정리하지 않고 rp를 39로 정의합니다.
5342{{{#!if ts
5343{{{#!if rp=39
5344}}}}}}
5345
5346
5347
r164
5348rb 정리를 이것으로 종료합니다.
5349
r216
5350##== 오류 코드 ==
5351error
53521 : 오버플로
53535 : 이중 소수점 표기
53546 : 소수점 윗부분 오류
53557 : 소수점 아랫부분 오류
5356
5357warning
53581 : 소수점 아래 입력한 자릿수가 너무 많음.
5359
5360##== 아래 출력 변수 설명 ==
r84
5361'''sa''' : searching a; '''sb''' : searching b; '''sf''' : searching f;
r280
5362'''rl''' : result string length to output; '''p''' : a point of string(s); '''ps''' : pass
r308
5363'''ad''' : "a" decimal point of string variable 'ma' (integer);
5364'''bd''' : "b" decimal point of string variable 'mb' (integer);
5365'''md''' : displaying mode number (string→integer); '''ms''' : message for correction (string)
r310
5366'''tm''' : temporary string, or transaction message (string); '''tn''' : temporary string 2 (string);
r306
5367'''tx''' : temporary value 1 (integer); '''ty''' : temporary value 2 (integer); '''tz''' : temporary value 3 (integer);
r332
5368'''comment''' : comment (integer, unused);
r85
5369ru는 계산결과에서 소수점 위 자리이므로, dot(.)이 나오지 않습니다.
r62
5370##여기까지 주석(주석 아님)
r276
5371}}}{{{#!wiki style="font-weight: 300; font-size: 17.5px;"
r310
5372{{{#!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=='/'), this.ad=ma.indexOf("."), this.bd=mb.indexOf("."), ps=false, tm="", tn=""
r320
5373}}}{{{#!if !(sa&sb&sf)
5374{{{#!if !sa||!sb
5375변수 {{{#!if !sa
r321
5376a{{{#!if !sb
5377와 변수 }}}}}}{{{#!if !sb
r322
5378b}}}}}}{{{#!if !sf
r321
5379{{{#!if !sa&!sb
r323
5380, 그리고 }}}{{{#!if !sa^!sb
r321
5381와 }}}연산자 f}}}를 입력하세요...}}}{{{#!if sa&&sb&&sf
r112
5382{{{#!if (ea==0)&&(eb==0)
r77
5383{{{#!if as[0]!=45
r48
5384@a@}}}{{{#!if as[0]==45
r110
5385(@a@)}}} {{{#!if as.length>=20
r307
5386[br]}}}@f@ {{{#!if bs[0]!=45
r48
5387@b@}}}{{{#!if bs[0]==45
r310
5388(@b@)}}} {{{#!if (ma!=as)||(mb!=bs)||(+md==3)||(+md==4)
r307
5389{{{#!if (as.length+bs.length>=30)
r308
5390[br]}}}→ {{{#!if ms=ma, ad!=-1
5391{{{#!if ms=ma.substr(0,ad)
r312
5392}}}}}}{{{#!if ps=false, ms[0]==45
r309
5393{{{#!if ms=ms.substr(1), ps=true
r311
5394}}}}}}{{{#!if (+md==3)||(+md==4)
5395{{{#!if tx=ms.length, ty=tx/(+md), tz=tx%(+md), tn=ms, tz>0
r318
5396{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
r310
5397}}}}}}{{{#!if (ty>0)&&(tz>0)
5398{{{#!if tm+=","
5399}}}}}}{{{#!if ty-->0
r316
5400{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
r310
5401}}}}}}{{{#!if ty-->0
r316
5402{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5403}}}}}}{{{#!if ty-->0
r316
5404{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5405}}}}}}{{{#!if ty-->0
r316
5406{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5407}}}}}}{{{#!if ty-->0
r316
5408{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5409}}}}}}{{{#!if ty-->0
r316
5410{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r311
5411}}}}}}{{{#!if ms=tm
r314
5412}}}}}}{{{#!if ps
5413(-}}}@ms@{{{#!if ad!=-1
5414{{{#!if ms=ma.substr(ad+1)
5415}}}{{{#!if (+md==3)||(+md==4)
r316
5416{{{#!if tn=ms, tx=ms.length, ty=tx/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
5417{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5418}}}}}}{{{#!if ty-->0
r316
5419{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5420}}}}}}{{{#!if ty-->0
r316
5421{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5422}}}}}}{{{#!if ty-->0
r316
5423{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5424}}}}}}{{{#!if ty-->0
r316
5425{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5426}}}}}}{{{#!if ms=tm
r315
5427}}}}}}.@ms@}}}{{{#!if ps
r317
5428)}}} @f@ {{{#!if tm="", tn="", ms=mb, bd!=-1
r308
5429{{{#!if ms=mb.substr(0,bd)
r312
5430}}}}}}{{{#!if ps=false, ms[0]==45
r310
5431{{{#!if ms=ms.substr(1), ps=true
r311
5432}}}}}}{{{#!if (+md==3)||(+md==4)
5433{{{#!if tx=ms.length, ty=tx/(+md), tz=tx%(+md), tn=ms, tz>0
r318
5434{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
r310
5435}}}}}}{{{#!if (ty>0)&&(tz>0)
5436{{{#!if tm+=","
5437}}}}}}{{{#!if ty-->0
r316
5438{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
r310
5439}}}}}}{{{#!if ty-->0
r316
5440{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5441}}}}}}{{{#!if ty-->0
r316
5442{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5443}}}}}}{{{#!if ty-->0
r316
5444{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5445}}}}}}{{{#!if ty-->0
r316
5446{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r310
5447}}}}}}{{{#!if ty-->0
r316
5448{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r311
5449}}}}}}{{{#!if ms=tm
r314
5450}}}}}}{{{#!if ps
5451(-}}}@ms@{{{#!if bd!=-1
5452{{{#!if ms=mb.substr(bd+1)
5453}}}{{{#!if (+md==3)||(+md==4)
r316
5454{{{#!if tn=ms, tx=ms.length, ty=tx/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
5455{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5456}}}}}}{{{#!if ty-->0
r316
5457{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5458}}}}}}{{{#!if ty-->0
r316
5459{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5460}}}}}}{{{#!if ty-->0
r316
5461{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5462}}}}}}{{{#!if ty-->0
r316
5463{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
r314
5464}}}}}}{{{#!if ms=tm
r315
5465}}}}}}.@ms@}}}{{{#!if ps
r314
5466)}}} }}}{{{#!if (bs.length>=20)||(as.length+bs.length>=30)
r329
5467[br]}}}= @ns@{{{#!if comment="rs 표시 부분", ms=rs, tx=6%(+md), tm="", tn="", (+md==3)||(+md==4)
r331
5468{{{#!if comment="18자리를 md 자리만큼 떼었을 때 +md==4와 같이 모자라는 자릿수를 tx로 정의합니다.", tn=ms, ty=ms.length, tz=(ty-tx<0)?ty:(ty+tx)%(+md), ty=(ty+tx)/(+md), tz>0
r330
5469{{{#!if tm+=tn.substr(0,tz), tn=tn.substr(tz), ty>0
5470{{{#!if tm+=","
r331
5471}}}}}}}}}{{{#!if ty-->0
5472{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
5473}}}}}}{{{#!if ty-->0
5474{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5475}}}}}}{{{#!if ty-->0
5476{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5477}}}}}}{{{#!if ty-->0
5478{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5479}}}}}}{{{#!if ty-->0
5480{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5481}}}}}}{{{#!if ty-->0
5482{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
r332
5483}}}}}}{{{#!if ms=tm
r334
5484}}}}}}@ms@{{{#!if comment="rs의 값이 존재하고 끊는 단위로 떨어질 때 자릿수 구분 기호인 반점을 새깁니다.", ms=((rs!="")&&(18%(+md)==0))?",":""
r333
5485}}}@ms@{{{#!if comment="ru 표시 부분", ms=ru, tm="", tn="", (+md==3)||(+md==4)
5486{{{#!if tn=ms, ty=ms.length, tz=ty%(+md), ty=ty/(+md), tz>0
5487{{{#!if tm=tn.substr(0,tz), tn=tn.substr(tz)
5488}}}}}}{{{#!if (ty>0)&&(tz>0)
5489{{{#!if tm+=","
5490}}}}}}{{{#!if ty-->0
5491{{{#!if tm+=tn.substr(0,+md), tn=tn.substr(+md)
5492}}}}}}{{{#!if ty-->0
5493{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5494}}}}}}{{{#!if ty-->0
5495{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5496}}}}}}{{{#!if ty-->0
5497{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5498}}}}}}{{{#!if ty-->0
5499{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5500}}}}}}{{{#!if ty-->0
5501{{{#!if tm+=","+tn.substr(0,+md), tn=tn.substr(+md)
5502}}}}}}{{{#!if ms=tm
5503}}}}}}@ms@{{{#!if +rp>0
r98
5504##rb string, decimal point marking
r333
5505.{{{#!if comment="rb 표시 부분", ms=rb, tm="", tn="", (+md==3)||(+md==4)
5506{{{#!if tn=ms, ty=ms.length, ty=ty/(+md), tm=tn.substr(0,+md), tn=tn.substr(+md), ty-->0
5507{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5508}}}}}}{{{#!if ty-->0
5509{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5510}}}}}}{{{#!if ty-->0
5511{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5512}}}}}}{{{#!if ty-->0
5513{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5514}}}}}}{{{#!if ty-->0
5515{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5516}}}}}}{{{#!if ms=tm
5517}}}}}}@ms@{{{#!if ri!=""
r334
5518{{{#!if comment="ri의 값이 존재하고 끊는 단위로 떨어질 때 자릿수를 매기고자 띄어쓰기를 넣습니다.", ms=(18%(+md)==0)?" ":""
r333
5519}}}@ms@{{{#!if comment="ri 표시 부분", ms=ri, tm="", tn="", (+md==3)||(+md==4)
5520{{{#!if comment="rs의 경우와 같이, md만큼 떼었을 때 모자라는부분을 생각합니다.", tn=ms, ty=ms.length, ty=(ty+tx)/(+md), tm=tn.substr(0,tx), tn=tn.substr(tx), ty-->0
5521{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5522}}}}}}{{{#!if ty-->0
5523{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5524}}}}}}{{{#!if ty-->0
5525{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5526}}}}}}{{{#!if ty-->0
5527{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5528}}}}}}{{{#!if ty-->0
5529{{{#!if tm+=" "+tn.substr(0,+md), tn=tn.substr(+md)
5530}}}}}}{{{#!if ms=tm
5531}}}}}}@ms@{{{#!if (f=='/')&&(tn=="...")
r271
5532...}}}}}}}}}}}}}}}{{{#!if (ea>0)||(eb>0)
r112
5533{{{#!if (ea==1)||(eb==1)
r192
5534'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==1
r112
5535a{{{#!if eb==1
5536와 }}}}}}{{{#!if eb==1
r298
5537b}}}에 범위를 초과하는 값이 입력되었습니다. {{{#gray (오버플로)}}}{{{#!if ea!=eb
5538[br]}}}}}}{{{#!if eb==3
5539'''{{{#orangered [오류]}}}''' 0으로 나눌 수 없습니다. {{{#gray (입력 오류)}}}{{{#!if ea!=eb
5540[br]}}}}}}{{{#!if (ea==5)||(eb==5)
r216
5541'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==5
5542a{{{#!if eb==5
5543와 }}}}}}{{{#!if eb==5
r298
5544b}}}에 소수점이 2개 이상 입력되었습니다. {{{#gray (입력 오류)}}}}}}{{{#!if (ea==6)||(eb==6)
r216
5545'''{{{#orangered [오류]}}}''' 변수 {{{#!if ea==6
5546a의 소수점 윗자리{{{#!if eb==6
5547와 }}}}}}{{{#!if eb==6
r280
5548b의 소수점 윗자리}}}에 올바르지 않은 문구{{{#!if ps=(((ea==6)&&(eb==7))||((ea==7)&&(eb==6))), ps
r279
5549가, }}}{{{#!if !ps
r298
5550가 입력되었습니다. {{{#gray (입력 오류)}}}{{{#!if ea!=eb
5551[br]}}}}}}}}}{{{#!if (ea==7)||(eb==7)
r279
5552{{{#!if !ps
5553'''{{{#orangered [오류]}}}'''}}} 변수 {{{#!if ea==7
r216
5554a의 소수점 아랫자리{{{#!if eb==7
5555와 }}}}}}{{{#!if eb==7
r299
5556b의 소수점 아랫자리}}}에 올바르지 않은 문구가 입력되었습니다. {{{#gray (입력 오류)}}}}}}}}}{{{#!if ((wa>0)||(wb>0))&&(((ea==0)&&(eb==0))||((wb==1)&&(eb==3)))
r300
5557{{{#!if (eb!=3)||((ea>3)&&(eb==3))
r298
5558[br]}}}{{{#!wiki style="display: inline; text-shadow: 1px 1px 2px gray;"
r301
5559'''{{{#yellow [경고] }}}'''}}}변수 {{{#!if (wa==1)&&(ea==0)
5560a{{{#!if (wb==1)&&(ea==0)
r269
5561와 }}}}}}{{{#!if wb==1
5562b}}}의 소수점 아래에 입력한 문구가 너무 많습니다. 소수점 아래 19번째 자리부터 입력된 문구는 무시됩니다.
5563}}}}}}