結果

問題 No.182 新規性の虜
ユーザー HachimoriHachimori
提出日時 2015-04-16 23:26:57
言語 Python2
(2.7.18)
結果
AC  
実行時間 113 ms / 5,000 ms
コード長 449 bytes
コンパイル時間 1,238 ms
コンパイル使用メモリ 6,648 KB
実行使用メモリ 14,440 KB
最終ジャッジ日時 2023-08-27 07:05:42
合計ジャッジ時間 3,850 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,932 KB
testcase_01 AC 11 ms
5,984 KB
testcase_02 AC 11 ms
6,096 KB
testcase_03 AC 11 ms
5,812 KB
testcase_04 AC 11 ms
5,912 KB
testcase_05 AC 11 ms
5,880 KB
testcase_06 AC 11 ms
5,892 KB
testcase_07 AC 11 ms
5,808 KB
testcase_08 AC 71 ms
10,228 KB
testcase_09 AC 113 ms
13,076 KB
testcase_10 AC 99 ms
12,236 KB
testcase_11 AC 83 ms
10,988 KB
testcase_12 AC 40 ms
7,852 KB
testcase_13 AC 11 ms
5,908 KB
testcase_14 AC 11 ms
5,928 KB
testcase_15 AC 12 ms
5,924 KB
testcase_16 AC 11 ms
5,864 KB
testcase_17 AC 11 ms
5,812 KB
testcase_18 AC 86 ms
12,132 KB
testcase_19 AC 64 ms
10,184 KB
testcase_20 AC 43 ms
8,600 KB
testcase_21 AC 96 ms
13,164 KB
testcase_22 AC 52 ms
9,436 KB
testcase_23 AC 12 ms
5,928 KB
testcase_24 AC 91 ms
14,440 KB
testcase_25 AC 63 ms
7,180 KB
testcase_26 AC 23 ms
6,820 KB
testcase_27 AC 11 ms
5,876 KB
evil01.txt AC 92 ms
14,596 KB
evil02.txt AC 92 ms
14,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
#coding:utf8

def read():
    raw_input()
    return map(int, raw_input().split())


def work(vList):
    vList.sort()

    ans = 0
    idx = 0
    while idx < len(vList):
        if idx == len(vList) - 1 or vList[idx] != vList[idx + 1]:
            ans += 1
        while idx + 1 < len(vList) and vList[idx] == vList[idx + 1]:
            idx += 1
        idx += 1

    print ans


if __name__ == "__main__":
    work(read())
0