結果

問題 No.29 パワーアップ
ユーザー あかりきあかりき
提出日時 2021-02-08 06:44:54
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 73 ms / 5,000 ms
コード長 221 bytes
コンパイル時間 417 ms
使用メモリ 75,916 KB
最終ジャッジ日時 2023-02-07 02:02:53
合計ジャッジ時間 4,380 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 71 ms
75,452 KB
testcase_01 AC 70 ms
75,916 KB
testcase_02 AC 70 ms
75,728 KB
testcase_03 AC 70 ms
75,756 KB
testcase_04 AC 70 ms
75,816 KB
testcase_05 AC 71 ms
75,796 KB
testcase_06 AC 73 ms
75,560 KB
testcase_07 AC 72 ms
75,872 KB
testcase_08 AC 71 ms
75,724 KB
testcase_09 AC 71 ms
75,488 KB
testcase_10 AC 70 ms
75,768 KB
testcase_11 AC 71 ms
75,680 KB
testcase_12 AC 71 ms
75,492 KB
testcase_13 AC 72 ms
75,768 KB
testcase_14 AC 72 ms
75,828 KB
testcase_15 AC 71 ms
75,708 KB
testcase_16 AC 71 ms
75,644 KB
testcase_17 AC 73 ms
75,552 KB
testcase_18 AC 70 ms
75,496 KB
testcase_19 AC 71 ms
75,704 KB
testcase_20 AC 71 ms
75,832 KB
testcase_21 AC 69 ms
75,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
l=[list(map(int,input().split())) for i in range(n)]
ct=[0]*10
for i in range(n):
  for j in range(3):
    ct[l[i][j]-1]+=1
s=sum(ct)
ans=0
for i in range(10):
  x=ct[i]//2
  ans+=x
  s-=x*2
print(ans+s//4)
0