Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
56274 | zhangweiran | 求和 | C++ | Accepted | 1 MS | 252 KB | 169 | 2024-11-09 22:48:41 |
#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; }