求佬儿教教~ 80分
查看原帖
求佬儿教教~ 80分
1326805
tuanza楼主2024/10/22 22:17
#include<iostream>
#include<algorithm>
using namespace std;

int main(){
    ios::sync_with_stdio(false);
    int x,n;
    long long s=0,t;
    cin>>x>>n;
    if(x+n<6)s=n*250;
    else if(x+n==6)s=(n-1)*250;
    else if(x+n>=7){
        t=(x+n)/7;
        s=t*5*250-x*250+(x+n-7*t)*250;
    }
    cout<<s;
    return 0;
}

2024/10/22 22:17
加载中...