Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
simple sample
SUBMITTED BY:
Guest
DATE:
Nov. 29, 2014, 4:56 p.m.
FORMAT:
C++
SIZE:
514 Bytes
Raw
Download
Tweet
HITS:
1281
Go to comments
Report
#include
<iostream>
using
namespace
std
;
int
tab
[
1000000
];
int
ilosccyfr
(
int
n
)
{
int
il
=
0
;
while
(
n
>
0
)
{
if
(
n
%
10
==
0
)
il
++
;
n
=
n
/
10
;
}
return
il
;
}
int
main
()
{
int
x
=
0
;
while
(
cin
>>
tab
[
x
])
{
x
++
;
}
int
ilosc
=
tab
[
x
-1
];
int
n
=
0
;
for
(
int
i
=
0
;
i
<
x
-1
;
i
++
)
{
if
(
ilosccyfr
(
tab
[
i
])
==
ilosc
)
n
++
;
}
cout
<<
n
;
return
0
;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus