不用循环
2024-05-28 21:17:28
发布于:浙江
2阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,n,x,sum=0;
cin>>x>>n;
a = n + x - 1;
b = a / 7;
c = a % 7;
if(c == 7 || c == 6){
c = 5;
}
if(x == 6 || x == 7){
x = 6;
}
sum = ((b - 1) * 5 + c + (5 - x + 1)) * 250;
cout << sum;
return 0;
}
这里空空如也
有帮助,赞一个