C # - 170
using System.Linq;class P{static void Main(string[]a){System.Console.Write(string.Join(",",System.IO.File.ReadAllLines(a[0]).Where(w=>"aeiouy".All(c=>w.Contains(c)))));}}
Formateado:
using System.Linq;
class P
{
static void Main(string[] a) {
System.Console.Write(
string.Join(",", System.IO.File.ReadAllLines(a[0])
.Where(w => "aeiouy".All(c => w.Contains(c)))));
}
}
En este momento no está de humor para implementar el conteo, pero debería ser fácil.
La ruta a la (versión en minúsculas de la) lista de palabras se debe pasar al programa como primer argumento:
program.exe D:\foo\bar\corncob_lowercase.txt
Salida:
abstemiously,authoritatively,behaviourally,consequentially,counterrevolutionary,
disadvantageously,educationally,encouragingly,eukaryotic,evolutionarily,evolutio
nary,exclusionary,facetiously,gregariously,heterosexuality,homosexuality,importu
nately,inconsequentially,instantaneously,insurrectionary,intravenously,manoeuvra
bility,neurologically,neurotically,ostentatiously,pertinaciously,precariously,pr
ecautionary,questionably,revolutionary,simultaneously,supersonically,tenaciously
,uncomplimentary,uncontroversially,unconventionally,undemocratically,unemotional
ly,unequivocally,uninformatively,unintentionally,unquestionably,unrecognisably
Me tomé la libertad de mostrar y separar las palabras por comas; ninguno de los cuales se especifica en las reglas (qué estado "debe encontrar todas las palabras", no cómo (e IF) para la salida).
Recuento incluido (+ salida): 192 - 5 = 187
using System.Linq;class P{static void Main(string[]a){var r=System.IO.File.ReadAllLines(a[0]).Where(w=>"aeiouy".All(c=>w.Contains(c)));System.Console.Write(string.Join(",",r)+" "+r.Count());}}
Salida:
abstemiously,authoritatively,behaviourally,consequentially,counterrevolutionary,
disadvantageously,educationally,encouragingly,eukaryotic,evolutionarily,evolutio
nary,exclusionary,facetiously,gregariously,heterosexuality,homosexuality,importu
nately,inconsequentially,instantaneously,insurrectionary,intravenously,manoeuvra
bility,neurologically,neurotically,ostentatiously,pertinaciously,precariously,pr
ecautionary,questionably,revolutionary,simultaneously,supersonically,tenaciously
,uncomplimentary,uncontroversially,unconventionally,undemocratically,unemotional
ly,unequivocally,uninformatively,unintentionally,unquestionably,unrecognisably 4
3
(Tenga en cuenta el recuento al final: 43)
Sin salida ("debe encontrar todas las palabras"): 137 - 5 = 132
using System.Linq;class P{static void Main(string[]a){var r=System.IO.File.ReadAllLines(a[0]).Where(w=>"aeiouy".All(c=>w.Contains(c)));}}
(Doblar las reglas un poco, nuevamente: no realmente) Esto encuentra todas las palabras y el conteo está disponible al ejecutar r.Count()
.