Skip to content

Commit edc3eee

Browse files
authored
Merge pull request #21 from sinuoustalker/master
Simple javascript problem
2 parents e07eb62 + e8695d6 commit edc3eee

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ https://hackerrank.com/challenges/[FILENAME_WITHOUT_EXTENSION]/problem
4040
| [Archana Prabhu](https://github.com/ArchanaPrabhu/) | India | C++ |
4141
| [Aman Sharma](https://github.com/amsharma44/) | India | C# |
4242
| [Carlos Gomez](https://github.com/Kurolox/) | Spain | |
43+
| [Jason Aiken](https://github.com/sinuoustalker/) | United States | |
4344
| [Saiij](https://github.com/Saiij/) | Germany | JavaScript |
4445
| [Apurva](https://github.com/alonemayank) | United States | Java |
4546

solve-me-first.javascript

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
process.stdin.resume();
2+
process.stdin.setEncoding('ascii');
3+
4+
var input_stdin = "";
5+
var input_stdin_array = "";
6+
var input_currentline = 0;
7+
8+
process.stdin.on('data', function (data) {
9+
input_stdin += data;
10+
});
11+
12+
process.stdin.on('end', function () {
13+
input_stdin_array = input_stdin.split("\n");
14+
main();
15+
});
16+
17+
function readLine() {
18+
return input_stdin_array[input_currentline++];
19+
}
20+
21+
function solveMeFirst(a, b) {
22+
return a+b;
23+
}
24+
25+
26+
function main() {
27+
var a = parseInt(readLine());
28+
var b = parseInt(readLine());;
29+
30+
var res = solveMeFirst(a, b);
31+
console.log(res);
32+
}

0 commit comments

Comments
 (0)