結果

問題 No.29 パワーアップ
ユーザー zimpha
提出日時 2017-12-11 23:58:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 5,000 ms
コード長 242 bytes
コンパイル時間 206 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 52,480 KB
最終ジャッジ日時 2024-11-30 21:13:37
合計ジャッジ時間 1,906 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

cnt = [0] * 10
for i in range(int(input())):
  a, b, c = list(map(int, input().split()))
  cnt[a - 1] += 1
  cnt[b - 1] += 1
  cnt[c - 1] += 1
ret, rem = 0, 0
for i in range(10):
  ret += cnt[i] // 2;
  rem += cnt[i] % 2
print(ret + rem // 4)
0