TLE
查看原帖
TLE
1541843
lmq_learning楼主2025/1/12 22:31
n = int(input())
buy = 0
eat = 0
temp = 0
while eat < n:
    buy += 1
    eat += 1
    temp +=1
    if temp == 3:
        temp -= 2
        eat += 1
print(buy)

感觉这么解也对 好伤心
严重超时了,不会二分法,求助

2025/1/12 22:31
加载中...