結果
問題 | No.120 傾向と対策:門松列(その1) |
ユーザー |
|
提出日時 | 2017-02-10 09:34:44 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 182 ms / 5,000 ms |
コード長 | 311 bytes |
コンパイル時間 | 721 ms |
コンパイル使用メモリ | 6,784 KB |
実行使用メモリ | 6,784 KB |
最終ジャッジ日時 | 2024-12-26 14:23:11 |
合計ジャッジ時間 | 1,751 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
#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