백준 24313번 알고리즘 수업 - 점근적 표기 1(python)

마뇽미뇽·2025년 2월 4일
0

알고리즘 문제풀이

목록 보기
118/165

1.문제

https://www.acmicpc.net/problem/24313

2.풀이

기울기 조건: a1 ≤ c
시작점 조건: f(n0) ≤ g(n0), 즉 a1 n0 + a0 ≤ c n0

3.코드

a1,a0 = map(int,input().split())
c = int(input())
n = int(input())

if a1 * n + a0 <= c * n and a1 <= c:
    print(1)
else:
    print(0)```
profile
Que sera, sera

0개의 댓글