2 条题解

  • 0
    @ 2022-11-30 14:14:08

    #include<bits/stdc++.h>

    using namespace std;

    bool check(int m){

    if((m%4==0&&m%100!=0)||m%400==0){
    	return true;
    }
    else{
    	return false;
    }
    

    }

    int main(){

    int n,a,b,i;
    cin>>n;
    while(n--){
    	cin>>a>>b;
    	while(b>0){
    		if(check(a)){
    			b--;
    		}
    		++a;
    	}
    	cout<<a-1<<endl;
    }
    return 0;
    

    }

    信息

    ID
    1271
    时间
    1000ms
    内存
    32MiB
    难度
    9
    标签
    递交数
    7
    已通过
    6
    上传者