V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
如果想在 V2EX 获得更好的推广效果,欢迎了解 PRO 会员机制:
https://www.v2ex.com/pro/about
tq0fqeu
V2EX  ›  推广

1024 阿里云的运营小姐姐搞了个重构代码送 Cherry 键盘的活动

  •  
  •   tq0fqeu · Oct 24, 2020 · 4541 views
    This topic created in 2024 days ago, the information mentioned may be changed or developed.

    地址

    https://college.devops.aliyun.com

    欢迎大家来过节!!

    (何盈你可以把农药账号还给我了。。。)

    25 replies    2020-10-28 17:14:24 +08:00
    mahaonan1994
        1
    mahaonan1994  
       Oct 24, 2020
    奖品第二行中间这个是什么啊?
    opengps
        2
    opengps  
       Oct 24, 2020
    @mahaonan1994 霸王防脱发,程序员 1024 专属😃
    RedisMasterNode
        3
    RedisMasterNode  
       Oct 24, 2020
    限 java 。。。。
    tribute
        4
    tribute  
       Oct 24, 2020 via Android
    霸王🌝🌝🌝
    Reminders
        5
    Reminders  
       Oct 24, 2020
    KotlinAmai
        6
    KotlinAmai  
       Oct 24, 2020
    话说为什么奖品里面还有云效体验卡
    Reminders
        7
    Reminders  
       Oct 24, 2020
    @codingbody #5 第二次提交过了,一瓶霸王
    KotlinAmai
        8
    KotlinAmai  
       Oct 24, 2020 via Android
    @actar 连瓶霸王都不给的吗。
    earther01
        9
    earther01  
       Oct 24, 2020
    @codingbody 要提交 main 方法吗?我的运行分数一直是 0 分,也不知道哪里报错了
    Reminders
        10
    Reminders  
       Oct 24, 2020
    @earther01 #9 不用,我就直接用 jdk 的观察者。
    earther01
        11
    earther01  
       Oct 24, 2020
    @codingbody 原来是少了一个 import,没提示好蛋疼
    Reminders
        12
    Reminders  
       Oct 24, 2020
    @earther01 #11 好想知道 「代码复度」 怎么得 100
    earther01
        13
    earther01  
       Oct 24, 2020
    @codingbody 你说的代码复杂度吧,我参考你的思路用了 jdk 的观察者 Observer,复杂度就直接 100 分了
    zxCoder
        14
    zxCoder  
       Oct 24, 2020
    第一关都不会。。。枯了
    OldActorsSmile
        15
    OldActorsSmile  
       Oct 25, 2020
    好像都是 java 的,这个语言不熟,尴尬了
    PEPEXXX
        16
    PEPEXXX  
       Oct 25, 2020 via iPhone
    连个霸王都没给我
    metrxqin
        17
    metrxqin  
       Oct 25, 2020
    有点趣味性,第一个关卡中了一瓶霸王。
    yinuxy
        18
    yinuxy  
       Oct 26, 2020
    @earther01 我也是这个问题,老哥是怎么改的
    earther01
        19
    earther01  
       Oct 26, 2020
    @yinuxy 编译不过的原因有很多,我是没加 import,你可以把代码下载到本地去 ide 里看看有没有报错
    KotlinAmai
        20
    KotlinAmai  
       Oct 27, 2020
    云效打气卡又是什么鬼
    Reminders
        21
    Reminders  
       Oct 27, 2020
    @actar #20 不懂保龄球啥意思
    clf
        22
    clf  
       Oct 28, 2020
    @codingbody #12 代码越简单越好。就定义一个 Machine 的接口,然后在 data 类里去通知 3 个 machine 修改了就行。用 jdk 的 Observer 会附带太多的无用方法导致复杂度过高。
    clf
        23
    clf  
       Oct 28, 2020
    第二题卡 99.5 了,想知道 100 分的代码是怎么样的。难道是 roll()方法里就做了分数计算?@actar

    不过我运气不错,全拿到礼物了。

    KotlinAmai
        24
    KotlinAmai  
       Oct 28, 2020
    @lychs1998 我没有在 roll 方法里做计算,只不过是把计算方法简化了一下。看着原来的代码里太乱,直接照着规则重写了。
    clf
        25
    clf  
       Oct 28, 2020
    @actar #24 最后发现只要把
    if () {

    } else if () {

    }
    return xxx;

    改写成

    if () {

    return xxx;
    }
    if () {

    }
    return xxx;

    就可以 100 了。还以为有更高效的算法没发现……瞎忙活了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   903 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 64ms · UTC 22:13 · PVG 06:13 · LAX 15:13 · JFK 18:13
    ♥ Do have faith in what you're doing.