• 请不要在回答技术问题时复制粘贴 AI 生成的内容
windirt
V2EX  ›  程序员

一个租房广告引发的代码战争

  •  
  •   windirt ·
    windirt · Jun 22, 2016 · 21501 views
    This topic created in 3661 days ago, the information mentioned may be changed or developed.
    起因是有人在群里贴了这个租房广告



    然后有人贴了随手写的解决方案





    跟着又是贴各种精简版







    106 replies    2016-06-24 13:57:54 +08:00
    1  2  
    suduo1987
        101
    suduo1987  
       Jun 23, 2016
    这个请心算好么
    pan020037
        102
    pan020037  
       Jun 23, 2016
    @woshiyigexiaohao
    为什么要这么写......
    本来就是一维数组 你非要再套一层吗?
    chai2010
        103
    chai2010  
       Jun 23, 2016
    swift:
    print([2,0,3,2,4,0,1,3,2,3,3].map { [8,2,1,0,3][$0] }.reduce("") { "\($0)\($1)" })
    fish
        104
    fish  
       Jun 23, 2016
    这确实是一个非常好的办法!
    wayslog
        105
    wayslog  
       Jun 23, 2016
    PHP: echo '18013820100'

    ...
    ...
    ...
    lzhr
        106
    lzhr  
       Jun 24, 2016
    多大的房子,写 java 的住得下吗?
    1  2  
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5561 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 06:47 · PVG 14:47 · LAX 23:47 · JFK 02:47
    ♥ Do have faith in what you're doing.