| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 81869 | 季洁 | circle | C++ | Wrong Answer | 6 | 0 MS | 264 KB | 384 | 2023-08-11 18:01:19 |
#include<bits/stdc++.h> using namespace std; int main(){ int t,n,ans=0; cin>>t>>n; if(t==1) cout<<n*(n-1)/2; if(t==2){ if(n==2) cout<<0; else if(n==3) cout<<0; else if(n==4) cout<<1; else{ for(int i=1;i<=(n+1)/2;i++){ ans+=2*(n-i-2)*i; if(n%2!=0&&i==(n+1)/2) ans-=(n-i-2)*i; } cout<<ans; } } if(t==3) cout<<pow(2,n-1); return 0; }