N = int(input())
num = 0
if N >= 50:
remainder = N % 50
quotient = N // 50
num = num + quotient * 7
if remainder >= 30:
quotient = remainder // 30
remainder = remainder % 30
num = num + quotient * 4
if remainder >= 10:
remainder = remainder // 10
num = num + remainder
elif N >= 30:
quotient = N // 30
remainder = N % 30
num = num + quotient * 4
if remainder >= 10:
remainder = remainder // 10
num = num + remainder
elif N >= 10:
quotient = N //10
num = num + quotient
print(num)
CCF python 打酱油
最新推荐文章于 2026-01-07 13:36:22 发布
该程序通过用户输入的一个整数N,并根据N的不同区间进行相应的除法和取余运算,最终输出一个计算结果。程序主要考虑了三个不同的数值范围:大于等于50、大于等于30但小于50、大于等于10但小于30,并针对每个范围定义了不同的计算规则。
396

被折叠的 条评论
为什么被折叠?



