Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
116095 颜学俊逸 12序列找规律 C++ Accepted 1 MS 272 KB 238 2025-04-06 11:47:53

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int n,e=10000,r=10000; cin>>n; for(int a = 3;a<=n;a++){ if(a%2==0){ e=e-2; }else{ r=r-1; } } if(n%2==0){ cout<<e; } else{ cout<<r; } return 0; }