피보나치 배열은 0과 1로 시작하며, 다음 피보나치 수는 바로 앞의 두 피보나치 수의 합이 된다. 정수 N이 주어지면, N보다 작은 모든 짝수 피보나치 수의 합을 구하여라.
예제) Input: N = 12 Output: 10 // 0, 1, 2, 3, 5, 8 중 짝수인 2 + 8 = 10.
피보나치 배열은 0과 1로 시작하며, 다음 피보나치 수는 바로 앞의 두 피보나치 수의 합이 된다. 정수 N이 주어지면, N보다 작은 모든 짝수 피보나치 수의 합을 구하여라.
예제) Input: N = 12 Output: 10 // 0, 1, 2, 3, 5, 8 중 짝수인 2 + 8 = 10.
20180413 알고리즘 문제 문제출처: https://www.acmicpc.net/problem/3825
답변으로 문제풀이를 올려주세요.
20180412 알고리즘 문제 문제출처: https://www.acmicpc.net/problem/2920
답변으로 문제풀이를 올려주세요.
20180411 알고리즘 문제 문제출처: https://www.acmicpc.net/problem/4211
답변으로 문제풀이를 올려주세요.
# is_authenticated() function get error | |
# TypeError: 'bool' object is not callable | |
def has_add_permission(self, request): | |
"""Return True if the user has the permission to add a model.""" | |
try: | |
user_is_authenticated = request.user.is_authenticated() | |
except TypeError: | |
user_is_authenticated = request.user.is_authenticated | |
20180410 알고리즘 문제 문제출처: https://www.acmicpc.net/problem/14081
답변으로 문제풀이를 올려주세요.
20180410 알고리즘 문제 문제출처: https://www.acmicpc.net/problem/10735
답변으로 문제풀이를 올려주세요.
20180410 알고리즘 문제 문제출처: https://www.acmicpc.net/problem/6393
답변으로 문제풀이를 올려주세요.
20180409 알고리즘 문제 문제출처: https://www.acmicpc.net/problem/14195
문제 The new DotA game is coming out soon. All the fans around the world are waiting to try the new version of DotA: ”DotB”.
There’s a lot of pressure on the developers of the game to add new heroes to it. They come up with ideas but not all of them are worth implementing. For one particular hero they are working on, they asked you to write a program to analyze one of its abilities. The hero’s name is ”Cave Man”, and his ability is to summon a crow to attack a line of enemies.
The line has n enemies with hitpoint h1h2...hn. The crow always starts at the first enemy and attacks each one and goes to the next. It attacks exactly n + 5 times in total, and if it reaches the end of the line, it continues the attack from the other end of the line.
query{ | |
user(login: "CodeMath") { | |
repositories(last: 100) { | |
totalCount | |
nodes { | |
name | |
defaultBranchRef { | |
target { | |
...on Commit { | |
history(since: "2018-04-03T00:00:00+00:00") { |