简单
2024-07-27 11:29:39
发布于:广东
1阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
    int a,b,sum=0;//sum是用来储存小鱼的航程
    cin>>a>>b;//输入
    for(int i=1;i<=b;i++){//循环,用来计算航程
        if(a!=6&&a!=7){//判断要不要休息
          sum+=250; //不要休息就加上每天的航程
        }
        if(a==7){
           a=1;
        }else{
           a++;
        }//如果不是周末,就加加加;否则跳到周一
    }
    cout<<sum;//输出航程
    return 0;
}
这里空空如也

有帮助,赞一个