- Victoria的舞会1
- 2016-05-24 20:41:21 @
#include<iostream>
#include<cmath>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{int sum=0,x,n,r;
cin>>n,k;
for(int i=1;i<=n;i++)
{cin>>x;
r=1;
while(x!=0)
{r++;}
if(r>=k)sum++;}
cout<<sum;
}
2 条评论
-
ljh2017 LV 5 @ 2017-12-11 19:27:03
k没定义
-
2016-11-14 20:45:09@
你死循环了
while(x!=0)
{r++;}
这里
- 1