diff --git a/easiest/input.txt b/easiest/input.txt new file mode 100644 index 0000000..10d40ad --- /dev/null +++ b/easiest/input.txt @@ -0,0 +1,5 @@ +4 +3029 +4 +5 +42 \ No newline at end of file diff --git a/easiest/output.txt b/easiest/output.txt new file mode 100644 index 0000000..b8132d6 --- /dev/null +++ b/easiest/output.txt @@ -0,0 +1,8 @@ +3029 +undefined +4 +undefined +5 +undefined +42 +undefined diff --git a/easiest/stub.dsl b/easiest/stub.dsl new file mode 100644 index 0000000..f9ec657 --- /dev/null +++ b/easiest/stub.dsl @@ -0,0 +1,7 @@ +function(integer, findMultiplier, integer N) +integer(k) +loop(k) + integer(N) + invoke(integer, p, findMultiplier, N) + print(integer, p) +endloop \ No newline at end of file diff --git a/easiest/stub.js b/easiest/stub.js new file mode 100644 index 0000000..c858104 --- /dev/null +++ b/easiest/stub.js @@ -0,0 +1,52 @@ +'use strict'; + +const fs = require('fs'); + +process.stdin.resume(); +process.stdin.setEncoding('utf-8'); + +let inputString = ''; +let currentLine = 0; + +process.stdin.on('data', function(inputStdin) { + inputString += inputStdin; +}); + +process.stdin.on('end', function() { + inputString = inputString.split('\n'); + + main(); +}); + +function readLine() { + return inputString[currentLine++]; +} + +/* + * Complete the 'findMultiplier' function below. + * + * The function is expected to return an INTEGER. + * The function accepts INTEGER N as parameter. + */ + +function findMultiplier(N) { + // Write your code here + + console.log(N) +} + +function main() { + const ws = process.stdout; + + const k = parseInt(readLine().trim(), 10); + + for (let kItr = 0; kItr < k; kItr++) { + const N = parseInt(readLine().trim(), 10); + + const p = findMultiplier(N); + + ws.write(p + '\n'); + } + + ws.end(); +}