結果

問題 No.29 パワーアップ
ユーザー notsix4
提出日時 2021-11-24 14:03:00
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 5,000 ms
コード長 326 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-26 22:48:11
合計ジャッジ時間 1,575 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=[]
for i in range(n):
    s=list(map(int,input().split()))
    l.append(s)
nl=sum(l,[])
c=0
#print(nl)
for i in range(1,11):
    if nl.count(i)>1:
        a=nl.count(i)%2
        b=nl.count(i)//2
        c+=b
        nl=[x for x in nl if x != i]
        if a>0:
            nl.append(i)
c+=len(nl)//4
print(c)
0