【垃圾菜鸟不务正业】Code Hunt编程游戏01.*
2014-05-20 10:23
375 查看
挺有意思的,解一下试试 2014年5月19日16:32:29
01.01
99 10
01.01
0 | 0 |
33 | -33 |
1 | -1 |
public class Program { public static int Puzzle(int x) { return 0-x;//结果与x相加为0 } }01.02
0 | -2 |
33 | 31 |
1 | -1 |
public class Program { public static int Puzzle(int x) { return x-2;//结果比x小2 } }01.03
0 | 0 |
33 | 1089 |
1 | 1 |
public class Program { public static int Puzzle(int x) { return x*x;//结果为x的平方 } }01.04
0 | 0 |
33 | 99 |
1 | 3 |
public class Program { public static int Puzzle(int x) { return x*3; } }01.05
0 | 0 |
33 | 11 |
1 | 0 |
public class Program { public static int Puzzle(int x) { return x/3;//因为是int类型所以不够除的为0 } }01.06
29 | 0 |
2 | 2 |
1 | 4 |
public class Program { public static int Puzzle(int x) { return 4/x;//x喂int类型 } }01.07
1 | 1 | 0 |
2 | 2 | 0 |
public class Program { public static int Puzzle(int x, int y) { return x-y;//估计这个没写出来的一定是想难了 } }01.08
29 | 33 | 95 |
1 | 1 | 3 |
public class Program { public static int Puzzle(int x, int y) { return y*2+x;//在29 33 得 95 可以看出 66 +29 } }01.09
1 | 1 | 1 |
2 | 2 | 4 |
3 | 3 | 9 |
public class Program { public static int Puzzle(int x, int y) { return x*y;//x与y的积 } }01.10
1 | 1 | 1 |
2 | 2 | 4 |
5 | 38 | 17 |
1 | 770 | 257 |
public class Program { public static int Puzzle(int x, int y) { return (3 * x + y) / 3;//很显然与上面的答案不同
/*这题在提示中默认值给了前两行比较不让人省心*/ } }01.11
29 | 33 | 0 |
97 | 96 | 1 |
0 | 1 | 0 |
1 | 1 | 1 |
2 | 1 | 2 |
4 | -64 | 0 |
public class Program { public static int Puzzle(int x, int y) { return x/y;//就是因为是int类型的 } }01.12
23 | 2 |
4 | 1 |
0 | 0 |
public class Program { public static int Puzzle(int x) { //23 2 //4 1 //0 0 return x%3; } }01.13
23 | 3 |
4 | 2 |
0 | 1 |
public class Program { public static int Puzzle(int x) { return x%3+1;//与上面完全是一道题 } }01.14 You will have to use the modulo % operator to solve this one.
3 | 1 |
10 | 0 |
1 | 0 |
4 | 2 |
public class Program { public static int Puzzle(int x) { return 10%x; } }01.15
44 | 33 | 48 | 41 |
0 | 0 | 0 | 0 |
public class Program { public static int Puzzle(int x, int y, int z) { return (x+y+z)/3; } }
相关文章推荐
- 编程学习游戏(1)Code Hunt
- 微软研究院正式发布编程学习游戏Hunt Code
- 妈妈再也不用担心我的编程 学习游戏CodeCombat开源
- CodeCombat游戏全面开源:玩游戏也能学编程
- 超级菜鸟 DirectX 8 游戏编程入门讲座(转贴)
- Day 2:codecombat边游戏边编程
- CodeCombat编程游戏
- CodeCombat中国 - 通过游戏学习编程,寓教于乐|致力于为中国编程爱好者提供更好的服务
- CodeCombat游戏全面开源:玩游戏也能学编程
- DirectX5.0最新游戏编程指南
- 三维圈夹游戏人机编程
- 浅谈网络游戏的设计——服务器端编程 (2)
- 网络游戏中的网络编程
- Symbian游戏编程入门 (一) Symbian OS简介
- DirectX5.0最新游戏编程指南 DirectDraw篇 二、DirectDraw的体系
- 无责任书评——游戏编程精粹
- 浅谈网络游戏的设计--——服务器端编程(3)
- DirectX5.0最新游戏编程指南 DirectDraw篇 三、DirectDraw的要素(二)
- 菜鸟编程的“十大好习惯”
- Symbian游戏编程入门 (二)开发环境入门