Untitled
Anonymous
c_cpp
07/11/2024 11:11 AM
452 B
20
Indexable
int countDigit3( const std::vector< int >& vec )
{
int result = 0;
for( const auto& e : vec )
{
std::string text = std::to_string( e );
for( const auto& t : text )
{
if( t == '3' )
{
++result;
}
}
}
return result;
}Editor is loading...
Leave a Comment