int calDays(int rm_fee,int fruits,int balance,int fr_fee) { int timer=0; int bal = balance-(fruits*rm_fee); if (bal>0) { timer=fruits+(int)(bal)/(rm_fee+fr_fee); } else if (bal=0) { timer=fruits; } else { timer=(int)(balance/rm_fee) } return timer; } 独立生活100%AC,题都比较巧妙
点赞 4

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务