結果
問題 | No.120 傾向と対策:門松列(その1) |
ユーザー | pluto77 |
提出日時 | 2017-02-10 09:34:44 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 186 ms / 5,000 ms |
コード長 | 311 bytes |
コンパイル時間 | 45 ms |
コンパイル使用メモリ | 6,684 KB |
実行使用メモリ | 6,448 KB |
最終ジャッジ日時 | 2023-08-27 05:17:50 |
合計ジャッジ時間 | 1,393 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 154 ms
6,368 KB |
testcase_01 | AC | 183 ms
6,344 KB |
testcase_02 | AC | 94 ms
6,448 KB |
testcase_03 | AC | 186 ms
6,384 KB |
ソースコード
#yuki_120 from collections import Counter n=int(raw_input()) for i in xrange(n): int(raw_input()) s=Counter(map(int,raw_input().split())).values() # print s res=0 if len(s)>=3: s=sorted(s,reverse=True) while s[2]: s[0]-=1 s[1]-=1 s[2]-=1 res+=1 s=sorted(s,reverse=True) print res