結果
問題 | No.29 パワーアップ |
ユーザー |
|
提出日時 | 2018-01-24 22:05:33 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 42 ms / 5,000 ms |
コード長 | 368 bytes |
コンパイル時間 | 105 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-26 08:02:04 |
合計ジャッジ時間 | 1,887 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
def main(): N = int(input()) items = [0]*10 for i in range(N): a, b, c = map(lambda x:int(x)-1, input().split()) items[a] += 1 items[b] += 1 items[c] += 1 ans = 0 for i in range(10): ans += items[i]//2 items[i] %= 2 ans += sum(items) // 4 print(ans) if __name__ == '__main__': main()