Codeup 1272 - 기부 http://codeup.kr/problem.php?id=1272 Codeup 1272 - 기부 k, h = map(int, input().split())sumMoney = 0def getCurrentMoney(n): currentMoney = 0 for i in range(1, n+1): if i % 2 == 0: currentMoney = int(i / 2) * 10 else: currentMoney = int(i / 2) + 1 return currentMoneysumMoney += getCurrentMoney(k)sumMoney += getCurrentMoney(h)print(sumMoney) Codeup 1271 - 최대값 구하기 http://codeup.kr/problem.php?id=1271 Codeup 1271 - 최대값 구하기 n = input()numbers = list(map(int, input().split()))maximum_number = 0for number in numbers: if(number > maximum_number): maximum_number = numberprint(maximum_number) Codeup 1270 - 1의 개수는 1 http://codeup.kr/problem.php?id=1270 Codeup 1270 - 1의 개수는? 1 n = int(input())count = 0for i in range(1, n+1): if(i % 10 == 1): count += 1print(count) Codeup 1269 - 수열의 값 구하기 http://codeup.kr/problem.php?id=1269 Codeup 1269 - 수열의 값 구하기 a, b, c, n = input().split()a = int(a)b = int(b)c = int(c)n = int(n)number = afor i in range(0, n-1): number = number * b + cprint(number) Codeup 1268 - n개의 수 중 짝수의 개수 http://codeup.kr/problem.php?id=1268 Codeup 1268 - n개의 수 중 짝수의 개수 n = int(input())numbers = list(map(int, input().split()))count_even = 0for number in numbers: if number % 2 == 0: count_even += 1print(count_even) Codeup 1267 - n개의 수 중 5의 배수의 합 http://codeup.kr/problem.php?id=1267 Codeup 1267 - n개의 수 중 5의 배수의 합 length = int(input())numbers = list(map(int, input().split()))result = 0for number in numbers: if number % 5 == 0: result += numberprint(result) HackerRank - Cats and a Mouse https://www.hackerrank.com/challenges/cats-and-a-mouse/problem HackerRank - Cats and a Mouse #!/bin/python3import mathimport osimport randomimport reimport sysdef catAndMouse(x, y, z): catA = x - z catB = y - z output = '' if(catA HackerRank - Electronics Shop https://www.hackerrank.com/challenges/electronics-shop/problem HackerRank - Electronics Shop x#!/bin/python3import osimport sysdef getMoneySpent(keyboards, drives, b): spent = -1 for keyboard in keyboards: for drive in drives: if keyboard + drive 이전 1 ··· 19 20 21 22 23 24 25 ··· 36 다음