
coding game
文章平均质量分 53
GoldenaArcher
Done is better than perfect
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
coding game 完成目录
coding game 完成目录理想还是要有的,万一哪天做的七七八八了呢EasyThe DescentPOWER OF THOR - EPISODE 1MediumHard原创 2021-04-17 01:54:24 · 250 阅读 · 0 评论 -
Coding Game - Defibrillators
Defibrillators问题地址:Defibrillators。这道题难的地方不是在于代码实现有多难,而是能不能审题审清楚了:计算公式都算对了吗?x=(longitudeB−longitudeA)×cos(latitudeA+latitudeB2)x = (longitudeB - longitudeA) \times \cos(\frac{latitudeA + latitudeB}{2})x=(longitudeB−longitudeA)×cos(2latitudeA+latitude原创 2021-04-19 02:44:28 · 2433 阅读 · 0 评论 -
Coding Game - Temperature
Temperature问题原址: TEMPERATURES,讲道理这个难度是四星就离谱,我觉得 1-2 差不多了……题目分解其实这道题就很简单了,就是读取一个数组,然后找到其中和 0 差值最小的值。不过题目中给出了两个边界条件需要注意:Display 0 (zero) if no temperatures are provided. Otherwise, display the temperature closest to 0.当数组长度为 0 时返回 0,这也就是 for 循环体外的 if原创 2021-04-18 01:12:59 · 378 阅读 · 0 评论 -
Coding Game - POWER OF THOR - EPISODE 1
POWER OF THOR - EPISODE 1问题地址: POWER OF THOR - EPISODE 1问题大意:Thor 需要找到光的能量(大古熬成汤?),有 8 个方向可以移动,就是东南西北四个垂直的方向,还有东南、东北、西南、西北四个对角线方向。初始的时候提供了四个变量:the variable lightX: the X position of the light of power that Thor must reach.the variable lightY: the Y原创 2021-04-17 01:13:21 · 653 阅读 · 0 评论 -
Coding Game - The Descent
The Descent问题原地址: The Descent。问题大意:其实就是用 for 循环检查当前循环体内的最大值,然后输出该最大值。说的很花里胡哨的,意思就这么简单解题方案:/** * The while loop represents the game. * Each iteration represents a turn of the game * where you are given inputs (the heights of the mountains) * and w原创 2021-04-14 02:06:34 · 910 阅读 · 2 评论