알고리즘/수학 1
백준 2903 python
자코린이
2023. 6. 25. 23:45
input_int = int(input())
result = 2
while input_int > 0:
result = result + 2 ** (input_int-1)
input_int -= 1
print(result ** 2)
한 면에 나오는 점의 수의 차이가 2의 배수로 차이나는 것을 확인하고 수식을 적었습니다.
더 간단히 한 분들도 계십니다.(한줄로 작성하셨네요...)
print((2**int(input())+1)**2)
https://my-coding-notes.tistory.com/431
[🥉3 / 백준 2903 / 파이썬] 중앙 이동 알고리즘
2903번: 중앙 이동 알고리즘 상근이는 친구들과 함께 SF영화를 찍으려고 한다. 이 영화는 외계 지형이 필요하다. 실제로 우주선을 타고 외계 행성에 가서 촬영을 할 수 없기 때문에, 컴퓨터 그래픽
my-coding-notes.tistory.com