結果

問題 No.182 新規性の虜
ユーザー ontama_12ontama_12
提出日時 2016-10-03 13:44:13
言語 JavaScript
(node v21.7.1)
結果
TLE  
実行時間 -
コード長 1,009 bytes
コンパイル時間 34 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 39,296 KB
最終ジャッジ日時 2024-04-21 01:39:16
合計ジャッジ時間 7,295 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
39,040 KB
testcase_01 AC 63 ms
39,296 KB
testcase_02 AC 63 ms
39,040 KB
testcase_03 AC 64 ms
39,168 KB
testcase_04 AC 62 ms
39,040 KB
testcase_05 AC 63 ms
39,296 KB
testcase_06 AC 63 ms
39,296 KB
testcase_07 AC 64 ms
39,296 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
evil01.txt -- -
evil02.txt -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

  ///////////////////////////// 	No.182 新規性の虜
    //入力文字読み取り
    var inputall = require('fs').readFileSync('/dev/stdin', 'utf8');

    //すべて受け取り改行で区切って格納
    var input = inputall.split("\n");

    //整数の個数
    var number_int = Number (input[0]);

    //すべて空白で区切って格納
    var a_int = input[1].split(" ");


    // 重複を検出したものを重複しないでリスト
    var duplicate= a_int.filter(function (x, i, self) {
        return self.indexOf(x) === i && i !== self.lastIndexOf(x);
    });

    //重複リストにある数を削除
    for (var i = 0; i < a_int.length; i++) {
        for (var j = 0; j < duplicate.length; j++) {
            if (duplicate[j] == a_int[i]) {
                delete a_int[i];
            }
        }
    }
    var count = 0
    for (var i = 0; i < a_int.length; i++) {
        if (a_int[i] != undefined) {
            count++
        }
    }
   

    console.log(count);
   
0