Submission #3089937


Source Code Expand

Copy
var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', function(line) {
  lines.push(line);
});

reader.on('close', function() {
    var cnt = 0;
    var A = lines.map(function(a) {return parseInt(a)});
    for(var i = 0; i <= A[0]; i++)
        for(var j = 0; j <= A[1]; j++)
            for(var k = 0; k <= A[2]; k++)
                if(i * 500 + j * 100 + k * 50 === A[3])
                    cnt++;
    console.log(cnt);
});

Submission Info

Submission Time
Task ABC087B - Coins
User my316g
Language JavaScript (node.js v5.12)
Score 200
Code Size 529 Byte
Status
Exec Time 61 ms
Memory 7628 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample01.txt, sample02.txt, sample03.txt
All 200 / 200 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, sample01.txt, sample02.txt, sample03.txt
Case Name Status Exec Time Memory
01.txt 61 ms 7628 KB
02.txt 60 ms 7628 KB
03.txt 60 ms 7628 KB
04.txt 61 ms 7628 KB
05.txt 60 ms 7628 KB
06.txt 61 ms 7628 KB
07.txt 61 ms 7628 KB
08.txt 60 ms 7500 KB
09.txt 60 ms 7628 KB
10.txt 60 ms 7628 KB
sample01.txt 60 ms 7628 KB
sample02.txt 60 ms 7500 KB
sample03.txt 61 ms 7628 KB