Submission #107051


Source Code Expand

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() {

function solve(m) {
  m = m/1000;
  if (m<0.1) return "00";
  if (m<=5.0) {
    var ret = (m*10)|0;
    if (ret < 10) return "0"+ret;
    else return ret;
  }
  if (m <= 30) {
    return (m+50)
  }
  if (m <= 70) {
    return ((m-30)/5)|0 + 80;
  }
  return "89"
}

m=+ls[0]
print(solve(m))

})();

// vim: set ft=javascript:

Submission Info

Submission Time
Task B - 視程の通報
User cympfh
Language JavaScript (Node.js 0.6.12)
Score 100
Code Size 1496 Byte
Status AC
Exec Time 1342 ms
Memory 11088 KB

Judge Result

Set Name all
Score / Max Score 100 / 100
Status
AC × 38
Set Name Test Cases
all 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, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 1342 ms 11088 KB
00_sample_02.txt AC 171 ms 11084 KB
00_sample_03.txt AC 178 ms 11088 KB
test_01.txt AC 177 ms 10948 KB
test_02.txt AC 173 ms 10964 KB
test_03.txt AC 176 ms 11088 KB
test_04.txt AC 171 ms 10960 KB
test_05.txt AC 171 ms 11084 KB
test_06.txt AC 174 ms 10948 KB
test_07.txt AC 174 ms 11076 KB
test_08.txt AC 171 ms 10952 KB
test_09.txt AC 170 ms 11080 KB
test_10.txt AC 176 ms 10960 KB
test_11.txt AC 176 ms 10956 KB
test_12.txt AC 175 ms 10960 KB
test_13.txt AC 174 ms 10960 KB
test_14.txt AC 173 ms 10968 KB
test_15.txt AC 173 ms 11084 KB
test_16.txt AC 178 ms 11084 KB
test_17.txt AC 173 ms 11044 KB
test_18.txt AC 171 ms 11076 KB
test_19.txt AC 182 ms 11076 KB
test_20.txt AC 184 ms 11088 KB
test_21.txt AC 170 ms 10948 KB
test_22.txt AC 175 ms 11064 KB
test_23.txt AC 170 ms 10952 KB
test_24.txt AC 174 ms 11084 KB
test_25.txt AC 184 ms 10956 KB
test_26.txt AC 175 ms 11068 KB
test_27.txt AC 171 ms 10944 KB
test_28.txt AC 182 ms 11084 KB
test_29.txt AC 177 ms 11088 KB
test_30.txt AC 179 ms 10964 KB
test_31.txt AC 178 ms 11084 KB
test_32.txt AC 188 ms 11084 KB
test_33.txt AC 179 ms 10940 KB
test_34.txt AC 182 ms 11088 KB
test_35.txt AC 175 ms 10920 KB