当前位置: 首页 > news >正文

浙江省长兴县建设局网站如何选择网站模板

浙江省长兴县建设局网站,如何选择网站模板,临沂网站建设设计,百度咨询电话 人工目录效果加减乘除乘方源码版本#xff1a;Grey Hack v0.7.3619 - Alpha 在Gs中#xff0c;位数大于15的整数将以科学计数法显示#xff0c;故这里提供一种基于字符串加法的四则大数运算算法。由于位数大于10的字符串无法用to_int方法转化为整数#xff0c;因此本示例中以长… 目录效果加减乘除乘方源码版本Grey Hack v0.7.3619 - Alpha 在Gs中位数大于15的整数将以科学计数法显示故这里提供一种基于字符串加法的四则大数运算算法。由于位数大于10的字符串无法用to_int方法转化为整数因此本示例中以长度9分割字符串以加速计算。 效果 加 减 乘 除 乘方 对照 源码 add function(Str0, Str1)Str0 Str0.trimStr1 Str1.trimif Str0[0] or Str0[0] - thenStrNum0 Str0[1:]elseStrNum0 Str0[0:]end if while StrNum0[0] 0 and len(StrNum0) 1StrNum0 StrNum0[1:]end whileLen0 len(StrNum0)if Str1[0] or Str1[0] - thenStrNum1 Str1[1:]elseStrNum1 Str1[0:]end ifwhile StrNum1[0] 0 and len(StrNum1) 1StrNum1 StrNum1[1:]end whileLen1 len(StrNum1)if Str0[0] - then Sign0 -elseSign0 end ifif Str1[0] - then Sign1 -elseSign1 end ifSign if Len0 Len1 thenSign Sign0StrLonger StrNum0[0:]StrSmaller StrNum1[0:]else if Len0 Len1 thenSign Sign1StrLonger StrNum1[0:]StrSmaller StrNum0[0:]elsefor _ in range(0, Len0 - 1, 1)if StrNum0[_].to_int StrNum1[_].to_int thenSign Sign0StrLonger StrNum0[0:]StrSmaller StrNum1[0:]else if StrNum0[_].to_int StrNum1[_].to_int thenSign Sign1StrLonger StrNum1[0:]StrSmaller StrNum0[0:]end ifif Sign ! then breakend forend ifif Sign then Sign Sign0StrLonger StrNum0[0:]StrSmaller StrNum1[0:]end ifStrLongerList [] while len(StrLonger) 9StrLongerList StrLongerList [StrLonger[-9:]]StrLonger StrLonger[:-9]end whileif StrLonger ! then StrLongerList StrLongerList [StrLonger]StrSmallerList [] while len(StrSmaller) 9StrSmallerList StrSmallerList [StrSmaller[-9:]]StrSmaller StrSmaller[:-9]end whileif StrSmaller ! then StrSmallerList StrSmallerList [StrSmaller]ResultStr if Sign0 Sign1 then Jinwei 0for _ in range(0, len(StrSmallerList) - 1, 1)temp Jinwei StrLongerList[_].to_int StrSmallerList[_].to_intif temp 1000000000 thentemp temp - 1000000000Jinwei 1elseJinwei 0end iftemp str(temp)while len(temp) 9temp 0 tempend whileResultStr temp ResultStrend forif len(StrLongerList) ! len(StrSmallerList) thenfor _ in range(len(StrSmallerList), len(StrLongerList) - 1, 1)temp Jinwei StrLongerList[_].to_intif temp 1000000000 thentemp temp - 1000000000Jinwei 1elseJinwei 0end iftemp str(temp)while len(temp) 9temp 0 tempend whileResultStr temp ResultStrend forend ifif Jinwei 1 thenResultStr 1 ResultStrJinwei 0end ifelseJiewei 0for _ in range(0, len(StrSmallerList) - 1, 1)temp Jiewei StrLongerList[_].to_int - StrSmallerList[_].to_intif temp 0 thentemp temp 1000000000Jiewei -1elseJiewei 0end iftemp str(temp)while len(temp) 9temp 0 tempend whileResultStr temp ResultStrend forif len(StrLongerList) ! len(StrSmallerList) thenfor _ in range(len(StrSmallerList), len(StrLongerList) - 1, 1)temp Jiewei StrLongerList[_].to_intif temp 0 thentemp temp 1000000000Jiewei -1elseJiewei 0end iftemp str(temp)while len(temp) 9temp 0 tempend whileResultStr temp ResultStrend forend ifend ifwhile ResultStr[0] 0 and len(ResultStr) 1ResultStr ResultStr[1:]end whileResultStr Sign ResultStrif len(ResultStr) 2 and ResultStr[1] 0 thenreturn 0elsereturn ResultStrend if end functionsub function(Str0, Str1)Str0 Str0.trimStr1 Str1.trimif Str0[0] or Str0[0] - thenStrNum0 Str0[1:]elseStrNum0 Str0[0:]end if while StrNum0[0] 0 and len(StrNum0) 1StrNum0 StrNum0[1:]end whileif Str1[0] or Str1[0] - thenStrNum1 Str1[1:]elseStrNum1 Str1[0:]end ifwhile StrNum1[0] 0 and len(StrNum1) 1StrNum1 StrNum1[1:]end whileif Str0[0] - then Sign0 -elseSign0 end ifif Str1[0] - then Sign1 elseSign1 -end ifreturn add(Sign0 StrNum0, Sign1 StrNum1) end functionmul function(Str0, Str1)Str0 Str0.trimStr1 Str1.trimif Str0[0] or Str0[0] - thenStrNum0 Str0[1:]elseStrNum0 Str0[0:]end if while StrNum0[0] 0 and len(StrNum0) 1StrNum0 StrNum0[1:]end whileLen0 len(StrNum0)if Str1[0] or Str1[0] - thenStrNum1 Str1[1:]elseStrNum1 Str1[0:]end ifwhile StrNum1[0] 0 and len(StrNum1) 1StrNum1 StrNum1[1:]end whileLen1 len(StrNum1)if StrNum0 0 or StrNum1 0 then return 0if Str0[0] - then Sign0 -elseSign0 end ifif Str1[0] - then Sign1 -elseSign1 end ifSign if Len0 Len1 thenSign Sign0StrLonger StrNum0[0:]StrSmaller StrNum1[0:]else if Len0 Len1 thenSign Sign1StrLonger StrNum1[0:]StrSmaller StrNum0[0:]elsefor _ in range(0, Len0 - 1, 1)if StrNum0[_].to_int StrNum1[_].to_int thenSign Sign0StrLonger StrNum0[0:]StrSmaller StrNum1[0:]else if StrNum0[_].to_int StrNum1[_].to_int thenSign Sign1StrLonger StrNum1[0:]StrSmaller StrNum0[0:]end ifif Sign ! then breakend forend ifif Sign then Sign Sign0StrLonger StrNum0[0:]StrSmaller StrNum1[0:]end ifif Sign0 Sign1 thenSign elseSign -end ifResultStr 0while StrSmaller ! 0StrSmaller add(StrSmaller, -1)ResultStr add(ResultStr, StrLonger)end whilereturn (Sign ResultStr[1:]) end functiondiv function(Str0, Str1)Str0 Str0.trimStr1 Str1.trimif Str0[0] or Str0[0] - thenStrNum0 Str0[1:]elseStrNum0 Str0[0:]end if while StrNum0[0] 0 and len(StrNum0) 1StrNum0 StrNum0[1:]end whileif Str1[0] or Str1[0] - thenStrNum1 Str1[1:]elseStrNum1 Str1[0:]end ifwhile StrNum1[0] 0 and len(StrNum1) 1StrNum1 StrNum1[1:]end whileif StrNum1 0 then exit(Runtime error: divide by zero)if StrNum0 0 then return [0, 0]if Str0[0] - then Sign0 -elseSign0 end ifif Str1[0] - then Sign1 -elseSign1 end ifif Sign0 Sign1 thenSign elseSign -end ifResultStr 0TempStr sub(StrNum0, StrNum1)while TempStr[0] ! - StrNum0 TempStrTempStr sub(StrNum0, StrNum1)ResultStr add(ResultStr, 1)end whileif ResultStr[0] then ResultStr Sign ResultStr[1:]end ifif StrNum0[0] then StrNum0 Sign0 StrNum0[1:]end ifreturn [ResultStr, StrNum0] end functionpow function(Str0, Str1)Str0 Str0.trimStr1 Str1.trimif Str0[0] or Str0[0] - thenStrNum0 Str0[1:]elseStrNum0 Str0[0:]end if while StrNum0[0] 0 and len(StrNum0) 1StrNum0 StrNum0[1:]end whileif Str1[0] or Str1[0] - thenStrNum1 Str1[1:]elseStrNum1 Str1[0:]end ifwhile StrNum1[0] 0 and len(StrNum1) 1StrNum1 StrNum1[1:]end whileif StrNum1 0 then return 1if StrNum0 0 then return 0if Str0[0] - then Sign0 -elseSign0 end ifif Str1[0] - then Sign1 -elseSign1 end ifResultStr 1while StrNum1 ! 0ResultStr mul(ResultStr, Sign0 StrNum0)StrNum1 add(StrNum1, -1)end whilereturn ResultStr end function// print(add(params[0],params[1])) // print(sub(params[0],params[1])) // print(mul(params[0],params[1])) // print(div(params[0],params[1])) // print(pow(params[0],params[1]))
http://www.huolong8.cn/news/130546/

相关文章:

  • 论坛建站哪个比较好网站推广有哪些常用的方法
  • 惠州网站推广网站服务器的功能
  • 怎么做网站备案wordpress多说
  • 北京产品网站建设陕西哪些公司做企业网站
  • 不同网站的主机和域名网上商城有哪些
  • 聊城企业做网站推广达州北京网站建设
  • 霸州建设局网站网站认证怎么做
  • 佛山市多语言营销型网站建站网上商城html模板
  • 上杭网站网站建设遇到哪些危险
  • 网站做下cdnwordpress代码转义
  • 怎样做网站底部导航怎么样做网站赚钱
  • 网站备案 现场提交广西住房与建设厅网站
  • 深圳建网站信科精简wordpress头部信息
  • 电商网站建设方案PPT网站源码哪个好
  • 网站策划方案目标三栏式布局的网站有哪些
  • 公司网站注销百度推广业务员电话
  • 网站分享网站建设前的市场分析
  • 网站开发技术描述菏泽网站建设哪家好
  • 指数网站东莞网站制作企业网站
  • 网站建立使用方法626969com域名信息查询
  • 重庆设计网站建设东营外贸型网站设计
  • 廊坊做网站外包服装公司logo设计
  • 企业网站营销的成功案例东莞网站建设 服饰
  • 整形网站整站源码江苏省建设招标网站首页
  • 如何上传到网站根目录上海哪家做网站关键词排名
  • 国外做彩票网站违法吗凡客建网站
  • 各网站网络营销产品价格策略mediwiki 做网站
  • 网站建设基础培训上海办公室设计装修公司
  • 深圳的知名网站设计有哪些医院网站建设细节
  • 苏州专业网站建设开发网站关键字挖掘