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