Submission #91376


Source Code Expand

Copy
print=console.log;
ls=require("fs").readFileSync("/dev/stdin","utf-8").split("\n");ls.length--
Object.prototype.trace = function(){ print(this+""); return this };
String.prototype.int = function(c){ return this.split(c||" ").map(int)};
String.prototype.count = function(sub){ for (var c=i=0;i>=0;i=this.indexOf(sub,i+1),++c); return c };
ap = Array.prototype;
ap.trace = function(){ print(this); return this };
ap.max = function(){ return Math.max.apply(null, this) };
ap.min = function(){ return Math.min.apply(null, this) };
ap.copy = function(){ return this.map(id) };
ap.rotate = function(n){ return this.slice(n, this.length).concat(this.slice(0, n)) };
ap.shuffle = function(){
  return this.map(function(x){return [Math.random(),x]})
             .sort(function(a,b){return a[0]-b[0]}).map(function(x){return x[1]})
};
ap.permutation = function () {
  if (this.length == 0) return [];
  if (this.length == 1) return [this];
  var ret=[], ar=this, i=0;
  for (; i<ar.length; ++i)
    ret=ret.concat(ar.slice(0, i)
           .concat(ar.slice(i+1, ar.length))
           .permutation()
           .map(function(p){ return p.concat(ar[i]) }));
  return ret;
};
ap.flatten = function(){ for (var i=0,r=[]; i<this.length; ++i) r=r.concat(this[i]); return r };
ap.nub = function() {
  var that = this;
  return this.filter(function(x, i) {
    return that.slice(i+1).indexOf(x) < 0
  });
};
function iota(n,b,s){ b=b||0; s=s||1; for (var r=[];n--;b+=s) r.push(b); return r }
function int(s){return +s}
function add(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 sq(x){return x*x}



(function main() {

var cx=0;
for (var i=1;i<ls.length;++i) {
  a = ls.int();
  b = a.reduce(add)
  if (b < 20) ++cx;
}
print(cx);

})();

// vim: set ft=javascript:

Submission Info

Submission Time
Task B - 天下一難易度設定
User cympfh
Language JavaScript (Node.js 0.6.12)
Score 0
Code Size 1870 Byte
Status
Exec Time 229 ms
Memory 11396 KB

Test Cases

Set Name Score / Max Score Test Cases
All 0 / 30 01_input10, 01_input11, 01_input12, 01_input13, 01_input14, 01_input15, 01_input16, 01_input17, 01_input18, 01_input19, 01_input2, 01_input20, 01_input21, 01_input22, 01_input23, 01_input24, 01_input25, 01_input26, 01_input27, 01_input28, 01_input29, 01_input3, 01_input30, 01_input4, 01_input5, 01_input6, 01_input7, 01_input8, 01_input9, 01_manual1, 01_rand31, 01_rand32, 01_rand33, 01_rand34, 01_rand35, 01_rand36, 01_rand37, 01_rand38, 01_rand39, 01_rand40, 01_rand41, 01_rand42, 01_rand43, 01_rand44, 01_rand45, 01_rand46, 01_rand47, 01_rand48, 01_rand49, 01_rand50, 01_rand51, 01_rand52, 01_rand53, 01_rand54, 01_rand55, 01_rand56, 01_rand57, 01_rand58, 01_rand59, 01_rand60, 01_rand61, 01_rand62, 01_rand63, 01_rand64, 01_rand65, 01_rand66, 01_rand67, 01_rand68, 01_rand69, 01_rand70, 01_rand71, 01_rand72, 01_rand73, 01_rand74, 01_rand75, 01_rand76, 01_rand77, 01_rand78, 01_rand79, 01_rand80, 01_rand81, 01_rand82, 01_rand83, 01_rand84, 01_rand85, 01_rand86, 01_rand87, 01_rand88, 01_rand89, 01_rand90, 01_rand91, 01_rand92, 01_rand93, 01_rand94, 01_rand95, 01_rand96, 01_rand97, 01_rand98, 01_rand99
Case Name Status Exec Time Memory
01_input10 223 ms 11240 KB
01_input11 171 ms 11244 KB
01_input12 190 ms 11236 KB
01_input13 180 ms 11248 KB
01_input14 176 ms 11112 KB
01_input15 177 ms 11260 KB
01_input16 180 ms 11244 KB
01_input17 179 ms 11360 KB
01_input18 179 ms 11236 KB
01_input19 173 ms 11240 KB
01_input2 172 ms 11240 KB
01_input20 175 ms 11360 KB
01_input21 174 ms 11228 KB
01_input22 179 ms 11244 KB
01_input23 186 ms 11236 KB
01_input24 177 ms 11236 KB
01_input25 173 ms 11240 KB
01_input26 183 ms 11236 KB
01_input27 171 ms 11240 KB
01_input28 175 ms 11244 KB
01_input29 170 ms 11240 KB
01_input3 174 ms 11348 KB
01_input30 170 ms 11236 KB
01_input4 178 ms 11236 KB
01_input5 172 ms 11244 KB
01_input6 174 ms 11236 KB
01_input7 173 ms 11244 KB
01_input8 175 ms 11368 KB
01_input9 173 ms 11244 KB
01_manual1 174 ms 11240 KB
01_rand31 174 ms 11244 KB
01_rand32 170 ms 11216 KB
01_rand33 173 ms 11272 KB
01_rand34 173 ms 11244 KB
01_rand35 174 ms 11240 KB
01_rand36 174 ms 11268 KB
01_rand37 181 ms 11240 KB
01_rand38 173 ms 11240 KB
01_rand39 174 ms 11108 KB
01_rand40 174 ms 11232 KB
01_rand41 174 ms 11236 KB
01_rand42 175 ms 11228 KB
01_rand43 171 ms 11336 KB
01_rand44 172 ms 11232 KB
01_rand45 170 ms 11220 KB
01_rand46 175 ms 11240 KB
01_rand47 176 ms 11248 KB
01_rand48 176 ms 11228 KB
01_rand49 182 ms 11348 KB
01_rand50 180 ms 11236 KB
01_rand51 170 ms 11224 KB
01_rand52 175 ms 11244 KB
01_rand53 176 ms 11236 KB
01_rand54 182 ms 11240 KB
01_rand55 171 ms 11240 KB
01_rand56 169 ms 11236 KB
01_rand57 176 ms 11244 KB
01_rand58 171 ms 11236 KB
01_rand59 175 ms 11240 KB
01_rand60 180 ms 11224 KB
01_rand61 174 ms 11240 KB
01_rand62 173 ms 11240 KB
01_rand63 169 ms 11112 KB
01_rand64 172 ms 11232 KB
01_rand65 178 ms 11224 KB
01_rand66 176 ms 11240 KB
01_rand67 175 ms 11236 KB
01_rand68 172 ms 11124 KB
01_rand69 169 ms 11240 KB
01_rand70 184 ms 11236 KB
01_rand71 179 ms 11228 KB
01_rand72 174 ms 11236 KB
01_rand73 180 ms 11220 KB
01_rand74 168 ms 11364 KB
01_rand75 173 ms 11240 KB
01_rand76 172 ms 11228 KB
01_rand77 171 ms 11108 KB
01_rand78 174 ms 11264 KB
01_rand79 173 ms 11240 KB
01_rand80 183 ms 11356 KB
01_rand81 173 ms 11244 KB
01_rand82 178 ms 11372 KB
01_rand83 178 ms 11236 KB
01_rand84 175 ms 11244 KB
01_rand85 171 ms 11240 KB
01_rand86 173 ms 11264 KB
01_rand87 173 ms 11240 KB
01_rand88 172 ms 11236 KB
01_rand89 173 ms 11228 KB
01_rand90 172 ms 11364 KB
01_rand91 229 ms 11248 KB
01_rand92 173 ms 11332 KB
01_rand93 173 ms 11244 KB
01_rand94 170 ms 11244 KB
01_rand95 175 ms 11396 KB
01_rand96 171 ms 11244 KB
01_rand97 169 ms 11232 KB
01_rand98 175 ms 11236 KB
01_rand99 175 ms 11240 KB