結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-26 03:16:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 5,000 ms |
| コード長 | 278 bytes |
| 記録 | |
| コンパイル時間 | 416 ms |
| コンパイル使用メモリ | 82,732 KB |
| 実行使用メモリ | 53,968 KB |
| 最終ジャッジ日時 | 2025-10-24 21:15:29 |
| 合計ジャッジ時間 | 1,825 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
n = int(input())
cnt = [0 for i in range(10)]
for i in range(n):
a, b, c = map(int, input().split())
cnt[a - 1] += 1
cnt[b - 1] += 1
cnt[c - 1] += 1
ans = 0
cnt2 = 0
for i in cnt:
ans += i // 2
if i % 2 == 1:
cnt2 += 1
ans += cnt2 // 4
print(ans)