Submission #106891


Source Code Expand

Copy
print=console.log;
ls=require("fs").readFileSync("/dev/stdin","utf-8").split("\n");ls.length--

op = Object.prototype;
op.toString = function(){
  var s=[];
  for(var i in this)if(this.hasOwnProperty(i))s=s.concat(i+":"+this[i]);
  return "{"+s.join(",")+"}" };
op.trace = function(x){
  process.stderr.write((x?(x+": "):"")+this+"\n"); return this };

ap = Array.prototype;
ap.toString = function(){ return "["+this.join(",")+"]" };
ap.max = function(){ return Math.max.apply(null, this) };
ap.min = function(){ return Math.min.apply(null, this) };
ap.sum = function(){ return this.reduce(add) };
ap.prod = function(){return this.reduce(mul) };
ap.copy = function(){ return this.map(id) };

function forIn(o,f){ for (var x in o) if (o.hasOwnProperty(x)) f(x); }
function forOf(o,f){ for (var x in o) if (o.hasOwnProperty(x)) f(o[x]); }

function iota(n,b,s){ b=b||0; s=s||1; for (var r=[];n--;b+=s) r.push(b); return r }
function add(a,b){return a+b}
function mul(a,b){return a*b}
function sub(a,b){return a-b}
function bus(a,b){return b-a}
function id(x){return x}
function int(x){return +x}

(function main() {

h1=+ls[0]
h2=+ls[1]
print(h1-h2);

})();

// vim: set ft=javascript:

Submission Info

Submission Time
Task A - 積雪深差
User cympfh
Language JavaScript (Node.js 0.6.12)
Score 100
Code Size 1223 Byte
Status
Exec Time 1149 ms
Memory 11132 KB

Judge Result

Set Name Score / Max Score Test Cases
all 100 / 100 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt
Case Name Status Exec Time Memory
00_sample_01.txt 1149 ms 10988 KB
00_sample_02.txt 172 ms 10992 KB
00_sample_03.txt 218 ms 10996 KB
test_01.txt 179 ms 11004 KB
test_02.txt 172 ms 11000 KB
test_03.txt 173 ms 11000 KB
test_04.txt 173 ms 11000 KB
test_05.txt 170 ms 10996 KB
test_06.txt 177 ms 10984 KB
test_07.txt 191 ms 10992 KB
test_08.txt 174 ms 10996 KB
test_09.txt 268 ms 10928 KB
test_10.txt 167 ms 10996 KB
test_11.txt 168 ms 10864 KB
test_12.txt 173 ms 10984 KB
test_13.txt 183 ms 11000 KB
test_14.txt 195 ms 11076 KB
test_15.txt 178 ms 11068 KB
test_16.txt 169 ms 10984 KB
test_17.txt 171 ms 11132 KB