Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
33473 | chenyifei | 求和 | C++ | Accepted | 0 MS | 240 KB | 169 | 2023-12-09 15:19:37 |
#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; }