Skip to content

3184.构成整天的下标对数目 I

go
/*
 * @lc app=leetcode.cn id=3184 lang=golang
 * @lcpr version=30204
 *
 * [3184] 构成整天的下标对数目 I
 */

func countCompleteDayPairs(hours []int) (res int) {
	res = 0
	for i := 0; i < len(hours); i++ {
		for j := i + 1; j < len(hours); j++ {
			if (hours[i]+hours[j])%24 == 0 {
				res++
			}
		}
	}
	return
}
本站访客数 人次 本站总访问量