일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 사이드
- 운동
- Writing
- 3줄정리
- FIT XR
- 괜찮음
- 30분
- 링피트
- 뭐든
- 10분
- English
- 프로젝트
- 영어원서읽기
- Daily Challenge
- 스탭퍼
- 화상영어
- 매일
- leetcode
- 쓰릴오브파이트
- 파비최
- 월간
- Problem Solving
- 읽기
- 만화도
- 영어공부
- 잡생각
- realclass
- 리얼 클래스
- 개발자
- 미드시청
Archives
- Today
- Total
파비의 매일매일 공부기록
2023.04.17 Today's Challenge 본문
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/
Kids With the Greatest Number of Candies - LeetCode
Can you solve this real interview question? Kids With the Greatest Number of Candies - There are n kids with candies. You are given an integer array candies, where each candies[i] represents the number of candies the ith kid has, and an integer extraCandie
leetcode.com
아무 생각 없이 풀어도 되는 문제 -_-
class Solution:
def kidsWithCandies(self, candies: List[int], extraCandies: int) -> List[bool]:
m = max(candies)
res = []
for candy in candies:
res.append(candy+extraCandies >= m)
return res
반응형
'Problem Solving > LeetCode' 카테고리의 다른 글
2023.04.19 Today's Challenge (0) | 2023.04.19 |
---|---|
2023.04.18 Today's Challenge (0) | 2023.04.18 |
2023.04.16 Today's Challenge (0) | 2023.04.16 |
2023.04.15 Today's Challenge (0) | 2023.04.15 |
2023.04.14 Today's Challenge (0) | 2023.04.14 |
Comments