結果

問題 No.29 パワーアップ
ユーザー zimphazimpha
提出日時 2017-12-11 23:58:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 62 ms / 5,000 ms
コード長 242 bytes
コンパイル時間 1,106 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 71,524 KB
最終ジャッジ日時 2023-08-20 17:38:00
合計ジャッジ時間 3,314 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
71,440 KB
testcase_01 AC 60 ms
71,464 KB
testcase_02 AC 61 ms
71,184 KB
testcase_03 AC 61 ms
71,320 KB
testcase_04 AC 61 ms
71,440 KB
testcase_05 AC 62 ms
71,260 KB
testcase_06 AC 62 ms
71,164 KB
testcase_07 AC 60 ms
71,512 KB
testcase_08 AC 61 ms
71,036 KB
testcase_09 AC 60 ms
71,368 KB
testcase_10 AC 62 ms
71,184 KB
testcase_11 AC 62 ms
71,524 KB
testcase_12 AC 61 ms
71,080 KB
testcase_13 AC 62 ms
71,312 KB
testcase_14 AC 61 ms
71,440 KB
testcase_15 AC 62 ms
71,272 KB
testcase_16 AC 61 ms
71,184 KB
testcase_17 AC 61 ms
71,256 KB
testcase_18 AC 60 ms
71,252 KB
testcase_19 AC 61 ms
71,368 KB
testcase_20 AC 60 ms
71,044 KB
testcase_21 AC 60 ms
71,036 KB
権限があれば一括ダウンロードができます

ソースコード

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