标签:get namespace problem round span ems 分享 style info
题目链接
http://codeforces.com/problemset/problem/158/A
#include<iostream> #include<string> using namespace std; int main() { int n,k; int num=0; int arr[100]={0}; cin>>n>>k; for(int i=0;i<n;i++) { cin>>arr[i]; } int i; for(i=0;i<k&&arr[i]!=0;i++) { num++; } int flag=1; while(arr[i-1]==arr[i]&&arr[i]!=0) { num++; i++; } cout<<num; return 0; }
标签:get namespace problem round span ems 分享 style info
原文地址:https://www.cnblogs.com/CMlhc/p/9192702.html