| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150804 | 邓弘锐 | 12序列找规律 | C++ | Wrong Answer | 1 MS | 268 KB | 283 | 2026-03-31 19:11:24 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,a=10000,b=10000; cin>>n; for(int i=1;i<=n;i++){ if(i%2==1){ a-=i/2; } else{ b=b-i-2; } } if(n%2==0){ cout<<b; } else{ cout<<a; } return 0; }
------Input------
5
------Answer-----
9998
------Your output-----
9997