#module
#deffunc calc_r array result, array work, int degit, var result_num, local value, local count
if degit>=10 {
repeat 10
if work.cnt {
value=10.0*value+(9-cnt)
count++
}
loop
if count>=2 {
result.result_num=value
result_num++
}
return
}
work.degit=0
calc_r result, work, degit+1, result_num
work.degit=1
calc_r result, work, degit+1, result_num
return
#deffunc calc array result, local result_num, local work
ddim result, 1
dim work, 10
calc_r result, work, 0, result_num
return result_num
#global
calc result
buf=""
repeat stat
buf+=strf("%.0f\n", result.cnt)
loop
mesbox buf, ginfo_sx, ginfo_sy
I21vZHVsZQojZGVmZnVuYyBjYWxjX3IgYXJyYXkgcmVzdWx0LCBhcnJheSB3b3JrLCBpbnQgZGVnaXQsIHZhciByZXN1bHRfbnVtLCBsb2NhbCB2YWx1ZSwgbG9jYWwgY291bnQKCWlmIGRlZ2l0Pj0xMCB7CgkJcmVwZWF0IDEwCgkJCWlmIHdvcmsuY250IHsKCQkJCXZhbHVlPTEwLjAqdmFsdWUrKDktY250KQoJCQkJY291bnQrKwoJCQl9CgkJbG9vcAoJCWlmIGNvdW50Pj0yIHsKCQkJcmVzdWx0LnJlc3VsdF9udW09dmFsdWUKCQkJcmVzdWx0X251bSsrCgkJfQoJCXJldHVybgoJfQoJd29yay5kZWdpdD0wCgljYWxjX3IgcmVzdWx0LCB3b3JrLCBkZWdpdCsxLCByZXN1bHRfbnVtCgl3b3JrLmRlZ2l0PTEKCWNhbGNfciByZXN1bHQsIHdvcmssIGRlZ2l0KzEsIHJlc3VsdF9udW0KCXJldHVybgoKI2RlZmZ1bmMgY2FsYyBhcnJheSByZXN1bHQsIGxvY2FsIHJlc3VsdF9udW0sIGxvY2FsIHdvcmsKCWRkaW0gcmVzdWx0LCAxCglkaW0gd29yaywgMTAKCWNhbGNfciByZXN1bHQsIHdvcmssIDAsIHJlc3VsdF9udW0KCXJldHVybiByZXN1bHRfbnVtCiNnbG9iYWwKCmNhbGMgcmVzdWx0CgpidWY9IiIKcmVwZWF0IHN0YXQKCWJ1Zis9c3RyZigiJS4wZlxuIiwgcmVzdWx0LmNudCkKbG9vcAoKbWVzYm94IGJ1ZiwgZ2luZm9fc3gsIGdpbmZvX3N5Cg==