Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
101820 | 胡海峰老师 | 12序列找规律 | C++ | Accepted | 1 MS | 276 KB | 236 | 2024-12-19 13:15:48 |
#include <iostream> using namespace std; int main(){ int n,d=1; int start=10000; cin>>n; if(n%2==0) { n=n/2; d =2; } else n =n/2+1; for(int i=1;i<n;i++) start = start -d; cout<<start; }