1 solutions

  • 0
    @ 2025-10-15 19:26:28

    画图画图画图,找规律

    #include<bits/stdc++.h>
    using namespace std;
    
    int main(){
    	int n;
    	cin >> n;
     	if(n%2==0){
    		cout << (n+1)*2+n;
    	}
    	else cout << n*2+(n+1);
    	return 0;
    } 
    
    • 1

    Information

    ID
    7072
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    4
    Tags
    # Submissions
    162
    Accepted
    27
    Uploaded By