Candidate | Softeer Assessment UI
Candidate | Softeer Assessment UI
softeer.ai
나의 풀이
import sys
input = sys.stdin.readline
bir, p, total_count = list(map(int, input().split()))
for _ in range(total_count):
bir=(bir*p)%1000000007
print(bir)
소소한 팁!!
bir=(bir*p)%1000000007 >>> 곱한 나머지를 엎어 써줘야 시간이 줄어들수 있다!!'코딩테스트 파이썬 > 파이썬 프로그래머스 2단계' 카테고리의 다른 글
| 멀쩡한 사각형 (0) | 2024.07.03 |
|---|---|
| 문자열 압축 (2) | 2024.07.02 |
| Softeer 연습문제(2단계) - 전광판 (2) | 2024.06.25 |
| 디펜스 게임 (0) | 2024.04.18 |
| 리코쳇 로봇 (0) | 2024.02.19 |