There was an error while loading. Please reload this page.
1 parent 09c21d1 commit 26151f9Copy full SHA for 26151f9
1 file changed
leetcode3/최민지/3392_count-subarrys-of-length.py
@@ -0,0 +1,8 @@
1
+class Solution:
2
+ def countSubarrays(self, nums: List[int]) -> int:
3
+ result = 0
4
+ for i in range(len(nums)-2):
5
+ if nums[i+1] == 2 * (nums[i] + nums[i+2]):
6
+ result += 1
7
+ return result
8
+
0 commit comments