c++简单不需要数组的题解
2026-07-18 22:55:36
发布于:山西
37阅读
0回复
0点赞
自行参考吧:
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,cnt=0;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cin>>n;
while(n--)
{
ll a,b,c,x=0;
cin>>a>>b>>c;
if(a==1)x++;
if(b==1)x++;
if(c==1)x++;
if(x>=2)cnt++;
}
cout<<cnt;
return 0;
}
这里空空如也







有帮助,赞一个