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;
    }
}

你可能感兴趣的:(codeHunt Level 01)