蓝桥杯2025年第十六届省赛真题-可分解的正整数
其实只有1不符合要求,因为-1+0+1=0,作为对称结构,任何数都可以改成加法,比如4=-3+-2+-1+0+1+2+3+4,但因为最小连续的数为3,1恰好在里面,所以1不行。
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){int ret=0;int n,t;cin>>n;while(n--) {scanf("%d",&t);if(t!=1){ret++;}}printf("%d\n",ret);return 0;
}