結果

問題 No.29 パワーアップ
ユーザー あかりきあかりき
提出日時 2021-02-08 06:44:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 221 bytes
コンパイル時間 429 ms
コンパイル使用メモリ 86,564 KB
実行使用メモリ 71,292 KB
最終ジャッジ日時 2023-09-18 11:12:04
合計ジャッジ時間 3,357 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
70,884 KB
testcase_01 AC 74 ms
71,292 KB
testcase_02 AC 75 ms
71,252 KB
testcase_03 AC 75 ms
70,964 KB
testcase_04 AC 77 ms
71,104 KB
testcase_05 AC 78 ms
70,956 KB
testcase_06 AC 79 ms
71,128 KB
testcase_07 AC 76 ms
70,876 KB
testcase_08 AC 76 ms
70,964 KB
testcase_09 AC 76 ms
71,028 KB
testcase_10 AC 75 ms
70,880 KB
testcase_11 AC 76 ms
71,036 KB
testcase_12 AC 75 ms
71,088 KB
testcase_13 AC 75 ms
71,196 KB
testcase_14 AC 74 ms
70,972 KB
testcase_15 AC 78 ms
71,036 KB
testcase_16 AC 78 ms
71,256 KB
testcase_17 AC 78 ms
71,096 KB
testcase_18 AC 76 ms
71,028 KB
testcase_19 AC 77 ms
71,100 KB
testcase_20 AC 75 ms
71,088 KB
testcase_21 AC 75 ms
70,888 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