{"code":"relatives","name":"Quan hệ họ hàng","description":"2 số được gọi là họ hàng nếu chúng có ít nhất một chữ số chung. Cho một dãy $a$ gồm $n$ số tự nhiên. Hãy tính số cặp họ hàng trong $a$. \r\n\r\n####Input\r\n\r\n- Dòng đầu chứa số nguyên dương $n \\ (1\\leq n \\leq 10^5)$.\r\n\r\n- Dòng thứ hai chứa $n$ số tự nhiên $a_1, a_2, ..., a_n \\ (0 \\leq a_i \\leq 10^9)$\r\n\r\n####Output\r\n\r\n- In ra số cặp họ hàng\r\n####Example\r\n!!! question \"Test 1\"\r\n    ???+ \"Input\"\r\n        ```sample\r\n        5\r\n        10 74 47 77 301 \r\n        ```\r\n    ???+ success \"Output\"\r\n        ```sample\r\n        4\r\n        ```","points":500.0,"partial":true,"time_limit":1.0,"memory_limit":1048000,"short_circuit":false,"allowed_languages":[3,4,34,36,37,5,6,11,12,14,28,2,38,39,9,18,17,29,23,27,35,25,26,10,7,19,32,1,8,15,16,24,20,33,13,41,21,40],"is_public":true,"is_manually_managed":false,"permissions":{"can_edit":false}}