AtCoder Beginner Contest 001

Submission #182657

Source codeソースコード

var fs = require('fs')
  , _
;

(function() {
  var ls = fs.readFileSync('/dev/stdin', 'utf8').split('\n').slice(0, -1);
  GLOBAL.readline = function() {
    if (ls.length === 0) return false;
    _ = ls.shift();
    return _;
  };
  GLOBAL.readints = function() {
    if (ls.length === 0) return false;
    _ = words(ls.shift()).map(int);
    return _;
  };
  GLOBAL.readint = function() {
    if (ls.length === 0) return false;
    _ = int(ls.shift());
    return _;
  };
}());

log = console.log;
warn = console.warn;
int = function(x) { return x|0 };
float = function(x) { return +x };

// string ->
function words(x) { return x.split(' ') };
function ints(x) { return words(x).map(int) };

// -> number
function add(x,y) { return x+y };
function max(x,y) { return x>y ? x : y };
function min(x,y) { return x<y ? x : y };

// -> [number]
function sort(ls) { return ls.sort(function(x,y) { return x - y }) };
function iota(n,b,s) {
  b = b||0;
  s = s===void 0?1:s;
  var ret = [];
  for (var i=0;i<n;++i) { ret[i] = b + i * s; }
  return ret;
};

log(readint() - readint());

Submission

Task問題 A - 積雪深差
User nameユーザ名 118_ドキドキ☆ビジュアル全開マガジン
Created time投稿日時
Language言語 JavaScript (Node.js 0.6.12)
Status状態 AC
Score得点 100
Source lengthソースコード長 1127 Byte
File nameファイル名
Exec time実行時間 233 ms
Memory usageメモリ使用量 8740 KB

Test case

Set

Set name Score得点 / Max score 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

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
00_sample_01.txt AC 233 ms 8736 KB
00_sample_02.txt AC 135 ms 8728 KB
00_sample_03.txt AC 131 ms 8732 KB
test_01.txt AC 132 ms 8608 KB
test_02.txt AC 134 ms 8732 KB
test_03.txt AC 134 ms 8728 KB
test_04.txt AC 132 ms 8720 KB
test_05.txt AC 139 ms 8720 KB
test_06.txt AC 136 ms 8740 KB
test_07.txt AC 132 ms 8664 KB
test_08.txt AC 129 ms 8612 KB
test_09.txt AC 135 ms 8680 KB
test_10.txt AC 134 ms 8732 KB
test_11.txt AC 135 ms 8724 KB
test_12.txt AC 132 ms 8728 KB
test_13.txt AC 133 ms 8552 KB
test_14.txt AC 133 ms 8696 KB
test_15.txt AC 130 ms 8552 KB
test_16.txt AC 135 ms 8652 KB
test_17.txt AC 138 ms 8732 KB