Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
33238 | 奚晨瑞 | 求和 | C++ | Accepted | 0 MS | 248 KB | 169 | 2023-12-08 15:31:27 |
#include<iostream> using namespace std; int main() { int n; cin>>n; int N; if(n%2==1){ N=n; } else{ N=n+1; } cout<<(N+1)*(N+1)/4; return 0; }