codeHunt Level 01

codeHunt参考

我用的是C#

01

using System;
public class Program {
    public static int Puzzle(int x) {
        return -x;
    }
}

02

using System;
public class Program {
    public static int Puzzle(int x) {
        return x -2;
    }
}

03

using System;
public class Program {
    public static int Puzzle(int x) {
        return x*x;
    }
}

04

using System;
public class Program {
    public static int Puzzle(int x) {
        return 3 * x;
    }
}

05

using System;
public class Program {
    public static int Puzzle(int x) {
        return x / 3;
    }
}

06

using System;
public class Program {
    public static int Puzzle(int x) {
        return 4/x;
    }
}

07

using System;
public class Program {
    public static int Puzzle(int x, int y) {
        return x - y;
    }
}

08

using System;
public class Program {
    public static int Puzzle(int x, int y) { 
        return x + 2 * y;
    }
}

09

using System;
public class Program {
    public static int Puzzle(int x, int y) {
        return x * y;
    }
}

10

using System;
public class Program {
    public static int Puzzle(int x, int y) {
        return x + y / 3;
    }
}

11

using System;
public class Program {
    public static int Puzzle(int x, int y) { 
        return x / y  ;
    }
}

12

using System;
public class Program {
    public static int Puzzle(int x) {
        return x % 3;
    }
}

13

using System;
public class Program {
    public static int Puzzle(int x) {
        return x % 3  + 1;
    }
}

14

using System;
public class Program {
    public static int Puzzle(int x) {
        return 10 % x;
    }
}

15

using System;
public class Program {
    public static int Puzzle(int x, int y, int z) {
        return (x+y+z)/3;
    }
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容