Feedback | | If you notice incorrect translations in Contester, please let author know.
|
|
Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Difficulty Alpha
Given an array of integers nums, return the number of good pairs.
A pair (i, j) is called good if nums[i] == nums[j] and i < j.
Бүтүн сандардын массиви nums берилген, жакшы жуптардын санын кайтарып бериңиз.
Жуп (i, j) жакшы деп эсептелет, эгерде nums[i] == nums[j] жана i < j шарттары аткарылса.
Input:
6
1 2 3 1 1 3
Output:
4
Для отправки решений необходимо выполнить вход.
|