随笔分类 -  HackerRank【JavaScripts】

摘要:function main() { let r = readLine(); const PI = Math.PI; // Print the area of the circle: let area; area = PI * r * r console.log(area); // Print the perimeter of the ci... 阅读全文
posted @ 2019-07-20 11:38 乱世有歌舞 阅读(91) 评论(0) 推荐(0)
摘要:/* * Create the function factorial here */ function factorial(n) { return (n >= 1 && n <= 10) ? n * factorial(n - 1) : 1; } 阅读全文
posted @ 2019-07-20 11:27 乱世有歌舞 阅读(144) 评论(0) 推荐(0)
摘要:'use strict'; process.stdin.resume(); process.stdin.setEncoding('utf-8'); let inputString = ''; let currentLine = 0; process.stdin.on('data', inputStdin => { inputString += inputStdin; }); p... 阅读全文
posted @ 2019-07-20 11:17 乱世有歌舞 阅读(163) 评论(0) 推荐(0)