본문 바로가기
728x90
[Python] 4344번 평균은 넘겠지 - 백준 평균은 넘겠지 4344번: 평균은 넘겠지 대학생 새내기들의 90%는 자신이 반에서 평균은 넘는다고 생각한다. 당신은 그들에게 슬픈 진실을 알려줘야 한다. www.acmicpc.net 1차원 배열 문제 대학생 새내기들의 90%는 자신이 반에서 평균은 넘는다고 생각한다. 당신은 그들에게 슬픈 진실을 알려줘야 한다. 입력 첫째 줄에는 테스트 케이스의 개수 C가 주어진다. 둘째 줄부터 각 테스트 케이스마다 학생의 수 N(1 ≤ N ≤ 1000, N은 정수)이 첫 수로 주어지고, 이어서 N명의 점수가 주어진다. 점수는 0보다 크거나 같고, 100보다 작거나 같은 정수이다. 출력 각 케이스마다 한 줄씩 평균을 넘는 학생들의 비율을 반올림하여 소수점 셋째 자리까지 출력한다. 예제 입력 1 5 5 50 50 70 80.. 2021. 10. 13.
[Python] Longest Palindromic Substring - LeetCode 5. Longest Palindromic Substring Longest Palindromic Substring - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output: "bab" Note: "aba" is also a valid answer. 2: Input: s = "cbbd" Out.. 2021. 9. 23.
[Python] Longest Substring Without Repeating Characters - LeetCode 3. Longest Substring Without Repeating Characters Longest Substring Without Repeating Characters - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Given a string s, find the length of the longest substring without repeating characters. Examples 1: Input: s = "abcabcbb" Output: 3 Ex.. 2021. 9. 16.
728x90