狗年第一天我在 LC 上用 Go 刷了编号为 168 的题。 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
请不要在回答技术问题时复制粘贴 AI 生成的内容
banxi1988
V2EX    程序员

狗年第一天我在 LC 上用 Go 刷了编号为 168 的题。

  •  1
     
  •   banxi1988
    banxi1988 2018-02-16 11:49:12 +08:00 6282 次点击
    这是一个创建于 2826 天前的主题,其中的信息可能已经有所发展或是发生改变。
    14 条回复    2018-02-17 11:10:14 +08:00
    azh7138m
        1
    azh7138m  
       2018-02-16 12:58:33 +08:00 via Android
    前段时间不是有个 php 的过来吐槽 Perl 加法吗,了解一下
    alcarl
        2
    alcarl  
       2018-02-16 13:39:15 +08:00 via Android
    @azh7138m perl 加法肿么了⊙⊙!
    azh7138m
        3
    azh7138m  
       2018-02-16 14:19:33 +08:00 via Android
    @alcarl 就是这题。。。。
    stzz
        4
    stzz  
       2018-02-16 17:23:04 +08:00 via Android
    打开要登陆,登陆完 404
    Cbdy
        6
    Cbdy  
       2018-02-16 17:53:26 +08:00
    10 进制转 26 进制?
    以前写过一个 10 进制转 62 进制的小方法用来压缩字符串。。。
    banxi1988
        7
    banxi1988  
    OP
       2018-02-16 18:05:54 +08:00
    @Cbdy 基本思路是这样子的。 但是有额外的问题需要处理。
    主要是这个列名中是没有 0 值的。
    0person
        8
    0person  
       2018-02-16 18:08:28 +08:00 via Android
    502
    naiba
        9
    naiba  
       2018-02-16 18:29:32 +08:00 via Android
    你这个叫 LCC 吧
    cheesea
        10
    cheesea  
       2018-02-16 19:35:29 +08:00   1
    账户不互通,没有讨论。
    综上 lcc 打入死牢
    banxi1988
        11
    banxi1988  
    OP
       2018-02-16 20:29:52 +08:00
    @0person 已经恢复了。
    @cheesea 这个我又注册了一次。主要是觉得国内版网络应该快一些,可能以后人气也会旺一些。

    又刷了两个吉祥序号题。66 和 88
    hazhaz
        12
    hazhaz  
       2018-02-16 22:57:16 +08:00
    @cheesea 刚开放测试啊,讨论应该是会有的吧,总之不用翻墙了。新年想刷个 666,结果有 665,有 667,结果就是没有 666
    ToT
        13
    ToT  
       2018-02-17 04:58:25 +08:00
    @hazhaz

    LeetCode 666 Path Sum IV

    If the depth of a tree is smaller than 5, then this tree can be represented by a list of three-digits integers.

    For each integer in this list:
    The hundreds digit represents the depth D of this node, 1 <= D <= 4.
    The tens digit represents the position P of this node in the level it belongs to, 1 <= P <= 8. The position is the same as that in a full binary tree.
    The units digit represents the value V of this node, 0 <= V <= 9.
    Given a list of ascending three-digits integers representing a binary with the depth smaller than 5. You need to return the sum of all paths from the root towards the leaves.

    Example 1:
    Input: [113, 215, 221]
    Output: 12
    Explanation:
    The tree that the list represents is:
    3
    / \
    5 1

    The path sum is (3 + 5) + (3 + 1) = 12.
    Example 2:
    Input: [113, 221]
    Output: 4
    Explanation:
    The tree that the list repesents is:
    3
    \
    1

    The path sum is (3 + 1) = 4.
    hazhaz
        14
    hazhaz  
       2018-02-17 11:10:14 +08:00
    @ToT lccn 没有啊,老板富啊,美金玩家啊
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5675 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 32ms UTC 06:27 PVG 14:27 LAX 22:27 JFK 01:27
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86