結果

問題 No.29 パワーアップ
ユーザー motor_radial
提出日時 2019-07-26 22:47:43
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 365 bytes
コンパイル時間 355 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-07-02 08:44:06
合計ジャッジ時間 1,372 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=[0]*N
B=[0]*N
C=[0]*N
power=0
count=0

for i in range(N):
    A[i],B[i],C[i]=map(int,input().split())

Item=A+B+C

for x in range(1,11):
    element_num=Item.count(x)
    if (element_num%2)==0:
        power+=(element_num//2)
    else:
        power+=(element_num//2)
        count+=1
    if count==4:
        power+=1
        count=0

print(power)
0