Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
43037 | yuzhengxun | 求和 | C++ | Accepted | 1 MS | 240 KB | 169 | 2024-03-06 19:30:35 |
#include<iostream> using namespace std; int main() { int n; int N; cin>>n; if(n%2==1){ N=n; } else{ N=n+1; } cout<<(N+1)*(N+1)/4; return 0; }