求调
  • 板块题目总版
  • 楼主conttyhello
  • 当前回复19
  • 已保存回复20
  • 发布时间2025/1/16 17:26
  • 上次更新2025/1/16 20:45:43
查看原帖
求调
1051492
conttyhello楼主2025/1/16 17:26

题目:B3846

#include<iostream>
using namespace std;
int main(){
    int n,m,ans=0;
    cin>>n>>m;
    for(int i=n+1;i=m-1;++i){
        if((i%400==0)||(i % 4 == 0 && i % 100 != 0)){
            ans=ans+i;
        }
    }
    cout<<ans;
}

我都改了1万好多变了,就是超时,求帮帮

注:帮帮忙,必将关注

2025/1/16 17:26
加载中...