求调,WA,问题可能出在判断上面吧?
查看原帖
求调,WA,问题可能出在判断上面吧?
1438258
quell楼主2024/9/7 08:45
#include <bits/stdc++.h>
using namespace std;
int main(){
    unsigned long long m,ans=0;
    int x;
    cin>>x>>m;
    for(int i=0;i<m;i++)
    {
        if((x!=6)&&(x!=7))
        {
            ans+=250;
        }
        if(x==7)
        {
            x==1;
        }
        else x++;
    }
    cout<<ans;
}

刚才我也是参考了一下题解的,人家的意思我也大概明白了,但是这道题就是不对啊。是不是因为某些小细节我没发现呢

2024/9/7 08:45
加载中...