2 条题解

  • 2
    @ 2026-3-15 19:46:50

    很简单

    #include<bits/stdc++.h>
    using namespace std;
    
    int main(){
    	int n,sum=0;
    	cin>>n;
    	for(int i=1;i<=n;i++){
    		for(int j=i;j<=n;j++){
    			if((i*j)%2==0){
    				sum+=1;
    			}
    		}
    	}
    	cout<<sum;
    	return 0;
    }
    
  • 0
    @ 2026-11-14 14:44:59

    #include<bits/stdc++.h> using namespace std;

    int main(){ int n,sum=0; cin>>n; for(int i=1;i<=n;i++){ for(int j=i;j<=n;j++){ if((i*j)%2==0){ sum+=1; } } } cout<<sum; return 0; }

    • 1

    信息

    ID
    3333
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    递交数
    194
    已通过
    75
    上传者