[백준/파이썬] 10275번 풀이

업데이트:



문제 정보


풀이

문제

백준 10275번 문제를 풀이합니다.

코드

`python import math for t in range(int(input())): n,a,b=map(int,input().split()) c=math.floor(math.log(a)/math.log(2)) d=math.floor(math.log(b)/math.log(2)) while a>0: if a>=2c:a-=2c c-=1 while b>0: if b>=2d:b-=2d d-=1 print(n-min(c,d)-1)

```

설명

저장소의 기존 제출 코드를 기준으로 정리한 풀이입니다.



댓글남기기