From c2c941809e232b8bff7d251d7f850fcb034194de Mon Sep 17 00:00:00 2001 From: Mirajul Islam Mahim <30780836+AKmahim@users.noreply.github.com> Date: Fri, 8 Apr 2022 23:44:26 +0600 Subject: [PATCH] Create uri-1006-js.js --- uri-1006-js.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 uri-1006-js.js diff --git a/uri-1006-js.js b/uri-1006-js.js new file mode 100644 index 0000000..d2aa5e9 --- /dev/null +++ b/uri-1006-js.js @@ -0,0 +1,8 @@ +var input = require('fs').readFileSync('/dev/stdin', 'utf8') +var lines = input.split('\n') + +var a = parseFloat(lines.shift()).toFixed(1) +var b = parseFloat(lines.shift()).toFixed(1) +var c = parseFloat(lines.shift()).toFixed(1) + +console.log('MEDIA = ' + ((a*2+b*3+c*5)/10).toFixed(1))