Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
71300 胡海峰老师 07苹果和虫子 Python3 Accepted 35 MS 3784 KB 412 2024-04-21 20:23:50

Tests(10/10):


Code:

n,x,y = input().split() n = int(n) x = int(x) y = int(y) eaten_apples = y//x #完整的吃掉的苹果数量 if y%x !=0: #有不完整的苹果(1个) eaten_apples = eaten_apples + 1 if n - eaten_apples < 0: print(0) else: print(n - eaten_apples) """ 我给你三组测试数据 输入: 8 3 6 输出:6 输入:6 3 13 输出:1 输入:5 2 50 输出:0 """