코딩테스트 파이썬/파이썬 프로그래머스 2단계
Softeer 연습문제(2단계) - 바이러스
세용용용용
2024. 6. 25. 20:25
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 >>> 곱한 나머지를 엎어 써줘야 시간이 줄어들수 있다!!