Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Untitled
SUBMITTED BY:
Guest
DATE:
Oct. 26, 2014, 9:32 p.m.
FORMAT:
Text only
SIZE:
413 Bytes
Raw
Download
Tweet
HITS:
1081
Go to comments
Report
#include <iostream>
using namespace std;
int tab[1000000];
int main()
{
int n=0;
while(cin>>tab[n])
{
n++;
}
int iloscx=0;
for(int i = 0; i < n-2; i++)
{
int x = tab[i];
int ilosc = 0;
while(x>=10)
{
if(x%10==0)
ilosc++;
x /= 10;
}
if(ilosc==tab[n-1]) iloscx++;
}
cout<<iloscx;
return 0;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus