返回题解分享
讨论 / 题解分享/ 帖子详情

刷题统计(编程题) - 题解

#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(){

ios::sync_with_stdio(false),cout.tie(0),cin.tie(0);

ll a,b,n;

cin>>a>>b>>n;


//每周可以做多少题

ll s=5\a+2\b;

//一周

ll res=n/s\*7;

//剩余

n%=s;


//枚举

ll d[]={a,a,a,a,a,b,b};

for(int i=0;n>0;i++)

{

n-=d[i];

res++;


}

cout<<res<<endl;

return 0;

}
0 回复 0 转发 0 喜欢 1 阅读
回复 (0)
默认 最新
暂无回复,快来抢沙发!